Merge remote-tracking branch 'check/next-cc'

Lightly tested only...
This commit is contained in:
Stefan Seyfried
2013-12-25 22:51:23 +01:00
90 changed files with 1583 additions and 1578 deletions

View File

@@ -34,6 +34,7 @@
#include <mymenu.h>
#include <neutrino_menue.h>
#include <system/setting_helpers.h>
#include <system/helpers.h>
#include <gui/miscsettings_menu.h>
#include <gui/cec_setup.h>
@@ -252,7 +253,7 @@ int CMiscMenue::showMiscSettingsMenu()
if (!g_info.hw_caps->can_shutdown) {
/* we don't have the energy menu, but put the sleeptimer directly here */
mf = new CMenuDForwarder(LOCALE_MISCSETTINGS_SLEEPTIMER, true, g_settings.shutdown_min, new CSleepTimerWidget, "permanent", CRCInput::RC_1);
mf = new CMenuDForwarder(LOCALE_MISCSETTINGS_SLEEPTIMER, true, NULL, new CSleepTimerWidget, "permanent", CRCInput::RC_1);
mf->setHint("", LOCALE_MENU_HINT_INACT_TIMER);
misc_menue.addItem(mf);
}
@@ -275,6 +276,12 @@ int CMiscMenue::showMiscSettingsMenu()
#endif /*CPU_FREQ*/
int res = misc_menue.exec(NULL, "");
g_settings.epg_cache = atoi(epg_cache.c_str());
g_settings.epg_extendedcache = atoi(epg_extendedcache.c_str());
g_settings.epg_old_events = atoi(epg_old_events.c_str());
g_settings.epg_max_events = atoi(epg_max_events.c_str());
delete fanNotifier;
delete sectionsdConfigNotifier;
#if 0
@@ -339,8 +346,11 @@ int CMiscMenue::showMiscSettingsMenuEnergy()
CMenuOptionChooser *m1 = new CMenuOptionChooser(LOCALE_MISCSETTINGS_SHUTDOWN_REAL_RCDELAY, &g_settings.shutdown_real_rcdelay, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, !g_settings.shutdown_real);
m1->setHint("", LOCALE_MENU_HINT_SHUTDOWN_RCDELAY);
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);
std::string shutdown_count = to_string(g_settings.shutdown_count);
if (shutdown_count.length() < 3)
shutdown_count.insert(0, 3 - shutdown_count.length(), ' ');
CStringInput * miscSettings_shutdown_count = new CStringInput(LOCALE_MISCSETTINGS_SHUTDOWN_COUNT, &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, shutdown_count.c_str(), miscSettings_shutdown_count);
m2->setHint("", LOCALE_MENU_HINT_SHUTDOWN_COUNT);
COnOffNotifier * miscNotifier = new COnOffNotifier(1);
@@ -354,7 +364,7 @@ int CMiscMenue::showMiscSettingsMenuEnergy()
ms_energy->addItem(m1);
ms_energy->addItem(m2);
m2 = new CMenuDForwarder(LOCALE_MISCSETTINGS_SLEEPTIMER, true, g_settings.shutdown_min, new CSleepTimerWidget, "permanent");
m2 = new CMenuDForwarder(LOCALE_MISCSETTINGS_SLEEPTIMER, true, NULL, new CSleepTimerWidget, "permanent");
m2->setHint("", LOCALE_MENU_HINT_INACT_TIMER);
ms_energy->addItem(m2);
@@ -369,6 +379,9 @@ int CMiscMenue::showMiscSettingsMenuEnergy()
}
int res = ms_energy->exec(NULL, "");
g_settings.shutdown_count = atoi(shutdown_count.c_str());
delete ms_energy;
delete miscNotifier;
return res;
@@ -383,20 +396,32 @@ void CMiscMenue::showMiscSettingsMenuEpg(CMenuWidget *ms_epg)
CMenuOptionChooser * mc1 = new CMenuOptionChooser(LOCALE_MISCSETTINGS_EPG_SAVE_STANDBY, &g_settings.epg_save_standby, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, g_settings.epg_save);
mc1->setHint("", LOCALE_MENU_HINT_EPG_SAVE_STANDBY);
CStringInput * miscSettings_epg_cache = new CStringInput(LOCALE_MISCSETTINGS_EPG_CACHE, &g_settings.epg_cache, 2,LOCALE_MISCSETTINGS_EPG_CACHE_HINT1, LOCALE_MISCSETTINGS_EPG_CACHE_HINT2 , "0123456789 ", sectionsdConfigNotifier);
CMenuForwarder * mf = new CMenuDForwarder(LOCALE_MISCSETTINGS_EPG_CACHE, true, g_settings.epg_cache, miscSettings_epg_cache);
epg_cache = to_string(g_settings.epg_cache);
if (epg_cache.length() < 2)
epg_cache.insert(0, 2 - epg_cache.length(), ' ');
CStringInput * miscSettings_epg_cache = new CStringInput(LOCALE_MISCSETTINGS_EPG_CACHE, &epg_cache, 2,LOCALE_MISCSETTINGS_EPG_CACHE_HINT1, LOCALE_MISCSETTINGS_EPG_CACHE_HINT2 , "0123456789 ", sectionsdConfigNotifier);
CMenuForwarder * mf = new CMenuDForwarder(LOCALE_MISCSETTINGS_EPG_CACHE, true, NULL, miscSettings_epg_cache);
mf->setHint("", LOCALE_MENU_HINT_EPG_CACHE);
CStringInput * miscSettings_epg_cache_e = new CStringInput(LOCALE_MISCSETTINGS_EPG_EXTENDEDCACHE, &g_settings.epg_extendedcache, 3,LOCALE_MISCSETTINGS_EPG_EXTENDEDCACHE_HINT1, LOCALE_MISCSETTINGS_EPG_EXTENDEDCACHE_HINT2 , "0123456789 ", sectionsdConfigNotifier);
CMenuForwarder * mf1 = new CMenuDForwarder(LOCALE_MISCSETTINGS_EPG_EXTENDEDCACHE, true, g_settings.epg_extendedcache, miscSettings_epg_cache_e);
epg_extendedcache = to_string(g_settings.epg_extendedcache);
if (epg_extendedcache.length() < 3)
epg_extendedcache.insert(0, 3 - epg_extendedcache.length(), ' ');
CStringInput * miscSettings_epg_cache_e = new CStringInput(LOCALE_MISCSETTINGS_EPG_EXTENDEDCACHE, &epg_extendedcache, 3,LOCALE_MISCSETTINGS_EPG_EXTENDEDCACHE_HINT1, LOCALE_MISCSETTINGS_EPG_EXTENDEDCACHE_HINT2 , "0123456789 ", sectionsdConfigNotifier);
CMenuForwarder * mf1 = new CMenuDForwarder(LOCALE_MISCSETTINGS_EPG_EXTENDEDCACHE, true, epg_extendedcache.c_str(), miscSettings_epg_cache_e);
mf1->setHint("", LOCALE_MENU_HINT_EPG_EXTENDEDCACHE);
CStringInput * miscSettings_epg_old_events = new CStringInput(LOCALE_MISCSETTINGS_EPG_OLD_EVENTS, &g_settings.epg_old_events, 3,LOCALE_MISCSETTINGS_EPG_OLD_EVENTS_HINT1, LOCALE_MISCSETTINGS_EPG_OLD_EVENTS_HINT2 , "0123456789 ", sectionsdConfigNotifier);
CMenuForwarder * mf2 = new CMenuDForwarder(LOCALE_MISCSETTINGS_EPG_OLD_EVENTS, true, g_settings.epg_old_events, miscSettings_epg_old_events);
epg_old_events = to_string(g_settings.epg_old_events);
if (epg_old_events.length() < 3)
epg_old_events.insert(0, 3 - epg_old_events.length(), ' ');
CStringInput * miscSettings_epg_old_events = new CStringInput(LOCALE_MISCSETTINGS_EPG_OLD_EVENTS, &epg_old_events, 3,LOCALE_MISCSETTINGS_EPG_OLD_EVENTS_HINT1, LOCALE_MISCSETTINGS_EPG_OLD_EVENTS_HINT2 , "0123456789 ", sectionsdConfigNotifier);
CMenuForwarder * mf2 = new CMenuDForwarder(LOCALE_MISCSETTINGS_EPG_OLD_EVENTS, true, epg_old_events.c_str(), miscSettings_epg_old_events);
mf2->setHint("", LOCALE_MENU_HINT_EPG_OLD_EVENTS);
CStringInput * miscSettings_epg_max_events = new CStringInput(LOCALE_MISCSETTINGS_EPG_MAX_EVENTS, &g_settings.epg_max_events, 6,LOCALE_MISCSETTINGS_EPG_MAX_EVENTS_HINT1, LOCALE_MISCSETTINGS_EPG_MAX_EVENTS_HINT2 , "0123456789 ", sectionsdConfigNotifier);
CMenuForwarder * mf3 = new CMenuDForwarder(LOCALE_MISCSETTINGS_EPG_MAX_EVENTS, true, g_settings.epg_max_events, miscSettings_epg_max_events);
epg_max_events = to_string(g_settings.epg_max_events);
if (epg_max_events.length() < 6)
epg_max_events.insert(0, 6 - epg_max_events.length(), ' ');
CStringInput * miscSettings_epg_max_events = new CStringInput(LOCALE_MISCSETTINGS_EPG_MAX_EVENTS, &epg_max_events, 6,LOCALE_MISCSETTINGS_EPG_MAX_EVENTS_HINT1, LOCALE_MISCSETTINGS_EPG_MAX_EVENTS_HINT2 , "0123456789 ", sectionsdConfigNotifier);
CMenuForwarder * mf3 = new CMenuDForwarder(LOCALE_MISCSETTINGS_EPG_MAX_EVENTS, true, epg_max_events.c_str(), miscSettings_epg_max_events);
mf3->setHint("", LOCALE_MENU_HINT_EPG_MAX_EVENTS);
CMenuForwarder * mf4 = new CMenuForwarder(LOCALE_MISCSETTINGS_EPG_DIR, g_settings.epg_save, g_settings.epg_dir, this, "epgdir");