mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-28 07:51:11 +02:00
fix menu show min in shutdown timer
git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@1205 e54a6e83-5905-42d5-8d5c-058d10e6a962
Origin commit data
------------------
Branch: ni/coolstream
Commit: 036629aaaf
Author: Jacek Jendrzej <overx300@gmail.com>
Date: 2011-02-25 (Fri, 25 Feb 2011)
Origin message was:
------------------
-fix menu show min in shutdown timer
git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@1205 e54a6e83-5905-42d5-8d5c-058d10e6a962
------------------
This commit was generated by Migit
This commit is contained in:
@@ -64,7 +64,7 @@ void* SHTDCNT::TimeThread(void *)
|
||||
void SHTDCNT::init()
|
||||
{
|
||||
shutdown_cnt = atoi(g_settings.shutdown_count) * 60;
|
||||
sleep_cnt = g_settings.shutdown_min*60;
|
||||
sleep_cnt = atoi(g_settings.shutdown_min)*60;
|
||||
if (pthread_create (&thrTime, NULL, TimeThread, NULL) != 0 )
|
||||
{
|
||||
perror("[SHTDCNT]: pthread_create(TimeThread)");
|
||||
@@ -99,7 +99,7 @@ void SHTDCNT::shutdown_counter()
|
||||
}
|
||||
}
|
||||
|
||||
if(g_settings.shutdown_min > 0) {
|
||||
if(atoi(g_settings.shutdown_min) > 0) {
|
||||
if(sleep_cnt > 0) {
|
||||
sleeptimer_active = true;
|
||||
sleep_cnt--;
|
||||
@@ -113,5 +113,5 @@ void SHTDCNT::shutdown_counter()
|
||||
|
||||
void SHTDCNT::resetSleepTimer()
|
||||
{
|
||||
sleep_cnt = g_settings.shutdown_min*60;
|
||||
sleep_cnt = atoi(g_settings.shutdown_min)*60;
|
||||
}
|
||||
|
@@ -60,7 +60,7 @@ int CSleepTimerWidget::exec(CMenuTarget* parent, const std::string &actionKey)
|
||||
parent->hide();
|
||||
|
||||
if(permanent) {
|
||||
sprintf(value,"%03d", g_settings.shutdown_min);
|
||||
strcpy(value,g_settings.shutdown_min);
|
||||
} else {
|
||||
shutdown_min = g_Timerd->getSleepTimerRemaining(); // remaining shutdown time?
|
||||
sprintf(value,"%03d", shutdown_min);
|
||||
@@ -93,8 +93,8 @@ int CSleepTimerWidget::exec(CMenuTarget* parent, const std::string &actionKey)
|
||||
|
||||
int new_val = atoi(value);
|
||||
if(permanent) {
|
||||
g_settings.shutdown_min = new_val;
|
||||
printf("permanent sleeptimer min: %d\n", g_settings.shutdown_min);
|
||||
sprintf(g_settings.shutdown_min,"%03d", new_val);
|
||||
printf("permanent sleeptimer min: %s\n", g_settings.shutdown_min);
|
||||
}
|
||||
else if(shutdown_min != new_val) {
|
||||
shutdown_min = new_val;
|
||||
|
@@ -473,9 +473,9 @@ int CNeutrinoApp::loadSetup(const char * fname)
|
||||
g_settings.shutdown_real_rcdelay = configfile.getBool("shutdown_real_rcdelay", false );
|
||||
strcpy(g_settings.shutdown_count, configfile.getString("shutdown_count","0").c_str());
|
||||
|
||||
g_settings.shutdown_min = 0;
|
||||
strcpy(g_settings.shutdown_min, "000");
|
||||
if(cs_get_revision() > 7)
|
||||
g_settings.shutdown_min = configfile.getInt32("shutdown_min", 180 );
|
||||
strcpy(g_settings.shutdown_min, configfile.getString("shutdown_min","180").c_str());
|
||||
|
||||
g_settings.infobar_sat_display = configfile.getBool("infobar_sat_display" , true );
|
||||
g_settings.infobar_subchan_disp_pos = configfile.getInt32("infobar_subchan_disp_pos" , 0 );
|
||||
@@ -1024,7 +1024,7 @@ void CNeutrinoApp::saveSetup(const char * fname)
|
||||
configfile.setBool("shutdown_real" , g_settings.shutdown_real );
|
||||
configfile.setBool("shutdown_real_rcdelay", g_settings.shutdown_real_rcdelay);
|
||||
configfile.setString("shutdown_count" , g_settings.shutdown_count);
|
||||
configfile.setInt32("shutdown_min" , g_settings.shutdown_min );
|
||||
configfile.setString("shutdown_min" , g_settings.shutdown_min );
|
||||
configfile.setBool("infobar_sat_display" , g_settings.infobar_sat_display );
|
||||
configfile.setInt32("infobar_subchan_disp_pos" , g_settings.infobar_subchan_disp_pos );
|
||||
configfile.setBool("progressbar_color" , g_settings.progressbar_color );
|
||||
|
@@ -978,7 +978,7 @@ void CNeutrinoApp::InitMiscSettings(CMenuWidget &miscSettings)
|
||||
miscSettingsGeneral->addItem(new CMenuOptionChooser(LOCALE_MISCSETTINGS_SHUTDOWN_REAL, &g_settings.shutdown_real, OPTIONS_OFF1_ON0_OPTIONS, OPTIONS_OFF1_ON0_OPTION_COUNT, true, miscNotifier));
|
||||
miscSettingsGeneral->addItem(m1);
|
||||
miscSettingsGeneral->addItem(m2);
|
||||
miscSettingsGeneral->addItem(new CMenuForwarder(LOCALE_MISCSETTINGS_SLEEPTIMER, true, NULL, new CSleepTimerWidget, "permanent"));
|
||||
miscSettingsGeneral->addItem(new CMenuForwarder(LOCALE_MISCSETTINGS_SLEEPTIMER, true, g_settings.shutdown_min, new CSleepTimerWidget, "permanent"));
|
||||
}
|
||||
|
||||
#if 0
|
||||
|
@@ -57,7 +57,7 @@ struct SNeutrinoSettings
|
||||
int shutdown_real;
|
||||
int shutdown_real_rcdelay;
|
||||
char shutdown_count[4];
|
||||
int shutdown_min;
|
||||
char shutdown_min[4];
|
||||
char record_safety_time_before[3];
|
||||
char record_safety_time_after[3];
|
||||
int infobar_sat_display;
|
||||
|
Reference in New Issue
Block a user