From d50a9ff04d0643fac5693b9101537c2465ef7f19 Mon Sep 17 00:00:00 2001 From: defans Date: Sat, 16 Jun 2012 00:21:00 +0200 Subject: [PATCH] update.cpp/update_menu.cpp: add hotkeys Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/6ff5a915bdc8235562961726706ea6bc786367d3 Author: defans Date: 2012-06-16 (Sat, 16 Jun 2012) Origin message was: ------------------ - update.cpp/update_menu.cpp: add hotkeys --- src/gui/update.cpp | 4 +++- src/gui/update_menue.cpp | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/gui/update.cpp b/src/gui/update.cpp index 4ec7feaf9..2ec560896 100644 --- a/src/gui/update.cpp +++ b/src/gui/update.cpp @@ -607,6 +607,8 @@ void CFlashExpert::writemtd(const std::string & filename, int mtdNumber) void CFlashExpert::showMTDSelector(const std::string & actionkey) { + int shortcut = 0; + mn_widget_id_t widget_id = NO_WIDGET_ID; if (actionkey == "readmtd") widget_id = MN_WIDGET_ID_MTDREAD_SELECTOR; @@ -625,7 +627,7 @@ void CFlashExpert::showMTDSelector(const std::string & actionkey) if ((actionkey == "writemtd") && (lx == 0)) enabled = false; sprintf(sActionKey, "%s%d", actionkey.c_str(), lx); - mtdselector->addItem(new CMenuForwarderNonLocalized(mtdInfo->getMTDName(lx).c_str(), enabled, NULL, this, sActionKey)); + mtdselector->addItem(new CMenuForwarderNonLocalized(mtdInfo->getMTDName(lx).c_str(), enabled, NULL, this, sActionKey, CRCInput::convertDigitToKey(shortcut++))); } mtdselector->exec(NULL,""); delete mtdselector; diff --git a/src/gui/update_menue.cpp b/src/gui/update_menue.cpp index bf33a9264..aeb7f471c 100644 --- a/src/gui/update_menue.cpp +++ b/src/gui/update_menue.cpp @@ -101,6 +101,6 @@ void CSoftwareUpdate::showSoftwareUpdateExpert(CMenuWidget *w_mtd_expert) { w_mtd_expert->addIntroItems(); - w_mtd_expert->addItem(new CMenuForwarder(LOCALE_FLASHUPDATE_READFLASHMTD , true, NULL, fe, "readflashmtd" )); - w_mtd_expert->addItem(new CMenuForwarder(LOCALE_FLASHUPDATE_WRITEFLASHMTD, true, NULL, fe, "writeflashmtd")); + w_mtd_expert->addItem(new CMenuForwarder(LOCALE_FLASHUPDATE_READFLASHMTD , true, NULL, fe, "readflashmtd" , CRCInput::RC_red , NEUTRINO_ICON_BUTTON_RED)); + w_mtd_expert->addItem(new CMenuForwarder(LOCALE_FLASHUPDATE_WRITEFLASHMTD, true, NULL, fe, "writeflashmtd", CRCInput::RC_green, NEUTRINO_ICON_BUTTON_GREEN)); }