diff --git a/src/gui/update.cpp b/src/gui/update.cpp index 7813de8c4..67fd01ce3 100644 --- a/src/gui/update.cpp +++ b/src/gui/update.cpp @@ -37,6 +37,7 @@ #include #include +#include #include #include @@ -158,7 +159,8 @@ bool CFlashUpdate::selectHttpImage(void) snprintf(current, 200, "%s: %s %s %s %s %s", g_Locale->getText(LOCALE_FLASHUPDATE_CURRENTVERSION_SEP), curInfo.getReleaseCycle(), g_Locale->getText(LOCALE_FLASHUPDATE_CURRENTVERSIONDATE), curInfo.getDate(), g_Locale->getText(LOCALE_FLASHUPDATE_CURRENTVERSIONTIME), curInfo.getTime()); - CMenuWidget SelectionWidget(LOCALE_FLASHUPDATE_SELECTIMAGE, NEUTRINO_ICON_UPDATE, listWidth); + + CMenuWidget SelectionWidget(LOCALE_FLASHUPDATE_SELECTIMAGE, NEUTRINO_ICON_UPDATE, listWidth, MN_WIDGET_ID_IMAGESELECTOR); SelectionWidget.addItem(GenericMenuSeparator); SelectionWidget.addItem(GenericMenuBack); @@ -596,8 +598,14 @@ void CFlashExpert::writemtd(const std::string & filename, int mtdNumber) void CFlashExpert::showMTDSelector(const std::string & actionkey) { - //mtd-selector erzeugen - CMenuWidget* mtdselector = new CMenuWidget(LOCALE_SERVICEMENU_UPDATE, NEUTRINO_ICON_UPDATE, width); + mn_widget_id_t widget_id = NO_WIDGET_ID; + if (actionkey == "readmtd") + widget_id = MN_WIDGET_ID_MTDREAD_SELECTOR; + else if (actionkey == "writemtd") + widget_id = MN_WIDGET_ID_MTDWRITE_SELECTOR; + + //generate mtd-selector + CMenuWidget* mtdselector = new CMenuWidget(LOCALE_SERVICEMENU_UPDATE, NEUTRINO_ICON_UPDATE, width, widget_id); mtdselector->addIntroItems(LOCALE_FLASHUPDATE_MTDSELECTOR, NONEXISTANT_LOCALE, CMenuWidget::BTN_TYPE_CANCEL); CMTDInfo* mtdInfo =CMTDInfo::getInstance(); @@ -612,7 +620,7 @@ void CFlashExpert::showMTDSelector(const std::string & actionkey) void CFlashExpert::showFileSelector(const std::string & actionkey) { - CMenuWidget* fileselector = new CMenuWidget(LOCALE_SERVICEMENU_UPDATE, NEUTRINO_ICON_UPDATE, width); + CMenuWidget* fileselector = new CMenuWidget(LOCALE_SERVICEMENU_UPDATE, NEUTRINO_ICON_UPDATE, width, MN_WIDGET_ID_FILESELECTOR); fileselector->addIntroItems(LOCALE_FLASHUPDATE_FILESELECTOR, NONEXISTANT_LOCALE, CMenuWidget::BTN_TYPE_CANCEL); struct dirent **namelist; diff --git a/src/neutrino_menue.h b/src/neutrino_menue.h index 1c6892622..febec9148 100644 --- a/src/neutrino_menue.h +++ b/src/neutrino_menue.h @@ -143,6 +143,12 @@ enum MN_WIDGET_ID MN_WIDGET_ID_USERMENU_YELLOW, MN_WIDGET_ID_USERMENU_BLUE, + //update file selector + MN_WIDGET_ID_IMAGESELECTOR, + MN_WIDGET_ID_MTDREAD_SELECTOR, + MN_WIDGET_ID_MTDWRITE_SELECTOR, + MN_WIDGET_ID_FILESELECTOR, + MN_WIDGET_ID_MAX };