mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-28 07:51:19 +02:00
as requested, implement 'easy' menu mode for novice users;
default behavior should not be changed, easy mode forced by /var/etc/.easymenu file inside image; at the moment switch between modes is done by main menu -> 'stop' button -> enter pin code, restart needed after mode switch
This commit is contained in:
@@ -306,10 +306,10 @@ int CNetworkSetup::showNetworkSetup()
|
||||
//------------------------------------------------
|
||||
networkSettings->addItem( m4); //gateway
|
||||
networkSettings->addItem( m5); //nameserver
|
||||
networkSettings->addItem(GenericMenuSeparatorLine);
|
||||
//------------------------------------------------
|
||||
if(ifcount > 1) // if there is only one, its probably wired
|
||||
{
|
||||
networkSettings->addItem(GenericMenuSeparatorLine);
|
||||
//ssid
|
||||
CStringInputSMS * networkSettings_ssid = new CStringInputSMS(LOCALE_NETWORKMENU_SSID, &network_ssid, 30, NONEXISTANT_LOCALE, NONEXISTANT_LOCALE, "abcdefghijklmnopqrstuvwxyz0123456789 -_/()<>=+.,:!?\\'");
|
||||
//key
|
||||
@@ -325,38 +325,45 @@ int CNetworkSetup::showNetworkSetup()
|
||||
|
||||
networkSettings->addItem( m9); //ssid
|
||||
networkSettings->addItem( m10); //key
|
||||
networkSettings->addItem(GenericMenuSeparatorLine);
|
||||
if (!g_settings.easymenu)
|
||||
networkSettings->addItem(GenericMenuSeparatorLine);
|
||||
}
|
||||
//------------------------------------------------
|
||||
//ntp submenu
|
||||
sectionsdConfigNotifier = new CSectionsdConfigNotifier;
|
||||
sectionsdConfigNotifier = NULL;
|
||||
CMenuWidget ntp(LOCALE_MAINSETTINGS_NETWORK, NEUTRINO_ICON_SETTINGS, width, MN_WIDGET_ID_NETWORKSETUP_NTP);
|
||||
mf = new CMenuForwarder(LOCALE_NETWORKMENU_NTPTITLE, true, NULL, &ntp, NULL, CRCInput::RC_yellow, NEUTRINO_ICON_BUTTON_YELLOW);
|
||||
mf->setHint("", LOCALE_MENU_HINT_NET_NTP);
|
||||
networkSettings->addItem(mf);
|
||||
#ifdef ENABLE_GUI_MOUNT
|
||||
CMenuWidget networkmounts(LOCALE_MAINSETTINGS_NETWORK, NEUTRINO_ICON_SETTINGS, width, MN_WIDGET_ID_NETWORKSETUP_MOUNTS);
|
||||
#endif
|
||||
CProxySetup proxy(LOCALE_MAINSETTINGS_NETWORK);
|
||||
CNetworkServiceSetup services;
|
||||
|
||||
showNetworkNTPSetup(&ntp);
|
||||
if (!g_settings.easymenu) {
|
||||
//ntp submenu
|
||||
sectionsdConfigNotifier = new CSectionsdConfigNotifier;
|
||||
mf = new CMenuForwarder(LOCALE_NETWORKMENU_NTPTITLE, true, NULL, &ntp, NULL, CRCInput::RC_yellow, NEUTRINO_ICON_BUTTON_YELLOW);
|
||||
mf->setHint("", LOCALE_MENU_HINT_NET_NTP);
|
||||
networkSettings->addItem(mf);
|
||||
|
||||
showNetworkNTPSetup(&ntp);
|
||||
|
||||
#ifdef ENABLE_GUI_MOUNT
|
||||
//nfs mount submenu
|
||||
CMenuWidget networkmounts(LOCALE_MAINSETTINGS_NETWORK, NEUTRINO_ICON_SETTINGS, width, MN_WIDGET_ID_NETWORKSETUP_MOUNTS);
|
||||
mf = new CMenuForwarder(LOCALE_NETWORKMENU_MOUNT, true, NULL, &networkmounts, NULL, CRCInput::RC_blue, NEUTRINO_ICON_BUTTON_BLUE);
|
||||
mf->setHint("", LOCALE_MENU_HINT_NET_MOUNT);
|
||||
networkSettings->addItem(mf);
|
||||
showNetworkNFSMounts(&networkmounts);
|
||||
//nfs mount submenu
|
||||
mf = new CMenuForwarder(LOCALE_NETWORKMENU_MOUNT, true, NULL, &networkmounts, NULL, CRCInput::RC_blue, NEUTRINO_ICON_BUTTON_BLUE);
|
||||
mf->setHint("", LOCALE_MENU_HINT_NET_MOUNT);
|
||||
networkSettings->addItem(mf);
|
||||
showNetworkNFSMounts(&networkmounts);
|
||||
#endif
|
||||
|
||||
//proxyserver submenu
|
||||
CProxySetup proxy(LOCALE_MAINSETTINGS_NETWORK);
|
||||
mf = new CMenuForwarder(LOCALE_FLASHUPDATE_PROXYSERVER_SEP, true, NULL, &proxy, NULL, CRCInput::RC_0, NEUTRINO_ICON_BUTTON_0);
|
||||
mf->setHint("", LOCALE_MENU_HINT_NET_PROXY);
|
||||
networkSettings->addItem(mf);
|
||||
//proxyserver submenu
|
||||
mf = new CMenuForwarder(LOCALE_FLASHUPDATE_PROXYSERVER_SEP, true, NULL, &proxy, NULL, CRCInput::RC_0, NEUTRINO_ICON_BUTTON_0);
|
||||
mf->setHint("", LOCALE_MENU_HINT_NET_PROXY);
|
||||
networkSettings->addItem(mf);
|
||||
|
||||
//services
|
||||
CNetworkServiceSetup services;
|
||||
mf = new CMenuForwarder(LOCALE_NETWORKMENU_SERVICES, true, NULL, &services, NULL, CRCInput::RC_1, NEUTRINO_ICON_BUTTON_1);
|
||||
mf->setHint("", LOCALE_MENU_HINT_NET_SERVICES);
|
||||
networkSettings->addItem(mf);
|
||||
//services
|
||||
mf = new CMenuForwarder(LOCALE_NETWORKMENU_SERVICES, true, NULL, &services, NULL, CRCInput::RC_1, NEUTRINO_ICON_BUTTON_1);
|
||||
mf->setHint("", LOCALE_MENU_HINT_NET_SERVICES);
|
||||
networkSettings->addItem(mf);
|
||||
}
|
||||
|
||||
int ret = 0;
|
||||
while(true) {
|
||||
|
Reference in New Issue
Block a user