mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-28 16:01:20 +02:00
- sleeptimer: add possibilty to preset with a fixed value
This commit is contained in:
@@ -1116,6 +1116,7 @@ menu.hint_shutdown_count Die Zeit zum Herunterfahren in den Deep-Standby, wenn d
|
|||||||
menu.hint_shutdown_rcdelay Aktiviert den Deep-Standby, wenn die Power-Taste länger als 1 Sekunde betätigt wird
|
menu.hint_shutdown_rcdelay Aktiviert den Deep-Standby, wenn die Power-Taste länger als 1 Sekunde betätigt wird
|
||||||
menu.hint_shutdown_real Aktiviert den Standby-Modus. Ist diese Option deaktiviert, fährt die Box in den Deep-Standby
|
menu.hint_shutdown_real Aktiviert den Standby-Modus. Ist diese Option deaktiviert, fährt die Box in den Deep-Standby
|
||||||
menu.hint_sleeptimer Zeitschaltuhr auf Ihrer Box aktivieren\nDie Box fährt dann in den Standby-Modus
|
menu.hint_sleeptimer Zeitschaltuhr auf Ihrer Box aktivieren\nDie Box fährt dann in den Standby-Modus
|
||||||
|
menu.hint_sleeptimer_min Voreinstellung der Zeitschaltuhr auf Ihrer Box
|
||||||
menu.hint_soft_restart Neustarten von Neutrino-HD, ohne die Box neu zu starten
|
menu.hint_soft_restart Neustarten von Neutrino-HD, ohne die Box neu zu starten
|
||||||
menu.hint_softupdate_check Im Internet nach verfügbaren Updates suchen, herunterladen und installieren
|
menu.hint_softupdate_check Im Internet nach verfügbaren Updates suchen, herunterladen und installieren
|
||||||
menu.hint_softupdate_check_local Lokal nach verfügbaren Updates suchen und installieren
|
menu.hint_softupdate_check_local Lokal nach verfügbaren Updates suchen und installieren
|
||||||
@@ -1241,6 +1242,7 @@ miscsettings.shutdown_count_hint2 den Deep-Standby geschalten wird (0 = aus)
|
|||||||
miscsettings.shutdown_real Standbymodus
|
miscsettings.shutdown_real Standbymodus
|
||||||
miscsettings.shutdown_real_rcdelay Verzögertes Ausschalten
|
miscsettings.shutdown_real_rcdelay Verzögertes Ausschalten
|
||||||
miscsettings.sleeptimer Ausschalten nach Inaktivität
|
miscsettings.sleeptimer Ausschalten nach Inaktivität
|
||||||
|
miscsettings.sleeptimer_min Sleeptimer Vorgabe
|
||||||
miscsettings.volume Lautstärke
|
miscsettings.volume Lautstärke
|
||||||
miscsettings.zapto_pre_time Umschaltstart-Vorlaufzeit (Minuten)
|
miscsettings.zapto_pre_time Umschaltstart-Vorlaufzeit (Minuten)
|
||||||
motorcontrol.calc_positions Positionen (Neu)-Berechne(n))
|
motorcontrol.calc_positions Positionen (Neu)-Berechne(n))
|
||||||
@@ -1796,8 +1798,8 @@ settings.restore_warn Alle Settings werden ersetzt.\nDie Box wird neu gestartet.
|
|||||||
shutdown.recoding_query Aufnahme läuft. Trotzdem beenden?
|
shutdown.recoding_query Aufnahme läuft. Trotzdem beenden?
|
||||||
shutdowntimer.announce Die Box wird in 1 Min. heruntergefahren.\nShutdown abbrechen?
|
shutdowntimer.announce Die Box wird in 1 Min. heruntergefahren.\nShutdown abbrechen?
|
||||||
sleeptimerbox.announce Die Box wird in 1 Min. in Standby-Betrieb gehen.\nStandby-Betrieb abbrechen?
|
sleeptimerbox.announce Die Box wird in 1 Min. in Standby-Betrieb gehen.\nStandby-Betrieb abbrechen?
|
||||||
sleeptimerbox.hint1 Ausschaltzeit in Min. (000=aus)
|
sleeptimerbox.hint1 Ausschaltzeit in Minuten (000 = aus)
|
||||||
sleeptimerbox.hint2 Die Box schaltet sich nach dieser Standby-Zeit aus.
|
sleeptimerbox.hint2 Die Box schaltet sich nach dieser Zeit aus.
|
||||||
sleeptimerbox.hint3 Die Box schaltet sich bei Nichtbenutzen der Fernbedienung aus.
|
sleeptimerbox.hint3 Die Box schaltet sich bei Nichtbenutzen der Fernbedienung aus.
|
||||||
sleeptimerbox.title Sleeptimer
|
sleeptimerbox.title Sleeptimer
|
||||||
sleeptimerbox.title2 Inaktivitätstimer
|
sleeptimerbox.title2 Inaktivitätstimer
|
||||||
|
@@ -1116,6 +1116,7 @@ menu.hint_shutdown_count Time to put box in deep-standby\nfrom soft-standby mode
|
|||||||
menu.hint_shutdown_rcdelay Enable deep-standby, if power button\npressed more than 1 second
|
menu.hint_shutdown_rcdelay Enable deep-standby, if power button\npressed more than 1 second
|
||||||
menu.hint_shutdown_real Enable soft-standby mode\nIf disabled, power button put box to deep-standby
|
menu.hint_shutdown_real Enable soft-standby mode\nIf disabled, power button put box to deep-standby
|
||||||
menu.hint_sleeptimer Set timer to put your box\nin sleep mode
|
menu.hint_sleeptimer Set timer to put your box\nin sleep mode
|
||||||
|
menu.hint_sleeptimer_min Default setting for sleeptimer
|
||||||
menu.hint_soft_restart Restart Neutrino-HD without reboot
|
menu.hint_soft_restart Restart Neutrino-HD without reboot
|
||||||
menu.hint_softupdate_check Check online update, download and flash firmware
|
menu.hint_softupdate_check Check online update, download and flash firmware
|
||||||
menu.hint_softupdate_check_local Select and flash firmware from local file
|
menu.hint_softupdate_check_local Select and flash firmware from local file
|
||||||
@@ -1241,6 +1242,7 @@ miscsettings.shutdown_count_hint2 to deep standby (0 = off).
|
|||||||
miscsettings.shutdown_real Enable standby
|
miscsettings.shutdown_real Enable standby
|
||||||
miscsettings.shutdown_real_rcdelay Delayed shutdown
|
miscsettings.shutdown_real_rcdelay Delayed shutdown
|
||||||
miscsettings.sleeptimer Inactivity shutdown timer
|
miscsettings.sleeptimer Inactivity shutdown timer
|
||||||
|
miscsettings.sleeptimer_min Sleeptimer default
|
||||||
miscsettings.volume Volume
|
miscsettings.volume Volume
|
||||||
miscsettings.zapto_pre_time Zapto Start Time Correction (minutes)
|
miscsettings.zapto_pre_time Zapto Start Time Correction (minutes)
|
||||||
motorcontrol.calc_positions (Re)-Calculate Positions
|
motorcontrol.calc_positions (Re)-Calculate Positions
|
||||||
@@ -1796,8 +1798,8 @@ settings.restore_warn This will replace all settings and reboot\nContinue ?
|
|||||||
shutdown.recoding_query You really want to to stop record ?
|
shutdown.recoding_query You really want to to stop record ?
|
||||||
shutdowntimer.announce Box will shutdown in 1 min.\nCancel Shutdown ?
|
shutdowntimer.announce Box will shutdown in 1 min.\nCancel Shutdown ?
|
||||||
sleeptimerbox.announce Box will standby in 1 min.\nCancel Standby ?
|
sleeptimerbox.announce Box will standby in 1 min.\nCancel Standby ?
|
||||||
sleeptimerbox.hint1 Shutdown time in min. (000=off)
|
sleeptimerbox.hint1 Shutdown time in minutes (000 = off)
|
||||||
sleeptimerbox.hint2 The STB will shutdown after this time in standby.
|
sleeptimerbox.hint2 The STB will shutdown after this time.
|
||||||
sleeptimerbox.hint3 The STB will shutdown, if remote not used.
|
sleeptimerbox.hint3 The STB will shutdown, if remote not used.
|
||||||
sleeptimerbox.title Sleeptimer
|
sleeptimerbox.title Sleeptimer
|
||||||
sleeptimerbox.title2 Inactivity shutdown timer
|
sleeptimerbox.title2 Inactivity shutdown timer
|
||||||
|
@@ -181,6 +181,17 @@ const CMenuOptionChooser::keyval EPG_SCAN_OPTIONS[EPG_SCAN_OPTION_COUNT] =
|
|||||||
{ 2, LOCALE_MISCSETTINGS_EPG_SCAN_FAV },
|
{ 2, LOCALE_MISCSETTINGS_EPG_SCAN_FAV },
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#define SLEEPTIMER_MIN_OPTION_COUNT 7
|
||||||
|
const CMenuOptionChooser::keyval_ext SLEEPTIMER_MIN_OPTIONS[SLEEPTIMER_MIN_OPTION_COUNT] =
|
||||||
|
{
|
||||||
|
{ 0, NONEXISTANT_LOCALE, "EPG" },
|
||||||
|
{ 30, NONEXISTANT_LOCALE, "30 min" },
|
||||||
|
{ 60, NONEXISTANT_LOCALE, "60 min" },
|
||||||
|
{ 90, NONEXISTANT_LOCALE, "90 min" },
|
||||||
|
{ 120, NONEXISTANT_LOCALE, "120 min" },
|
||||||
|
{ 150, NONEXISTANT_LOCALE, "150 min" }
|
||||||
|
};
|
||||||
|
|
||||||
//show misc settings menue
|
//show misc settings menue
|
||||||
int CMiscMenue::showMiscSettingsMenu()
|
int CMiscMenue::showMiscSettingsMenu()
|
||||||
{
|
{
|
||||||
@@ -323,6 +334,10 @@ void CMiscMenue::showMiscSettingsMenuEnergy(CMenuWidget *ms_energy)
|
|||||||
m2 = new CMenuDForwarder(LOCALE_MISCSETTINGS_SLEEPTIMER, true, g_settings.shutdown_min, new CSleepTimerWidget, "permanent");
|
m2 = new CMenuDForwarder(LOCALE_MISCSETTINGS_SLEEPTIMER, true, g_settings.shutdown_min, new CSleepTimerWidget, "permanent");
|
||||||
m2->setHint("", LOCALE_MENU_HINT_INACT_TIMER);
|
m2->setHint("", LOCALE_MENU_HINT_INACT_TIMER);
|
||||||
ms_energy->addItem(m2);
|
ms_energy->addItem(m2);
|
||||||
|
|
||||||
|
CMenuOptionChooser * m4 = new CMenuOptionChooser(LOCALE_MISCSETTINGS_SLEEPTIMER_MIN, &g_settings.sleeptimer_min, SLEEPTIMER_MIN_OPTIONS, SLEEPTIMER_MIN_OPTION_COUNT, true);
|
||||||
|
m4->setHint("", LOCALE_MENU_HINT_SLEEPTIMER_MIN);
|
||||||
|
ms_energy->addItem(m4);
|
||||||
}
|
}
|
||||||
|
|
||||||
//EPG settings
|
//EPG settings
|
||||||
|
@@ -70,16 +70,20 @@ int CSleepTimerWidget::exec(CMenuTarget* parent, const std::string &actionKey)
|
|||||||
if(permanent) {
|
if(permanent) {
|
||||||
inbox = new CStringInput(LOCALE_SLEEPTIMERBOX_TITLE2, value, 3, LOCALE_SLEEPTIMERBOX_HINT1, LOCALE_SLEEPTIMERBOX_HINT3, "0123456789 ");
|
inbox = new CStringInput(LOCALE_SLEEPTIMERBOX_TITLE2, value, 3, LOCALE_SLEEPTIMERBOX_HINT1, LOCALE_SLEEPTIMERBOX_HINT3, "0123456789 ");
|
||||||
} else {
|
} else {
|
||||||
CSectionsdClient::CurrentNextInfo info_CurrentNext;
|
if (g_settings.sleeptimer_min == 0) {
|
||||||
g_InfoViewer->getEPG(g_RemoteControl->current_channel_id, info_CurrentNext);
|
CSectionsdClient::CurrentNextInfo info_CurrentNext;
|
||||||
if ( info_CurrentNext.flags & CSectionsdClient::epgflags::has_current) {
|
g_InfoViewer->getEPG(g_RemoteControl->current_channel_id, info_CurrentNext);
|
||||||
time_t jetzt=time(NULL);
|
if ( info_CurrentNext.flags & CSectionsdClient::epgflags::has_current) {
|
||||||
int current_epg_zeit_dauer_rest = (info_CurrentNext.current_zeit.dauer+150 - (jetzt - info_CurrentNext.current_zeit.startzeit ))/60 ;
|
time_t jetzt=time(NULL);
|
||||||
if(shutdown_min == 0 && current_epg_zeit_dauer_rest > 0 && current_epg_zeit_dauer_rest < 1000)
|
int current_epg_zeit_dauer_rest = (info_CurrentNext.current_zeit.dauer+150 - (jetzt - info_CurrentNext.current_zeit.startzeit ))/60 ;
|
||||||
{
|
if(shutdown_min == 0 && current_epg_zeit_dauer_rest > 0 && current_epg_zeit_dauer_rest < 1000)
|
||||||
sprintf(value,"%03d",current_epg_zeit_dauer_rest);
|
{
|
||||||
|
sprintf(value,"%03d", current_epg_zeit_dauer_rest);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
sprintf(value,"%03d", g_settings.sleeptimer_min);
|
||||||
|
|
||||||
inbox = new CStringInput(LOCALE_SLEEPTIMERBOX_TITLE, value, 3, LOCALE_SLEEPTIMERBOX_HINT1, LOCALE_SLEEPTIMERBOX_HINT2, "0123456789 ");
|
inbox = new CStringInput(LOCALE_SLEEPTIMERBOX_TITLE, value, 3, LOCALE_SLEEPTIMERBOX_HINT1, LOCALE_SLEEPTIMERBOX_HINT2, "0123456789 ");
|
||||||
}
|
}
|
||||||
|
@@ -386,6 +386,7 @@ int CNeutrinoApp::loadSetup(const char * fname)
|
|||||||
strcpy(g_settings.shutdown_min, "000");
|
strcpy(g_settings.shutdown_min, "000");
|
||||||
if(cs_get_revision() > 7)
|
if(cs_get_revision() > 7)
|
||||||
strcpy(g_settings.shutdown_min, configfile.getString("shutdown_min","180").c_str());
|
strcpy(g_settings.shutdown_min, configfile.getString("shutdown_min","180").c_str());
|
||||||
|
+ g_settings.sleeptimer_min = configfile.getInt32("sleeptimer_min", 0);
|
||||||
|
|
||||||
g_settings.infobar_sat_display = configfile.getBool("infobar_sat_display" , true );
|
g_settings.infobar_sat_display = configfile.getBool("infobar_sat_display" , true );
|
||||||
g_settings.infobar_show_channeldesc = configfile.getBool("infobar_show_channeldesc" , false );
|
g_settings.infobar_show_channeldesc = configfile.getBool("infobar_show_channeldesc" , false );
|
||||||
@@ -877,6 +878,7 @@ void CNeutrinoApp::saveSetup(const char * fname)
|
|||||||
configfile.setBool("shutdown_real_rcdelay", g_settings.shutdown_real_rcdelay);
|
configfile.setBool("shutdown_real_rcdelay", g_settings.shutdown_real_rcdelay);
|
||||||
configfile.setString("shutdown_count" , g_settings.shutdown_count);
|
configfile.setString("shutdown_count" , g_settings.shutdown_count);
|
||||||
configfile.setString("shutdown_min" , g_settings.shutdown_min );
|
configfile.setString("shutdown_min" , g_settings.shutdown_min );
|
||||||
|
configfile.setInt32("sleeptimer_min", g_settings.sleeptimer_min);
|
||||||
configfile.setBool("infobar_sat_display" , g_settings.infobar_sat_display );
|
configfile.setBool("infobar_sat_display" , g_settings.infobar_sat_display );
|
||||||
configfile.setBool("infobar_show_channeldesc" , g_settings.infobar_show_channeldesc );
|
configfile.setBool("infobar_show_channeldesc" , g_settings.infobar_show_channeldesc );
|
||||||
configfile.setInt32("infobar_subchan_disp_pos" , g_settings.infobar_subchan_disp_pos );
|
configfile.setInt32("infobar_subchan_disp_pos" , g_settings.infobar_subchan_disp_pos );
|
||||||
|
@@ -1143,6 +1143,7 @@ typedef enum
|
|||||||
LOCALE_MENU_HINT_SHUTDOWN_RCDELAY,
|
LOCALE_MENU_HINT_SHUTDOWN_RCDELAY,
|
||||||
LOCALE_MENU_HINT_SHUTDOWN_REAL,
|
LOCALE_MENU_HINT_SHUTDOWN_REAL,
|
||||||
LOCALE_MENU_HINT_SLEEPTIMER,
|
LOCALE_MENU_HINT_SLEEPTIMER,
|
||||||
|
LOCALE_MENU_HINT_SLEEPTIMER_MIN,
|
||||||
LOCALE_MENU_HINT_SOFT_RESTART,
|
LOCALE_MENU_HINT_SOFT_RESTART,
|
||||||
LOCALE_MENU_HINT_SOFTUPDATE_CHECK,
|
LOCALE_MENU_HINT_SOFTUPDATE_CHECK,
|
||||||
LOCALE_MENU_HINT_SOFTUPDATE_CHECK_LOCAL,
|
LOCALE_MENU_HINT_SOFTUPDATE_CHECK_LOCAL,
|
||||||
@@ -1268,6 +1269,7 @@ typedef enum
|
|||||||
LOCALE_MISCSETTINGS_SHUTDOWN_REAL,
|
LOCALE_MISCSETTINGS_SHUTDOWN_REAL,
|
||||||
LOCALE_MISCSETTINGS_SHUTDOWN_REAL_RCDELAY,
|
LOCALE_MISCSETTINGS_SHUTDOWN_REAL_RCDELAY,
|
||||||
LOCALE_MISCSETTINGS_SLEEPTIMER,
|
LOCALE_MISCSETTINGS_SLEEPTIMER,
|
||||||
|
LOCALE_MISCSETTINGS_SLEEPTIMER_MIN,
|
||||||
LOCALE_MISCSETTINGS_VOLUME,
|
LOCALE_MISCSETTINGS_VOLUME,
|
||||||
LOCALE_MISCSETTINGS_ZAPTO_PRE_TIME,
|
LOCALE_MISCSETTINGS_ZAPTO_PRE_TIME,
|
||||||
LOCALE_MOTORCONTROL_CALC_POSITIONS,
|
LOCALE_MOTORCONTROL_CALC_POSITIONS,
|
||||||
|
@@ -1143,6 +1143,7 @@ const char * locale_real_names[] =
|
|||||||
"menu.hint_shutdown_rcdelay",
|
"menu.hint_shutdown_rcdelay",
|
||||||
"menu.hint_shutdown_real",
|
"menu.hint_shutdown_real",
|
||||||
"menu.hint_sleeptimer",
|
"menu.hint_sleeptimer",
|
||||||
|
"menu.hint_sleeptimer_min",
|
||||||
"menu.hint_soft_restart",
|
"menu.hint_soft_restart",
|
||||||
"menu.hint_softupdate_check",
|
"menu.hint_softupdate_check",
|
||||||
"menu.hint_softupdate_check_local",
|
"menu.hint_softupdate_check_local",
|
||||||
@@ -1268,6 +1269,7 @@ const char * locale_real_names[] =
|
|||||||
"miscsettings.shutdown_real",
|
"miscsettings.shutdown_real",
|
||||||
"miscsettings.shutdown_real_rcdelay",
|
"miscsettings.shutdown_real_rcdelay",
|
||||||
"miscsettings.sleeptimer",
|
"miscsettings.sleeptimer",
|
||||||
|
"miscsettings.sleeptimer_min",
|
||||||
"miscsettings.volume",
|
"miscsettings.volume",
|
||||||
"miscsettings.zapto_pre_time",
|
"miscsettings.zapto_pre_time",
|
||||||
"motorcontrol.calc_positions",
|
"motorcontrol.calc_positions",
|
||||||
|
@@ -68,6 +68,7 @@ struct SNeutrinoSettings
|
|||||||
int shutdown_real_rcdelay;
|
int shutdown_real_rcdelay;
|
||||||
char shutdown_count[4];
|
char shutdown_count[4];
|
||||||
char shutdown_min[4];
|
char shutdown_min[4];
|
||||||
|
int sleeptimer_min;
|
||||||
char record_safety_time_before[3];
|
char record_safety_time_before[3];
|
||||||
char record_safety_time_after[3];
|
char record_safety_time_after[3];
|
||||||
int zapto_pre_time;
|
int zapto_pre_time;
|
||||||
|
Reference in New Issue
Block a user