diff --git a/src/gui/software_update.cpp b/src/gui/software_update.cpp index ba8989a23..9190cd719 100644 --- a/src/gui/software_update.cpp +++ b/src/gui/software_update.cpp @@ -37,6 +37,7 @@ #include #include +#include #include "software_update.h" #include "gui/filebrowser.h" @@ -49,7 +50,6 @@ CSoftwareUpdate::CSoftwareUpdate() { width = w_max (40, 10); - selected = -1; fe = new CFlashExpert(); input_url_file = new CStringInputSMS(LOCALE_FLASHUPDATE_URL_FILE, g_settings.softupdate_url_file, 30, NONEXISTANT_LOCALE, NONEXISTANT_LOCALE, "abcdefghijklmnopqrstuvwxyz0123456789!""�$%&/()=?-. "); } @@ -93,13 +93,12 @@ int CSoftwareUpdate::exec(CMenuTarget* parent, const std::string &actionKey) int CSoftwareUpdate::showSoftwareUpdate() /* shows the menue and options for software update */ { - CMenuWidget* softUpdate = new CMenuWidget(LOCALE_MAINMENU_SERVICE, NEUTRINO_ICON_UPDATE, width); - softUpdate->setSelected(selected); + CMenuWidget* softUpdate = new CMenuWidget(LOCALE_MAINMENU_SERVICE, NEUTRINO_ICON_UPDATE, width, MN_WIDGET_ID_SOFTWAREUPDATE); softUpdate->addIntroItems(LOCALE_SERVICEMENU_UPDATE); //expert-functions - CMenuWidget *mtdexpert = new CMenuWidget(LOCALE_FLASHUPDATE_EXPERTFUNCTIONS, NEUTRINO_ICON_UPDATE, width); + CMenuWidget *mtdexpert = new CMenuWidget(LOCALE_FLASHUPDATE_EXPERTFUNCTIONS, NEUTRINO_ICON_UPDATE, width, MN_WIDGET_ID_MTDEXPERT); showSoftwareUpdateExpert(mtdexpert); softUpdate->addItem(new CMenuForwarder(LOCALE_FLASHUPDATE_EXPERTFUNCTIONS, true, NULL, mtdexpert, "", CRCInput::RC_red, NEUTRINO_ICON_BUTTON_RED)); @@ -115,7 +114,6 @@ int CSoftwareUpdate::showSoftwareUpdate() int res = softUpdate->exec (NULL, ""); softUpdate->hide (); - selected = softUpdate->getSelected(); delete softUpdate; return res; } diff --git a/src/gui/software_update.h b/src/gui/software_update.h index 61f7bb147..814834761 100644 --- a/src/gui/software_update.h +++ b/src/gui/software_update.h @@ -41,7 +41,7 @@ class CSoftwareUpdate : public CMenuTarget { private: - int width, selected; + int width; int showSoftwareUpdate(); void showSoftwareUpdateExpert(CMenuWidget *mtd_expert); diff --git a/src/neutrino_menue.h b/src/neutrino_menue.h index febec9148..86c872082 100644 --- a/src/neutrino_menue.h +++ b/src/neutrino_menue.h @@ -149,6 +149,10 @@ enum MN_WIDGET_ID MN_WIDGET_ID_MTDWRITE_SELECTOR, MN_WIDGET_ID_FILESELECTOR, + //software update + MN_WIDGET_ID_SOFTWAREUPDATE, + MN_WIDGET_ID_MTDEXPERT, + MN_WIDGET_ID_MAX };