*neutrino network_setup: remember last selected item

git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@1001 e54a6e83-5905-42d5-8d5c-058d10e6a962
This commit is contained in:
thilo
2011-01-08 14:32:01 +00:00
parent 4b00228c11
commit 5ac86a6de4
2 changed files with 4 additions and 1 deletions

View File

@@ -62,6 +62,7 @@ CNetworkSetup::CNetworkSetup(bool wizard_mode)
hheight = g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->getHeight(); hheight = g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->getHeight();
mheight = g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getHeight(); mheight = g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getHeight();
height = hheight+13*mheight+ 10; height = hheight+13*mheight+ 10;
selected = -1;
x = getScreenStartX (width); x = getScreenStartX (width);
y = getScreenStartY (height); y = getScreenStartY (height);
@@ -168,6 +169,7 @@ void CNetworkSetup::showNetworkSetup()
//menue init //menue init
CMenuWidget* networkSettings = new CMenuWidget(LOCALE_MAINSETTINGS_HEAD, NEUTRINO_ICON_SETTINGS, width); CMenuWidget* networkSettings = new CMenuWidget(LOCALE_MAINSETTINGS_HEAD, NEUTRINO_ICON_SETTINGS, width);
networkSettings->setWizardMode(is_wizard); networkSettings->setWizardMode(is_wizard);
networkSettings->setSelected(selected);
//apply button //apply button
CMenuForwarder *m0 = new CMenuForwarder(LOCALE_NETWORKMENU_SETUPNOW, true, NULL, this, "networkapply", CRCInput::RC_red, NEUTRINO_ICON_BUTTON_RED); CMenuForwarder *m0 = new CMenuForwarder(LOCALE_NETWORKMENU_SETUPNOW, true, NULL, this, "networkapply", CRCInput::RC_red, NEUTRINO_ICON_BUTTON_RED);
@@ -246,6 +248,7 @@ void CNetworkSetup::showNetworkSetup()
networkSettings->exec(NULL, ""); networkSettings->exec(NULL, "");
networkSettings->hide(); networkSettings->hide();
selected = networkSettings->getSelected();
delete networkSettings; delete networkSettings;
// Check for changes // Check for changes

View File

@@ -48,7 +48,7 @@ class CNetworkSetup : public CMenuTarget, CChangeObserver
CFrameBuffer *frameBuffer; CFrameBuffer *frameBuffer;
CNetworkConfig *networkConfig; CNetworkConfig *networkConfig;
int x, y, width, height, hheight, mheight; int x, y, width, height, hheight, mheight, selected;
bool is_wizard; bool is_wizard;