mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-29 08:21:12 +02:00
*neutrino parental_setup: requesting for pincode in parental setup independently of item in settings menu
this fixes also the correct pin request in settings menu for parental-setup, because personalize-PIN was requested git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-beta@2031 e54a6e83-5905-42d5-8d5c-058d10e6a962
This commit is contained in:
@@ -35,23 +35,14 @@
|
||||
|
||||
#include "gui/parentallock_setup.h"
|
||||
|
||||
#include <global.h>
|
||||
#include <neutrino.h>
|
||||
#include <neutrino_menue.h>
|
||||
|
||||
#include <gui/widget/icons.h>
|
||||
#include <gui/widget/stringinput.h>
|
||||
|
||||
#include <driver/screen_max.h>
|
||||
|
||||
#include <system/debug.h>
|
||||
|
||||
|
||||
|
||||
CParentalSetup::CParentalSetup()
|
||||
{
|
||||
width = w_max (40, 10); //%
|
||||
}
|
||||
//constructor is definied in parentallock_setup.h
|
||||
|
||||
CParentalSetup::~CParentalSetup()
|
||||
{
|
||||
@@ -64,10 +55,9 @@ int CParentalSetup::exec(CMenuTarget* parent, const std::string &/*actionKey*/)
|
||||
int res = menu_return::RETURN_REPAINT;
|
||||
|
||||
if (parent)
|
||||
{
|
||||
parent->hide();
|
||||
}
|
||||
|
||||
if (check())
|
||||
showParentalSetup();
|
||||
|
||||
return res;
|
||||
|
@@ -31,19 +31,29 @@
|
||||
#ifndef __parentallock_setup__
|
||||
#define __parentallock_setup__
|
||||
|
||||
#include <gui/widget/menue.h>
|
||||
#include <global.h>
|
||||
#include <neutrino.h>
|
||||
#include <neutrino_menue.h>
|
||||
|
||||
#include <gui/widget/menue.h>
|
||||
#include <driver/screen_max.h>
|
||||
#include <string>
|
||||
|
||||
class CParentalSetup : public CMenuTarget
|
||||
class CParentalSetup : public CMenuTarget, public CPINProtection
|
||||
{
|
||||
private:
|
||||
int width;
|
||||
|
||||
void showParentalSetup();
|
||||
|
||||
protected:
|
||||
virtual CMenuTarget* getParent() { return( NULL);};
|
||||
|
||||
public:
|
||||
CParentalSetup();
|
||||
|
||||
CParentalSetup() : CPINProtection(g_settings.parentallock_pincode)
|
||||
{
|
||||
width = w_max (40, 10); //%
|
||||
};
|
||||
~CParentalSetup();
|
||||
int exec(CMenuTarget* parent, const std::string & actionKey);
|
||||
};
|
||||
|
@@ -245,7 +245,7 @@ void CNeutrinoApp::InitMenuSettings()
|
||||
personalize.addItem(MENU_SETTINGS, new CMenuForwarder(LOCALE_MAINSETTINGS_AUDIO, true, NULL, new CAudioSetup()), &g_settings.personalize[SNeutrinoSettings::P_MSET_AUDIO]);
|
||||
|
||||
// parental lock
|
||||
personalize.addItem(MENU_SETTINGS, new CLockedMenuForwarder(LOCALE_PARENTALLOCK_PARENTALLOCK, g_settings.parentallock_pincode, g_settings.parentallock_prompt, true, NULL, new CParentalSetup()), &g_settings.personalize[SNeutrinoSettings::P_MSET_YOUTH]);
|
||||
personalize.addItem(MENU_SETTINGS, new CMenuForwarder(LOCALE_PARENTALLOCK_PARENTALLOCK, true, NULL, new CParentalSetup()), &g_settings.personalize[SNeutrinoSettings::P_MSET_YOUTH]);
|
||||
|
||||
// network
|
||||
if(networksetup == NULL)
|
||||
|
Reference in New Issue
Block a user