mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-29 00:11:14 +02:00
neutrino: add the possibility to lock bouquets by default
This basically inverts the "locked" attribute of bouquets.xml and allows to selectively enable only favourites or similar. Conflicts: src/gui/channellist.cpp
This commit is contained in:
committed by
[CST] Focus
parent
d79d592d27
commit
27493de2ef
@@ -1416,9 +1416,12 @@ options.off aus
|
|||||||
options.on ein
|
options.on ein
|
||||||
options.on.without_messages ohne Msg
|
options.on.without_messages ohne Msg
|
||||||
options.serial seriell
|
options.serial seriell
|
||||||
|
parentallock.bouquetmode Bouquets sind standardmässig
|
||||||
parentallock.changepin PIN-Code festlegen
|
parentallock.changepin PIN-Code festlegen
|
||||||
parentallock.changepin_hint1 Geben Sie hier Ihren neuen PIN-Code ein!
|
parentallock.changepin_hint1 Geben Sie hier Ihren neuen PIN-Code ein!
|
||||||
parentallock.changetolocked Bei vorgeperrten Bouquets
|
parentallock.changetolocked Bei vorgeperrten Bouquets
|
||||||
|
parentallock.defaultlocked gesperrt
|
||||||
|
parentallock.defaultunlocked nicht gesperrt
|
||||||
parentallock.head Jugendschutz PIN
|
parentallock.head Jugendschutz PIN
|
||||||
parentallock.lockage Sendungen
|
parentallock.lockage Sendungen
|
||||||
parentallock.lockage12 ab 12 Jahren sperren
|
parentallock.lockage12 ab 12 Jahren sperren
|
||||||
|
@@ -1433,9 +1433,12 @@ options.off off
|
|||||||
options.on on
|
options.on on
|
||||||
options.on.without_messages Without msg
|
options.on.without_messages Without msg
|
||||||
options.serial serial
|
options.serial serial
|
||||||
|
parentallock.bouquetmode Bouquets are default
|
||||||
parentallock.changepin change PIN code
|
parentallock.changepin change PIN code
|
||||||
parentallock.changepin_hint1 Enter your new youth protection pin code here!
|
parentallock.changepin_hint1 Enter your new youth protection pin code here!
|
||||||
parentallock.changetolocked on locked bouquets
|
parentallock.changetolocked on locked bouquets
|
||||||
|
parentallock.defaultlocked locked
|
||||||
|
parentallock.defaultunlocked unlocked
|
||||||
parentallock.head Enter Parental Lock PIN code
|
parentallock.head Enter Parental Lock PIN code
|
||||||
parentallock.lockage lock program
|
parentallock.lockage lock program
|
||||||
parentallock.lockage12 from 12 years up
|
parentallock.lockage12 from 12 years up
|
||||||
|
@@ -147,7 +147,7 @@ int CRemoteControl::handleMsg(const neutrino_msg_t msg, neutrino_msg_data_t data
|
|||||||
is_video_started = true;
|
is_video_started = true;
|
||||||
if (channel) {
|
if (channel) {
|
||||||
current_channel_name = channel->getName();
|
current_channel_name = channel->getName();
|
||||||
if (channel->bAlwaysLocked)
|
if (channel->bAlwaysLocked != g_settings.parentallock_defaultlocked)
|
||||||
stopvideo();
|
stopvideo();
|
||||||
}
|
}
|
||||||
CVFD::getInstance()->showServicename(current_channel_name); // UTF-8
|
CVFD::getInstance()->showServicename(current_channel_name); // UTF-8
|
||||||
|
@@ -96,7 +96,7 @@ void CBEBouquetWidget::paintItem(int pos)
|
|||||||
if ((current == selected) && (state == beMoving))
|
if ((current == selected) && (state == beMoving))
|
||||||
frameBuffer->paintIcon(NEUTRINO_ICON_BUTTON_YELLOW, x + 10, ypos, iheight);
|
frameBuffer->paintIcon(NEUTRINO_ICON_BUTTON_YELLOW, x + 10, ypos, iheight);
|
||||||
|
|
||||||
if ((*Bouquets)[current]->bLocked)
|
if ((*Bouquets)[current]->bLocked != g_settings.parentallock_defaultlocked)
|
||||||
frameBuffer->paintIcon(NEUTRINO_ICON_LOCK, x + 10, ypos, iheight);
|
frameBuffer->paintIcon(NEUTRINO_ICON_LOCK, x + 10, ypos, iheight);
|
||||||
|
|
||||||
if ((*Bouquets)[current]->bHidden)
|
if ((*Bouquets)[current]->bHidden)
|
||||||
|
@@ -1231,7 +1231,7 @@ void CChannelList::zapToChannel(CZapitChannel *channel, bool force)
|
|||||||
}
|
}
|
||||||
|
|
||||||
selected_chid = channel->getChannelID();
|
selected_chid = channel->getChannelID();
|
||||||
g_RemoteControl->zapTo_ChannelID(channel->getChannelID(), channel->getName(), !channel->bAlwaysLocked);
|
g_RemoteControl->zapTo_ChannelID(selected_chid, channel->getName(), (channel->bAlwaysLocked == g_settings.parentallock_defaultlocked));
|
||||||
CNeutrinoApp::getInstance()->channelList->adjustToChannelID(channel->getChannelID());
|
CNeutrinoApp::getInstance()->channelList->adjustToChannelID(channel->getChannelID());
|
||||||
}
|
}
|
||||||
if(new_zap_mode != 2 /* not active */) {
|
if(new_zap_mode != 2 /* not active */) {
|
||||||
|
@@ -88,6 +88,14 @@ const CMenuOptionChooser::keyval PARENTALLOCK_LOCKAGE_OPTIONS[PARENTALLOCK_LOCKA
|
|||||||
{ 16, LOCALE_PARENTALLOCK_LOCKAGE16 },
|
{ 16, LOCALE_PARENTALLOCK_LOCKAGE16 },
|
||||||
{ 18, LOCALE_PARENTALLOCK_LOCKAGE18 }
|
{ 18, LOCALE_PARENTALLOCK_LOCKAGE18 }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#define PARENTALLOCK_DEFAULTLOCKED_OPTION_COUNT 2
|
||||||
|
const CMenuOptionChooser::keyval PARENTALLOCK_DEFAULTLOCKED_OPTIONS[PARENTALLOCK_DEFAULTLOCKED_OPTION_COUNT] =
|
||||||
|
{
|
||||||
|
{ false, LOCALE_PARENTALLOCK_DEFAULTUNLOCKED },
|
||||||
|
{ true, LOCALE_PARENTALLOCK_DEFAULTLOCKED }
|
||||||
|
};
|
||||||
|
|
||||||
extern bool parentallocked;
|
extern bool parentallocked;
|
||||||
void CParentalSetup::showParentalSetup()
|
void CParentalSetup::showParentalSetup()
|
||||||
{
|
{
|
||||||
@@ -109,6 +117,8 @@ void CParentalSetup::showParentalSetup()
|
|||||||
mc->setHint("", LOCALE_MENU_HINT_PARENTALLOCK_LOCKAGE);
|
mc->setHint("", LOCALE_MENU_HINT_PARENTALLOCK_LOCKAGE);
|
||||||
plock->addItem(mc);
|
plock->addItem(mc);
|
||||||
|
|
||||||
|
plock->addItem(new CMenuOptionChooser(LOCALE_PARENTALLOCK_BOUQUETMODE, &g_settings.parentallock_defaultlocked, PARENTALLOCK_DEFAULTLOCKED_OPTIONS, PARENTALLOCK_DEFAULTLOCKED_OPTION_COUNT, !parentallocked));
|
||||||
|
|
||||||
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);
|
||||||
CMenuForwarder * mf = new CMenuForwarder(LOCALE_PARENTALLOCK_CHANGEPIN, true, g_settings.parentallock_pincode, &pinChangeWidget);
|
CMenuForwarder * mf = new CMenuForwarder(LOCALE_PARENTALLOCK_CHANGEPIN, true, g_settings.parentallock_pincode, &pinChangeWidget);
|
||||||
mf->setHint("", LOCALE_MENU_HINT_PARENTALLOCK_CHANGEPIN);
|
mf->setHint("", LOCALE_MENU_HINT_PARENTALLOCK_CHANGEPIN);
|
||||||
|
@@ -674,6 +674,7 @@ int CNeutrinoApp::loadSetup(const char * fname)
|
|||||||
g_settings.parentallock_prompt = 3;
|
g_settings.parentallock_prompt = 3;
|
||||||
g_settings.parentallock_lockage = 18;
|
g_settings.parentallock_lockage = 18;
|
||||||
}
|
}
|
||||||
|
g_settings.parentallock_defaultlocked = configfile.getInt32("parentallock_defaultlocked", 0);
|
||||||
strcpy( g_settings.parentallock_pincode, configfile.getString( "parentallock_pincode", "0000" ).c_str() );
|
strcpy( g_settings.parentallock_pincode, configfile.getString( "parentallock_pincode", "0000" ).c_str() );
|
||||||
|
|
||||||
for (int i = 0; i < SNeutrinoSettings::TIMING_SETTING_COUNT; i++)
|
for (int i = 0; i < SNeutrinoSettings::TIMING_SETTING_COUNT; i++)
|
||||||
@@ -1096,6 +1097,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_defaultlocked", g_settings.parentallock_defaultlocked);
|
||||||
|
|
||||||
//timing
|
//timing
|
||||||
for (int i = 0; i < SNeutrinoSettings::TIMING_SETTING_COUNT; i++)
|
for (int i = 0; i < SNeutrinoSettings::TIMING_SETTING_COUNT; i++)
|
||||||
|
@@ -1460,9 +1460,12 @@ typedef enum
|
|||||||
LOCALE_OPTIONS_ON,
|
LOCALE_OPTIONS_ON,
|
||||||
LOCALE_OPTIONS_ON_WITHOUT_MESSAGES,
|
LOCALE_OPTIONS_ON_WITHOUT_MESSAGES,
|
||||||
LOCALE_OPTIONS_SERIAL,
|
LOCALE_OPTIONS_SERIAL,
|
||||||
|
LOCALE_PARENTALLOCK_BOUQUETMODE,
|
||||||
LOCALE_PARENTALLOCK_CHANGEPIN,
|
LOCALE_PARENTALLOCK_CHANGEPIN,
|
||||||
LOCALE_PARENTALLOCK_CHANGEPIN_HINT1,
|
LOCALE_PARENTALLOCK_CHANGEPIN_HINT1,
|
||||||
LOCALE_PARENTALLOCK_CHANGETOLOCKED,
|
LOCALE_PARENTALLOCK_CHANGETOLOCKED,
|
||||||
|
LOCALE_PARENTALLOCK_DEFAULTLOCKED,
|
||||||
|
LOCALE_PARENTALLOCK_DEFAULTUNLOCKED,
|
||||||
LOCALE_PARENTALLOCK_HEAD,
|
LOCALE_PARENTALLOCK_HEAD,
|
||||||
LOCALE_PARENTALLOCK_LOCKAGE,
|
LOCALE_PARENTALLOCK_LOCKAGE,
|
||||||
LOCALE_PARENTALLOCK_LOCKAGE12,
|
LOCALE_PARENTALLOCK_LOCKAGE12,
|
||||||
|
@@ -1460,9 +1460,12 @@ const char * locale_real_names[] =
|
|||||||
"options.on",
|
"options.on",
|
||||||
"options.on.without_messages",
|
"options.on.without_messages",
|
||||||
"options.serial",
|
"options.serial",
|
||||||
|
"parentallock.bouquetmode",
|
||||||
"parentallock.changepin",
|
"parentallock.changepin",
|
||||||
"parentallock.changepin_hint1",
|
"parentallock.changepin_hint1",
|
||||||
"parentallock.changetolocked",
|
"parentallock.changetolocked",
|
||||||
|
"parentallock.defaultlocked",
|
||||||
|
"parentallock.defaultunlocked",
|
||||||
"parentallock.head",
|
"parentallock.head",
|
||||||
"parentallock.lockage",
|
"parentallock.lockage",
|
||||||
"parentallock.lockage12",
|
"parentallock.lockage12",
|
||||||
|
@@ -475,6 +475,7 @@ struct SNeutrinoSettings
|
|||||||
// parentallock
|
// parentallock
|
||||||
int parentallock_prompt;
|
int parentallock_prompt;
|
||||||
int parentallock_lockage;
|
int parentallock_lockage;
|
||||||
|
int parentallock_defaultlocked;
|
||||||
char parentallock_pincode[5];
|
char parentallock_pincode[5];
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user