mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-29 16:31:11 +02:00
parental protection: make zaptime configurable
Conflicts: data/locale/english.locale src/gui/channellist.cpp src/gui/parentallock_setup.cpp src/neutrino.cpp
This commit is contained in:
@@ -333,11 +333,8 @@ int CNeutrinoApp::loadSetup(const char * fname)
|
||||
configfile.clear();
|
||||
}
|
||||
}
|
||||
std::ifstream checkParentallocked(NEUTRINO_PARENTALLOCKED_FILE);
|
||||
if(checkParentallocked) {
|
||||
parentallocked = true;
|
||||
checkParentallocked.close();
|
||||
}
|
||||
parentallocked = !access(NEUTRINO_PARENTALLOCKED_FILE, R_OK);
|
||||
|
||||
g_settings.easymenu = configfile.getInt32("easymenu", 0);
|
||||
g_settings.softupdate_autocheck = configfile.getBool("softupdate_autocheck" , false);
|
||||
/* if file present and no config file found, force easy mode */
|
||||
@@ -749,6 +746,7 @@ int CNeutrinoApp::loadSetup(const char * fname)
|
||||
}
|
||||
g_settings.parentallock_defaultlocked = configfile.getInt32("parentallock_defaultlocked", 0);
|
||||
g_settings.parentallock_pincode = configfile.getString( "parentallock_pincode", "0000" );
|
||||
g_settings.parentallock_zaptime = configfile.getInt32( "parentallock_zaptime", 60 );
|
||||
|
||||
for (int i = 0; i < SNeutrinoSettings::TIMING_SETTING_COUNT; i++)
|
||||
g_settings.timing[i] = configfile.getInt32(locale_real_names[timing_setting[i].name], timing_setting[i].default_timing);
|
||||
@@ -1194,6 +1192,7 @@ void CNeutrinoApp::saveSetup(const char * fname)
|
||||
configfile.setInt32( "parentallock_prompt", g_settings.parentallock_prompt );
|
||||
configfile.setInt32( "parentallock_lockage", g_settings.parentallock_lockage );
|
||||
configfile.setString( "parentallock_pincode", g_settings.parentallock_pincode );
|
||||
configfile.setInt32("parentallock_zaptime", g_settings.parentallock_zaptime);
|
||||
configfile.setInt32("parentallock_defaultlocked", g_settings.parentallock_defaultlocked);
|
||||
|
||||
//timing
|
||||
|
Reference in New Issue
Block a user