mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-29 16:31:05 +02:00
parental protection: make zaptime configurable
Conflicts:
data/locale/english.locale
src/gui/channellist.cpp
src/gui/parentallock_setup.cpp
src/neutrino.cpp
Origin commit data
------------------
Branch: ni/coolstream
Commit: a12f4c0274
Author: martii <m4rtii@gmx.de>
Date: 2013-06-23 (Sun, 23 Jun 2013)
------------------
This commit was generated by Migit
This commit is contained in:
@@ -1772,6 +1772,7 @@ parentallock.never Nie
|
|||||||
parentallock.onsignal Bei gesendeter Vorsperre
|
parentallock.onsignal Bei gesendeter Vorsperre
|
||||||
parentallock.parentallock Jugendschutz
|
parentallock.parentallock Jugendschutz
|
||||||
parentallock.prompt PIN-Eingabe
|
parentallock.prompt PIN-Eingabe
|
||||||
|
parentallock.zaptime Zap-Zeit für vorgesperrte Bouquets (Minuten)
|
||||||
personalize.access Zugangsoptionen
|
personalize.access Zugangsoptionen
|
||||||
personalize.apply_settings Änderungen übernehmen?
|
personalize.apply_settings Änderungen übernehmen?
|
||||||
personalize.button_auto Auto
|
personalize.button_auto Auto
|
||||||
|
@@ -1772,6 +1772,7 @@ parentallock.never never
|
|||||||
parentallock.onsignal on broadcasted lock
|
parentallock.onsignal on broadcasted lock
|
||||||
parentallock.parentallock Parental lock
|
parentallock.parentallock Parental lock
|
||||||
parentallock.prompt prompt for PIN
|
parentallock.prompt prompt for PIN
|
||||||
|
parentallock.zaptime Zap time for locked bouquets (minutes)
|
||||||
personalize.access Access options
|
personalize.access Access options
|
||||||
personalize.apply_settings Apply changes?
|
personalize.apply_settings Apply changes?
|
||||||
personalize.button_auto auto
|
personalize.button_auto auto
|
||||||
|
@@ -1010,8 +1010,8 @@ int CChannelList::handleMsg(const neutrino_msg_t msg, neutrino_msg_data_t data)
|
|||||||
if (g_settings.parentallock_prompt == PARENTALLOCK_PROMPT_CHANGETOLOCKED && data < 0x100)
|
if (g_settings.parentallock_prompt == PARENTALLOCK_PROMPT_CHANGETOLOCKED && data < 0x100)
|
||||||
goto out;
|
goto out;
|
||||||
|
|
||||||
/* if a pre-locked channel is inside the zap time, open it. Hardcoded to one hour for now. */
|
/* if a pre-locked channel is inside the zap time, open it. */
|
||||||
if (data >= 0x100 && (*chanlist)[selected]->last_unlocked_time + 3600 > time_monotonic())
|
if (data >= 0x100 && (*chanlist)[selected]->last_unlocked_time + g_settings.parentallock_zaptime * 60 > time_monotonic())
|
||||||
goto out;
|
goto out;
|
||||||
|
|
||||||
/* OK, let's ask for a PIN */
|
/* OK, let's ask for a PIN */
|
||||||
|
@@ -136,6 +136,7 @@ int CParentalSetup::showParentalSetup()
|
|||||||
else
|
else
|
||||||
mc = new CMenuOptionChooser(LOCALE_PARENTALLOCK_BOUQUETMODE, &g_settings.parentallock_defaultlocked, PARENTALLOCK_DEFAULTLOCKED_OPTIONS, PARENTALLOCK_DEFAULTLOCKED_OPTION_COUNT, !parentallocked);
|
mc = new CMenuOptionChooser(LOCALE_PARENTALLOCK_BOUQUETMODE, &g_settings.parentallock_defaultlocked, PARENTALLOCK_DEFAULTLOCKED_OPTIONS, PARENTALLOCK_DEFAULTLOCKED_OPTION_COUNT, !parentallocked);
|
||||||
plock->addItem(mc);
|
plock->addItem(mc);
|
||||||
|
plock->addItem(new CMenuOptionNumberChooser(LOCALE_PARENTALLOCK_ZAPTIME, (int *)&g_settings.parentallock_zaptime, !parentallocked, 0, 10000));
|
||||||
|
|
||||||
CPINChangeWidget pinChangeWidget(LOCALE_PARENTALLOCK_CHANGEPIN, &g_settings.parentallock_pincode, 4, LOCALE_PARENTALLOCK_CHANGEPIN_HINT1);
|
CPINChangeWidget pinChangeWidget(LOCALE_PARENTALLOCK_CHANGEPIN, &g_settings.parentallock_pincode, 4, LOCALE_PARENTALLOCK_CHANGEPIN_HINT1);
|
||||||
mf = new CMenuForwarder(LOCALE_PARENTALLOCK_CHANGEPIN, true, g_settings.parentallock_pincode, &pinChangeWidget);
|
mf = new CMenuForwarder(LOCALE_PARENTALLOCK_CHANGEPIN, true, g_settings.parentallock_pincode, &pinChangeWidget);
|
||||||
|
@@ -333,11 +333,8 @@ int CNeutrinoApp::loadSetup(const char * fname)
|
|||||||
configfile.clear();
|
configfile.clear();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
std::ifstream checkParentallocked(NEUTRINO_PARENTALLOCKED_FILE);
|
parentallocked = !access(NEUTRINO_PARENTALLOCKED_FILE, R_OK);
|
||||||
if(checkParentallocked) {
|
|
||||||
parentallocked = true;
|
|
||||||
checkParentallocked.close();
|
|
||||||
}
|
|
||||||
g_settings.easymenu = configfile.getInt32("easymenu", 0);
|
g_settings.easymenu = configfile.getInt32("easymenu", 0);
|
||||||
g_settings.softupdate_autocheck = configfile.getBool("softupdate_autocheck" , false);
|
g_settings.softupdate_autocheck = configfile.getBool("softupdate_autocheck" , false);
|
||||||
/* if file present and no config file found, force easy mode */
|
/* 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_defaultlocked = configfile.getInt32("parentallock_defaultlocked", 0);
|
||||||
g_settings.parentallock_pincode = configfile.getString( "parentallock_pincode", "0000" );
|
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++)
|
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);
|
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_prompt", g_settings.parentallock_prompt );
|
||||||
configfile.setInt32( "parentallock_lockage", g_settings.parentallock_lockage );
|
configfile.setInt32( "parentallock_lockage", g_settings.parentallock_lockage );
|
||||||
configfile.setString( "parentallock_pincode", g_settings.parentallock_pincode );
|
configfile.setString( "parentallock_pincode", g_settings.parentallock_pincode );
|
||||||
|
configfile.setInt32("parentallock_zaptime", g_settings.parentallock_zaptime);
|
||||||
configfile.setInt32("parentallock_defaultlocked", g_settings.parentallock_defaultlocked);
|
configfile.setInt32("parentallock_defaultlocked", g_settings.parentallock_defaultlocked);
|
||||||
|
|
||||||
//timing
|
//timing
|
||||||
|
@@ -1799,6 +1799,7 @@ typedef enum
|
|||||||
LOCALE_PARENTALLOCK_ONSIGNAL,
|
LOCALE_PARENTALLOCK_ONSIGNAL,
|
||||||
LOCALE_PARENTALLOCK_PARENTALLOCK,
|
LOCALE_PARENTALLOCK_PARENTALLOCK,
|
||||||
LOCALE_PARENTALLOCK_PROMPT,
|
LOCALE_PARENTALLOCK_PROMPT,
|
||||||
|
LOCALE_PARENTALLOCK_ZAPTIME,
|
||||||
LOCALE_PERSONALIZE_ACCESS,
|
LOCALE_PERSONALIZE_ACCESS,
|
||||||
LOCALE_PERSONALIZE_APPLY_SETTINGS,
|
LOCALE_PERSONALIZE_APPLY_SETTINGS,
|
||||||
LOCALE_PERSONALIZE_BUTTON_AUTO,
|
LOCALE_PERSONALIZE_BUTTON_AUTO,
|
||||||
|
@@ -1799,6 +1799,7 @@ const char * locale_real_names[] =
|
|||||||
"parentallock.onsignal",
|
"parentallock.onsignal",
|
||||||
"parentallock.parentallock",
|
"parentallock.parentallock",
|
||||||
"parentallock.prompt",
|
"parentallock.prompt",
|
||||||
|
"parentallock.zaptime",
|
||||||
"personalize.access",
|
"personalize.access",
|
||||||
"personalize.apply_settings",
|
"personalize.apply_settings",
|
||||||
"personalize.button_auto",
|
"personalize.button_auto",
|
||||||
|
@@ -568,6 +568,7 @@ struct SNeutrinoSettings
|
|||||||
int parentallock_prompt;
|
int parentallock_prompt;
|
||||||
int parentallock_lockage;
|
int parentallock_lockage;
|
||||||
int parentallock_defaultlocked;
|
int parentallock_defaultlocked;
|
||||||
|
int parentallock_zaptime;
|
||||||
std::string parentallock_pincode;
|
std::string parentallock_pincode;
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user