From c483018bf68ce74c09c61ffa3d7e0cc684e850a8 Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Mon, 8 Dec 2014 12:24:08 +0100 Subject: [PATCH] CNetworkServiceSetup: use widget id instead explicit select method neutrino_menue.h: add ID for network service menue Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/3599a4246f17dbe0229da3019ce4fee21d5b7036 Author: Thilo Graf Date: 2014-12-08 (Mon, 08 Dec 2014) ------------------ This commit was generated by Migit --- src/gui/network_service.cpp | 6 +++--- src/neutrino_menue.h | 3 +++ 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/gui/network_service.cpp b/src/gui/network_service.cpp index d7a0ed648..dcfc50111 100644 --- a/src/gui/network_service.cpp +++ b/src/gui/network_service.cpp @@ -140,8 +140,8 @@ int CNetworkServiceSetup::showNetworkServiceSetup() { int shortcut = 1; - CMenuWidget* setup = new CMenuWidget(LOCALE_MAINSETTINGS_NETWORK, NEUTRINO_ICON_SETTINGS, width); - setup->setSelected(selected); + CMenuWidget* setup = new CMenuWidget(LOCALE_MAINSETTINGS_NETWORK, NEUTRINO_ICON_SETTINGS, width, MN_WIDGET_ID_NETWORKSETUP_SERVICES); + setup->addIntroItems(LOCALE_NETWORKMENU_SERVICES); CNetworkService * items[SERVICE_COUNT]; @@ -194,7 +194,7 @@ int CNetworkServiceSetup::showNetworkServiceSetup() } int res = setup->exec (NULL, ""); - selected = setup->getSelected(); + delete setup; for(unsigned i = 0; i < SERVICE_COUNT; i++) diff --git a/src/neutrino_menue.h b/src/neutrino_menue.h index cb261abab..1318d7402 100644 --- a/src/neutrino_menue.h +++ b/src/neutrino_menue.h @@ -185,6 +185,9 @@ enum MN_WIDGET_ID MN_WIDGET_ID_TESTMENU_HARDWARE, MN_WIDGET_ID_TESTMENU_COMPONENTS, + //network services + MN_WIDGET_ID_NETWORKSETUP_SERVICES, + MN_WIDGET_ID_MAX };