Merge branch 'dvbsi++' of coolstreamtech.de:cst-public-gui-neutrino into dvbsi++

This commit is contained in:
[CST] Focus
2012-10-11 18:03:04 +04:00
10 changed files with 80 additions and 124 deletions

View File

@@ -1375,12 +1375,12 @@
<transponder frequency="10853000" symbol_rate="29900000" polarization="0" fec_inner="4" system="0" modulation="1"/>
<transponder frequency="10873000" symbol_rate="27500000" polarization="1" fec_inner="3" system="0" modulation="1"/>
<transponder frequency="10892000" symbol_rate="27500000" polarization="0" fec_inner="3" system="0" modulation="1"/>
<transponder frequency="10911000" symbol_rate="27500000" polarization="1" fec_inner="3" system="1" modulation="2"/>
<transponder frequency="10911000" symbol_rate="29900000" polarization="1" fec_inner="5" system="0" modulation="1"/>
<transponder frequency="10930000" symbol_rate="29900000" polarization="0" fec_inner="3" system="0" modulation="1"/>
<transponder frequency="10949000" symbol_rate="27500000" polarization="1" fec_inner="3" system="0" modulation="1"/>
<transponder frequency="10971000" symbol_rate="29700000" polarization="0" fec_inner="2" system="1" modulation="2"/>
<transponder frequency="10992000" symbol_rate="27500000" polarization="1" fec_inner="2" system="0" modulation="1"/>
<transponder frequency="11013000" symbol_rate="29900000" polarization="0" fec_inner="3" system="0" modulation="1"/>
<transponder frequency="11013000" symbol_rate="27500000" polarization="0" fec_inner="2" system="1" modulation="2"/>
<transponder frequency="11034000" symbol_rate="27500000" polarization="1" fec_inner="3" system="0" modulation="1"/>
<transponder frequency="11054000" symbol_rate="27500000" polarization="0" fec_inner="4" system="0" modulation="1"/>
<transponder frequency="11075000" symbol_rate="27500000" polarization="1" fec_inner="3" system="0" modulation="1"/>
@@ -1560,6 +1560,7 @@
<transponder frequency="10758000" symbol_rate="22000000" polarization="1" fec_inner="4" system="0" modulation="1"/>
<transponder frequency="10773000" symbol_rate="22000000" polarization="0" fec_inner="3" system="1" modulation="2"/>
<transponder frequency="10788000" symbol_rate="22000000" polarization="1" fec_inner="4" system="0" modulation="1"/>
<transponder frequency="10802000" symbol_rate="22000000" polarization="0" fec_inner="3" system="1" modulation="2"/>
<transponder frequency="10817000" symbol_rate="22000000" polarization="1" fec_inner="2" system="1" modulation="2"/>
<transponder frequency="10832000" symbol_rate="22000000" polarization="0" fec_inner="2" system="1" modulation="2"/>
<transponder frequency="10847000" symbol_rate="22000000" polarization="1" fec_inner="4" system="0" modulation="1"/>
@@ -1601,7 +1602,6 @@
<transponder frequency="11611000" symbol_rate="22000000" polarization="0" fec_inner="4" system="0" modulation="1"/>
<transponder frequency="11626000" symbol_rate="22000000" polarization="1" fec_inner="2" system="1" modulation="2"/>
<transponder frequency="11641000" symbol_rate="22000000" polarization="0" fec_inner="3" system="1" modulation="2"/>
<transponder frequency="11656000" symbol_rate="22000000" polarization="1" fec_inner="4" system="0" modulation="1"/>
<transponder frequency="11670000" symbol_rate="22000000" polarization="0" fec_inner="2" system="1" modulation="2"/>
<transponder frequency="11685000" symbol_rate="22000000" polarization="1" fec_inner="4" system="0" modulation="1"/>
<transponder frequency="11719000" symbol_rate="27500000" polarization="0" fec_inner="3" system="0" modulation="1"/>

View File

@@ -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);

View File

@@ -40,7 +40,7 @@ class CMiscMenue : public CMenuTarget
private:
CFanControlNotifier *fanNotifier;
CSectionsdConfigNotifier* sectionsdConfigNotifier;
CMiscNotifier* miscNotifier;
COnOffNotifier* miscNotifier;
int width;

View File

@@ -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] );

View File

@@ -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";
}
}

View File

@@ -51,37 +51,9 @@
#include <pthread.h>
#include <sys/mount.h>
#include <unistd.h>
#include <neutrino.h>
#include <zapit/client/zapittools.h>
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, &notifier));
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);

View File

@@ -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;

View File

@@ -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

View File

@@ -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; i<number ; i++)
toDisable[i]->setActive(false);
}
else
{
for (int i=0; i<number ; i++)
toDisable[i]->setActive(true);
}
return false;
bool active = (*(int*)(Data) != offValue);
for (std::vector<CMenuItem*>::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 *)

View File

@@ -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<CMenuItem*> 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