1
0
Fork 0
mirror of https://github.com/DarkMatterCore/nxdumptool.git synced 2024-11-26 04:02:11 +00:00

OptionsTab: let borealis take care of hint mgmt.

This commit is contained in:
Pablo Curiel 2022-07-30 16:25:41 +02:00
parent 4d9cb8f19d
commit cc13552b08
4 changed files with 6 additions and 26 deletions

View file

@ -68,7 +68,7 @@ typedef struct {
typedef enum {
TitleNamingConvention_Full = 0, ///< Individual titles: "{Name} [{Id}][v{Version}][{Type}]".
///< Gamecards: "[{Name1}] [{Id1}][v{Version1}] + ... + [{NameN}] [{IdN}][v{VersionN}]".
///< Gamecards: "{Name1} [{Id1}][v{Version1}] + ... + {NameN} [{IdN}][v{VersionN}]".
TitleNamingConvention_IdAndVersionOnly = 1, ///< Individual titles: "{Id}_v{Version}_{Type}".
///< Gamecards: "{TitleId1}_v{TitleVersion1}_{TitleType1} + ... + {TitleIdN}_v{TitleVersionN}_{TitleTypeN}".
TitleNamingConvention_Count = 2

View file

@ -79,8 +79,6 @@ namespace nxdt::views
nxdt::tasks::DownloadFileTask nro_task;
brls::GenericEvent::Subscription focus_event_sub;
void DisplayChangelog(void);
void DisplayUpdateProgress(void);

@ -1 +1 @@
Subproject commit 2dcb0c6f8370ae0c5de760bf612e6bf5b54ee837
Subproject commit abd5d6dd313eb278e7f83af0a3594ef27df3fd98

View file

@ -202,11 +202,6 @@ namespace nxdt::views
return this->onCancel();
});
/* Subscribe to the global focus change event so we can rebuild hints as soon as this frame is pushed to the view stack. */
this->focus_event_sub = brls::Application::getGlobalFocusChangeEvent()->subscribe([this](brls::View* view) {
this->rebuildHints();
});
/* Subscribe to the JSON task. */
this->json_task.RegisterListener([this](const nxdt::tasks::DownloadTaskProgress& progress) {
/* Return immediately if the JSON task hasn't finished. */
@ -268,9 +263,6 @@ namespace nxdt::views
/* Free JSON buffer. */
if (this->json_buf) free(this->json_buf);
/* Unsubscribe focus event listener. */
brls::Application::getGlobalFocusChangeEvent()->unsubscribe(this->focus_event_sub);
}
void OptionsTabUpdateApplicationFrame::layout(NVGcontext* vg, brls::Style* style, brls::FontStash* stash)
@ -348,27 +340,17 @@ namespace nxdt::views
return true;
});
/* Rebuild action hints. */
this->rebuildHints();
/* Go to the next stage. */
this->nextStage();
}
void OptionsTabUpdateApplicationFrame::DisplayUpdateProgress(void)
{
/* Remove update action. */
this->registerAction("options_tab/update_app/frame/update_action"_i18n, brls::Key::PLUS, [](void) {
return true;
}, true);
/* Unregister update action. */
this->unregisterAction(brls::Key::PLUS);
/* Register cancel action once more, using a different label. */
this->registerAction("options_tab/update_dialog/cancel"_i18n, brls::Key::B, [this](void) {
return this->onCancel();
});
/* Rebuild action hints. */
this->rebuildHints();
/* Update cancel action label. */
this->updateActionHint(brls::Key::B, "options_tab/update_dialog/cancel"_i18n);
/* Subscribe to the NRO task. */
this->nro_task.RegisterListener([this](const nxdt::tasks::DownloadTaskProgress& progress) {