From ad3e9922dc83e7be3939b88589ffcf4472b5403f Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Wed, 28 Dec 2011 00:20:17 +0000 Subject: [PATCH] neutrino software_update: add widget id's this should fix remembering of last selected items in expert functions git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-beta@2020 e54a6e83-5905-42d5-8d5c-058d10e6a962 Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/b1e61206d958ec6f2917378ecb192d4b55f79083 Author: Thilo Graf Date: 2011-12-28 (Wed, 28 Dec 2011) Origin message was: ------------------ *neutrino software_update: add widget id's this should fix remembering of last selected items in expert functions git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-beta@2020 e54a6e83-5905-42d5-8d5c-058d10e6a962 --- src/gui/software_update.cpp | 8 +++----- src/gui/software_update.h | 2 +- src/neutrino_menue.h | 4 ++++ 3 files changed, 8 insertions(+), 6 deletions(-) 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 };