mirror of
https://github.com/clangen/musikcube.git
synced 2025-01-07 09:54:55 +00:00
Added an "open url" action to UpdateCheck
's overlay
This commit is contained in:
parent
816d4e1894
commit
ce616712cd
@ -41,6 +41,7 @@
|
||||
#include <cursespp/DialogOverlay.h>
|
||||
|
||||
#include <core/runtime/Message.h>
|
||||
#include <core/support/Common.h>
|
||||
|
||||
#include <app/util/Messages.h>
|
||||
#include <app/util/PreferenceKeys.h>
|
||||
@ -231,15 +232,21 @@ void UpdateCheck::ShowUpgradeAvailableOverlay(
|
||||
.SetTitle(_TSTR("update_check_dialog_title"))
|
||||
.SetMessage(message);
|
||||
|
||||
dialog->AddButton(
|
||||
"o", "o", _TSTR("button_open_url"),
|
||||
[url](std::string key) {
|
||||
core::OpenFile(url);
|
||||
});
|
||||
|
||||
if (silent) {
|
||||
dialog->AddButton(
|
||||
"KEY_ENTER", "ENTER", _TSTR("button_dont_remind_me"),
|
||||
"x", "x", _TSTR("button_dont_remind_me"),
|
||||
[prefs, prefKey, version](std::string key) {
|
||||
prefs->SetString(prefKey.c_str(), version.c_str());
|
||||
prefs->Save();
|
||||
});
|
||||
|
||||
dialog->AddButton("^[", "ESC", _TSTR("button_remind_me_later"));
|
||||
dialog->AddButton("l", "l", _TSTR("button_remind_me_later"));
|
||||
}
|
||||
else {
|
||||
dialog->AddButton("KEY_ENTER", "ENTER", _TSTR("ok"));
|
||||
|
@ -14,7 +14,7 @@
|
||||
"button_continue": "continue",
|
||||
"button_unregister": "unregister",
|
||||
"button_open_url": "open url",
|
||||
"button_dont_remind_me": "don't remind me again",
|
||||
"button_dont_remind_me": "don't remind me",
|
||||
"button_remind_me_later": "remind me later",
|
||||
|
||||
"browse_title_artists": "artists",
|
||||
|
Loading…
Reference in New Issue
Block a user