mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-09-03 19:01:13 +02:00
sleeptimer: add possibilty to preset with a fixed value
Origin commit data
------------------
Commit: 25e550e9e3
Author: vanhofen <vanhofen@gmx.de>
Date: 2013-10-16 (Wed, 16 Oct 2013)
Origin message was:
------------------
- sleeptimer: add possibilty to preset with a fixed value
This commit is contained in:
@@ -70,16 +70,20 @@ int CSleepTimerWidget::exec(CMenuTarget* parent, const std::string &actionKey)
|
||||
if(permanent) {
|
||||
inbox = new CStringInput(LOCALE_SLEEPTIMERBOX_TITLE2, value, 3, LOCALE_SLEEPTIMERBOX_HINT1, LOCALE_SLEEPTIMERBOX_HINT3, "0123456789 ");
|
||||
} else {
|
||||
CSectionsdClient::CurrentNextInfo info_CurrentNext;
|
||||
g_InfoViewer->getEPG(g_RemoteControl->current_channel_id, info_CurrentNext);
|
||||
if ( info_CurrentNext.flags & CSectionsdClient::epgflags::has_current) {
|
||||
time_t jetzt=time(NULL);
|
||||
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);
|
||||
if (g_settings.sleeptimer_min == 0) {
|
||||
CSectionsdClient::CurrentNextInfo info_CurrentNext;
|
||||
g_InfoViewer->getEPG(g_RemoteControl->current_channel_id, info_CurrentNext);
|
||||
if ( info_CurrentNext.flags & CSectionsdClient::epgflags::has_current) {
|
||||
time_t jetzt=time(NULL);
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
sprintf(value,"%03d", g_settings.sleeptimer_min);
|
||||
|
||||
inbox = new CStringInput(LOCALE_SLEEPTIMERBOX_TITLE, value, 3, LOCALE_SLEEPTIMERBOX_HINT1, LOCALE_SLEEPTIMERBOX_HINT2, "0123456789 ");
|
||||
}
|
||||
|
Reference in New Issue
Block a user