diff --git a/data/satellites.xml b/data/satellites.xml
index 79d7318a1..4e23f57fc 100755
--- a/data/satellites.xml
+++ b/data/satellites.xml
@@ -1375,12 +1375,12 @@
-
+
-
+
@@ -1560,6 +1560,7 @@
+
@@ -1601,7 +1602,6 @@
-
diff --git a/src/gui/miscsettings_menu.cpp b/src/gui/miscsettings_menu.cpp
index bc05e028c..409d0ddd4 100644
--- a/src/gui/miscsettings_menu.cpp
+++ b/src/gui/miscsettings_menu.cpp
@@ -281,8 +281,10 @@ void CMiscMenue::showMiscSettingsMenuEnergy(CMenuWidget *ms_energy)
CStringInput * miscSettings_shutdown_count = new CStringInput(LOCALE_MISCSETTINGS_SHUTDOWN_COUNT, g_settings.shutdown_count, 3, LOCALE_MISCSETTINGS_SHUTDOWN_COUNT_HINT1, LOCALE_MISCSETTINGS_SHUTDOWN_COUNT_HINT2, "0123456789 ");
CMenuForwarder *m2 = new CMenuDForwarder(LOCALE_MISCSETTINGS_SHUTDOWN_COUNT, !g_settings.shutdown_real, g_settings.shutdown_count, miscSettings_shutdown_count);
m2->setHint("", LOCALE_MENU_HINT_SHUTDOWN_COUNT);
-
- miscNotifier = new CMiscNotifier( m1, m2 );
+
+ miscNotifier = new COnOffNotifier(1);
+ miscNotifier->addItem(m1);
+ miscNotifier->addItem(m2);
CMenuOptionChooser * mc = new CMenuOptionChooser(LOCALE_MISCSETTINGS_SHUTDOWN_REAL, &g_settings.shutdown_real, OPTIONS_OFF1_ON0_OPTIONS, OPTIONS_OFF1_ON0_OPTION_COUNT, true, miscNotifier);
mc->setHint("", LOCALE_MENU_HINT_SHUTDOWN_REAL);
diff --git a/src/gui/miscsettings_menu.h b/src/gui/miscsettings_menu.h
index 84e4e72b5..b05d0c68a 100644
--- a/src/gui/miscsettings_menu.h
+++ b/src/gui/miscsettings_menu.h
@@ -40,7 +40,7 @@ class CMiscMenue : public CMenuTarget
private:
CFanControlNotifier *fanNotifier;
CSectionsdConfigNotifier* sectionsdConfigNotifier;
- CMiscNotifier* miscNotifier;
+ COnOffNotifier* miscNotifier;
int width;
diff --git a/src/gui/moviebrowser.cpp b/src/gui/moviebrowser.cpp
index b7fa267e8..b651122ee 100644
--- a/src/gui/moviebrowser.cpp
+++ b/src/gui/moviebrowser.cpp
@@ -2977,7 +2977,8 @@ bool CMovieBrowser::showMenu(MI_MOVIE_INFO* /*movie_info*/)
{
dirInput[i] = new CFileChooser(&m_settings.storageDir[i]);
forwarder[i] = new CMenuForwarder(LOCALE_MOVIEBROWSER_DIR, m_settings.storageDirUsed[i], m_settings.storageDir[i], dirInput[i]);
- notifier[i] = new COnOffNotifier(forwarder[i]);
+ notifier[i] = new COnOffNotifier();
+ notifier[i]->addItem(forwarder[i]);
chooser[i] = new CMenuOptionChooser(LOCALE_MOVIEBROWSER_USE_DIR , &m_settings.storageDirUsed[i] , MESSAGEBOX_YES_NO_OPTIONS, MESSAGEBOX_YES_NO_OPTIONS_COUNT, true,notifier[i]);
optionsMenuDir.addItem(chooser[i] );
optionsMenuDir.addItem(forwarder[i] );
diff --git a/src/gui/network_setup.cpp b/src/gui/network_setup.cpp
index f3f6083e2..461707d91 100644
--- a/src/gui/network_setup.cpp
+++ b/src/gui/network_setup.cpp
@@ -709,10 +709,14 @@ void CNetworkSetup::testNetworkSettings()
char our_gateway[16];
char our_nameserver[16];
- std::string text, testsite;
+ std::string text, testsite, offset = " ";
- //set default testdomain and wiki-IP
- std::string defaultsite = "www.google.de", wiki_IP = "89.31.143.1";
+ //set default testdomain
+ std::string defaultsite = "www.google.de";
+
+ //set wiki-URL and wiki-IP
+ std::string wiki_URL = "wiki.neutrino-hd.de";
+ std::string wiki_IP = "89.31.143.1";
//get www-domain testsite from /.version
CConfigFile config('\t');
@@ -746,7 +750,7 @@ void CNetworkSetup::testNetworkSettings()
printf("testNw Broadcast: %s\n", our_broadcast);
printf("testNw Gateway: %s\n", our_gateway);
printf("testNw Nameserver: %s\n", our_nameserver);
- printf("testNw Testsite %s\n", testsite.c_str());
+ printf("testNw Testsite: %s\n", testsite.c_str());
if (our_ip[0] == 0)
{
@@ -754,26 +758,24 @@ void CNetworkSetup::testNetworkSettings()
}
else
{
- text = "Box: " + old_mac_addr + "\n ";
- text += (std::string)our_ip + " " + (std::string)mypinghost(our_ip);
- text += "\n";
- text += g_Locale->getText(LOCALE_NETWORKMENU_GATEWAY);
- text += " (Router)\n ";
- text += (std::string)our_gateway + " " +(std::string)mypinghost(our_gateway);
- text += "\n";
- text += g_Locale->getText(LOCALE_NETWORKMENU_NAMESERVER);
- text += "\n ";
- text += (std::string)our_nameserver + " " + (std::string)mypinghost(our_nameserver);
- text += "\n";
- text += "wiki.neutrino-hd.de:\n ";
- text += "via IP (" + wiki_IP + "): " + (std::string)mypinghost(wiki_IP.c_str());
- text += ":\n ";
- if (1 == pinghost(our_nameserver))
+ //Box
+ text = "Box (" + old_mac_addr + "):\n";
+ text += offset + (std::string)our_ip + " " + (std::string)mypinghost(our_ip) + "\n";
+ //Gateway
+ text += (std::string)g_Locale->getText(LOCALE_NETWORKMENU_GATEWAY) + " (Router):\n";
+ text += offset + (std::string)our_gateway + " " + (std::string)mypinghost(our_gateway) + "\n";
+ //Nameserver
+ text += (std::string)g_Locale->getText(LOCALE_NETWORKMENU_NAMESERVER) + ":\n";
+ text += offset + (std::string)our_nameserver + " " + (std::string)mypinghost(our_nameserver) + "\n";
+ //Wiki
+ text += wiki_URL + ":\n";
+ text += offset + "via IP (" + wiki_IP + "): " + (std::string)mypinghost(wiki_IP.c_str()) + "\n";
+ if (pinghost(our_nameserver) == 1)
{
- text += "via DNS: " + (std::string)mypinghost("wiki.neutrino-hd.de");
- text += "\n";
- text += testsite + ":\n ";
- text += "via DNS: " + (std::string)mypinghost(testsite.c_str()) + ":\n";
+ text += offset + "via DNS: " + (std::string)mypinghost(wiki_URL.c_str()) + "\n";
+ //testsite (or defaultsite)
+ text += testsite + ":\n";
+ text += offset + "via DNS: " + (std::string)mypinghost(testsite.c_str()) + "\n";
}
}
diff --git a/src/gui/nfs.cpp b/src/gui/nfs.cpp
index 79122a775..3117fba73 100644
--- a/src/gui/nfs.cpp
+++ b/src/gui/nfs.cpp
@@ -51,37 +51,9 @@
#include
#include
#include
-
+#include
#include
-class CNFSMountGuiNotifier : public CChangeObserver
-{
-private:
- CMenuForwarder *m_opt1,*m_opt2, *m_user, *m_pass;
- int *m_type;
-public:
- CNFSMountGuiNotifier( CMenuForwarder* a3, CMenuForwarder* a4 , int* type)
- {
- m_user = a3;
- m_pass = a4;
- m_type = type;
- }
- bool changeNotify(const neutrino_locale_t /*OptionName*/, void *)
- {
- if(*m_type == (int)CFSMounter::NFS)
- {
- m_user->setActive (false);
- m_pass->setActive (false);
- }
- else
- {
- m_user->setActive (true);
- m_pass->setActive (true);
- }
- return true;
- }
-};
-
CNFSMountGui::CNFSMountGui()
{
// FIXME #warning move probing from exec() to fsmounter
@@ -149,10 +121,17 @@ int CNFSMountGui::exec( CMenuTarget* parent, const std::string & actionKey )
else if(actionKey.substr(0,7)=="domount")
{
int nr=atoi(actionKey.substr(7,1).c_str());
- CFSMounter::mount(g_settings.network_nfs_ip[nr].c_str(), g_settings.network_nfs_dir[nr],
+ CFSMounter::MountRes mres = CFSMounter::mount(
+ g_settings.network_nfs_ip[nr].c_str(), g_settings.network_nfs_dir[nr],
g_settings.network_nfs_local_dir[nr], (CFSMounter::FSType) g_settings.network_nfs_type[nr],
g_settings.network_nfs_username[nr], g_settings.network_nfs_password[nr],
g_settings.network_nfs_mount_options1[nr], g_settings.network_nfs_mount_options2[nr]);
+
+ if (mres == CFSMounter::MRES_OK || mres == CFSMounter::MRES_FS_ALREADY_MOUNTED)
+ mountMenuEntry[nr]->iconName = NEUTRINO_ICON_MOUNTED;
+ else
+ mountMenuEntry[nr]->iconName = NEUTRINO_ICON_NOT_MOUNTED;
+
// TODO show msg in case of error
returnval = menu_return::RETURN_EXIT;
}
@@ -176,15 +155,16 @@ int CNFSMountGui::menu()
{
sprintf(s2,"mountentry%d",i);
sprintf(ISO_8859_1_entry[i],ZapitTools::UTF8_to_Latin1(m_entry[i]).c_str());
- CMenuForwarderNonLocalized *forwarder = new CMenuForwarderNonLocalized(ISO_8859_1_entry[i], true, NULL, this, s2);
+ mountMenuEntry[i] = new CMenuForwarderNonLocalized("", true, ISO_8859_1_entry[i], this, s2);
+
if (CFSMounter::isMounted(g_settings.network_nfs_local_dir[i]))
{
- forwarder->iconName = NEUTRINO_ICON_MOUNTED;
+ mountMenuEntry[i]->iconName = NEUTRINO_ICON_MOUNTED;
} else
{
- forwarder->iconName = NEUTRINO_ICON_NOT_MOUNTED;
+ mountMenuEntry[i]->iconName = NEUTRINO_ICON_NOT_MOUNTED;
}
- mountMenuW.addItem(forwarder);
+ mountMenuW.addItem(mountMenuEntry[i]);
}
int ret=mountMenuW.exec(this,"");
return ret;
@@ -251,13 +231,16 @@ int CNFSMountGui::menuEntry(int nr)
CStringInputSMS options2Input(LOCALE_NFS_MOUNT_OPTIONS, options2, 30, NONEXISTANT_LOCALE, NONEXISTANT_LOCALE, "abcdefghijklmnopqrstuvwxyz0123456789-_=.,:|!?/ ");
CMenuForwarder *options2_fwd = new CMenuForwarder(LOCALE_NFS_MOUNT_OPTIONS, true, options2, &options2Input);
CStringInputSMS userInput(LOCALE_NFS_USERNAME, username, 30, NONEXISTANT_LOCALE, NONEXISTANT_LOCALE, "abcdefghijklmnopqrstuvwxyz0123456789-_.,:|!?/ ");
- CMenuForwarder *username_fwd = new CMenuForwarder(LOCALE_NFS_USERNAME, (*type==CFSMounter::CIFS || CFSMounter::LUFS), username, &userInput);
+ CMenuForwarder *username_fwd = new CMenuForwarder(LOCALE_NFS_USERNAME, (*type != (int)CFSMounter::NFS), username, &userInput);
CStringInputSMS passInput(LOCALE_NFS_PASSWORD, password, 30, NONEXISTANT_LOCALE, NONEXISTANT_LOCALE, "abcdefghijklmnopqrstuvwxyz0123456789-_.,:|!?/ ");
- CMenuForwarder *password_fwd = new CMenuForwarder(LOCALE_NFS_PASSWORD, (*type==CFSMounter::CIFS || CFSMounter::LUFS), NULL, &passInput);
+ CMenuForwarder *password_fwd = new CMenuForwarder(LOCALE_NFS_PASSWORD, (*type != (int)CFSMounter::NFS), NULL, &passInput);
CMACInput macInput(LOCALE_RECORDINGMENU_SERVER_MAC, g_settings.network_nfs_mac[nr], LOCALE_IPSETUP_HINT_1, LOCALE_IPSETUP_HINT_2);
CMenuForwarder * macInput_fwd = new CMenuForwarder(LOCALE_RECORDINGMENU_SERVER_MAC, true, g_settings.network_nfs_mac[nr], &macInput);
-
- CNFSMountGuiNotifier notifier(username_fwd, password_fwd, type);
+ CMenuForwarder *mountnow_fwd = new CMenuForwarder(LOCALE_NFS_MOUNTNOW, !(CFSMounter::isMounted(g_settings.network_nfs_local_dir[nr])), NULL, this, cmd);
+ mountnow_fwd->setItemButton(NEUTRINO_ICON_BUTTON_OKAY, true);
+ COnOffNotifier notifier(CFSMounter::NFS);
+ notifier.addItem(username_fwd);
+ notifier.addItem(password_fwd);
mountMenuEntryW.addItem(new CMenuOptionChooser(LOCALE_NFS_TYPE, type, NFS_TYPE_OPTIONS, NFS_TYPE_OPTION_COUNT, typeEnabled, ¬ifier));
mountMenuEntryW.addItem(new CMenuForwarder(LOCALE_NFS_IP , true, g_settings.network_nfs_ip[nr], &ipInput ));
@@ -269,7 +252,7 @@ int CNFSMountGui::menuEntry(int nr)
mountMenuEntryW.addItem(username_fwd);
mountMenuEntryW.addItem(password_fwd);
mountMenuEntryW.addItem(macInput_fwd);
- mountMenuEntryW.addItem(new CMenuForwarder(LOCALE_NFS_MOUNTNOW, true, NULL , this , cmd ));
+ mountMenuEntryW.addItem(mountnow_fwd);
int ret = mountMenuEntryW.exec(this,"");
return ret;
@@ -333,8 +316,10 @@ int CNFSSmallMenu::exec( CMenuTarget* parent, const std::string & actionKey )
CMenuWidget sm_menu(LOCALE_NFSMENU_HEAD, NEUTRINO_ICON_NETWORK, width);
CNFSMountGui mountGui;
CNFSUmountGui umountGui;
+ CMenuForwarder *remount_fwd = new CMenuForwarder(LOCALE_NFS_REMOUNT, true, NULL, this, "remount");
+ remount_fwd->setItemButton(NEUTRINO_ICON_BUTTON_OKAY, true);
sm_menu.addIntroItems();
- sm_menu.addItem(new CMenuForwarder(LOCALE_NFS_REMOUNT, true, NULL, this, "remount"));
+ sm_menu.addItem(remount_fwd);
sm_menu.addItem(new CMenuForwarder(LOCALE_NFS_MOUNT , true, NULL, & mountGui));
sm_menu.addItem(new CMenuForwarder(LOCALE_NFS_UMOUNT, true, NULL, &umountGui));
return sm_menu.exec(parent, actionKey);
diff --git a/src/gui/nfs.h b/src/gui/nfs.h
index ad5e77063..46d4469ae 100644
--- a/src/gui/nfs.h
+++ b/src/gui/nfs.h
@@ -46,7 +46,9 @@ class CNFSMountGui : public CMenuTarget
int menuEntry(int nr);
char m_entry[NETWORK_NFS_NR_OF_ENTRIES][200];
- char ISO_8859_1_entry[NETWORK_NFS_NR_OF_ENTRIES][200];
+ char ISO_8859_1_entry[NETWORK_NFS_NR_OF_ENTRIES][200];
+
+ CMenuForwarderNonLocalized* mountMenuEntry[NETWORK_NFS_NR_OF_ENTRIES];
CFSMounter::FS_Support m_nfs_sup;
CFSMounter::FS_Support m_cifs_sup;
diff --git a/src/gui/osd_setup.h b/src/gui/osd_setup.h
index 99db7df0f..e62f6f793 100644
--- a/src/gui/osd_setup.h
+++ b/src/gui/osd_setup.h
@@ -90,15 +90,4 @@ class COsdSetup : public CMenuTarget, public CChangeObserver
int showContextChanlistMenu();
};
-
-class COsdSetupChannelLogoNotifier : public CChangeObserver
-{
- private:
- CMenuForwarder* toDisable1;
- CMenuOptionChooser* toDisable2;
- public:
- COsdSetupChannelLogoNotifier( CMenuForwarder*, CMenuOptionChooser* );
- bool changeNotify(const neutrino_locale_t, void * Data);
-};
-
#endif
diff --git a/src/system/setting_helpers.cpp b/src/system/setting_helpers.cpp
index 677b696f9..b93cbb0d1 100644
--- a/src/system/setting_helpers.cpp
+++ b/src/system/setting_helpers.cpp
@@ -88,43 +88,24 @@ extern cDemux *pcrDemux;
extern "C" int pinghost( const char *hostname );
-// gui/moviebrowser.cpp
-COnOffNotifier::COnOffNotifier( CMenuItem* a1,CMenuItem* a2,CMenuItem* a3,CMenuItem* a4,CMenuItem* a5)
+COnOffNotifier::COnOffNotifier(int OffValue)
{
- number = 0;
- if(a1 != NULL){ toDisable[0] =a1;number++;};
- if(a2 != NULL){ toDisable[1] =a2;number++;};
- if(a3 != NULL){ toDisable[2] =a3;number++;};
- if(a4 != NULL){ toDisable[3] =a4;number++;};
- if(a5 != NULL){ toDisable[4] =a5;number++;};
+ offValue = OffValue;
}
bool COnOffNotifier::changeNotify(const neutrino_locale_t, void *Data)
{
- if(*(int*)(Data) == 0)
- {
- for (int i=0; isetActive(false);
- }
- else
- {
- for (int i=0; isetActive(true);
- }
- return false;
+ bool active = (*(int*)(Data) != offValue);
+
+ for (std::vector::iterator it = toDisable.begin(); it != toDisable.end(); it++)
+ (*it)->setActive(active);
+
+ return false;
}
-//used in gui/miscsettings_menu.cpp
-CMiscNotifier::CMiscNotifier( CMenuItem* i1, CMenuItem* i2)
+void COnOffNotifier::addItem(CMenuItem* menuItem)
{
- toDisable[0]=i1;
- toDisable[1]=i2;
-}
-bool CMiscNotifier::changeNotify(const neutrino_locale_t, void *)
-{
- toDisable[0]->setActive(!g_settings.shutdown_real);
- toDisable[1]->setActive(!g_settings.shutdown_real);
- return false;
+ toDisable.push_back(menuItem);
}
bool CSectionsdConfigNotifier::changeNotify(const neutrino_locale_t, void *)
diff --git a/src/system/setting_helpers.h b/src/system/setting_helpers.h
index a8eda16bc..22d0b27c9 100644
--- a/src/system/setting_helpers.h
+++ b/src/system/setting_helpers.h
@@ -55,22 +55,16 @@ class CGenericMenuActivate
};
class COnOffNotifier : public CChangeObserver
-{
- private:
- int number;
- CMenuItem* toDisable[5];
- public:
- COnOffNotifier (CMenuItem* a1,CMenuItem* a2 = NULL,CMenuItem* a3 = NULL,CMenuItem* a4 = NULL,CMenuItem* a5 = NULL);
- bool changeNotify(const neutrino_locale_t, void *Data);
-};
-
-class CMiscNotifier : public CChangeObserver
{
private:
- CMenuItem* toDisable[2];
+ int offValue;
+ std::vector toDisable;
+
public:
- CMiscNotifier( CMenuItem*, CMenuItem* );
- bool changeNotify(const neutrino_locale_t, void *);
+ COnOffNotifier(int OffValue = 0);
+ bool changeNotify(const neutrino_locale_t, void *Data);
+
+ void addItem(CMenuItem* menuItem);
};
class CSectionsdConfigNotifier : public CChangeObserver