*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:
thilo
2012-01-01 21:43:06 +00:00
parent 3777dbeb3a
commit b408d5487b
3 changed files with 19 additions and 19 deletions

View File

@@ -35,23 +35,14 @@
#include "gui/parentallock_setup.h" #include "gui/parentallock_setup.h"
#include <global.h>
#include <neutrino.h>
#include <neutrino_menue.h>
#include <gui/widget/icons.h> #include <gui/widget/icons.h>
#include <gui/widget/stringinput.h> #include <gui/widget/stringinput.h>
#include <driver/screen_max.h>
#include <system/debug.h> #include <system/debug.h>
//constructor is definied in parentallock_setup.h
CParentalSetup::CParentalSetup()
{
width = w_max (40, 10); //%
}
CParentalSetup::~CParentalSetup() CParentalSetup::~CParentalSetup()
{ {
@@ -64,10 +55,9 @@ int CParentalSetup::exec(CMenuTarget* parent, const std::string &/*actionKey*/)
int res = menu_return::RETURN_REPAINT; int res = menu_return::RETURN_REPAINT;
if (parent) if (parent)
{
parent->hide(); parent->hide();
}
if (check())
showParentalSetup(); showParentalSetup();
return res; return res;

View File

@@ -31,19 +31,29 @@
#ifndef __parentallock_setup__ #ifndef __parentallock_setup__
#define __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> #include <string>
class CParentalSetup : public CMenuTarget class CParentalSetup : public CMenuTarget, public CPINProtection
{ {
private: private:
int width; int width;
void showParentalSetup(); void showParentalSetup();
protected:
virtual CMenuTarget* getParent() { return( NULL);};
public: public:
CParentalSetup();
CParentalSetup() : CPINProtection(g_settings.parentallock_pincode)
{
width = w_max (40, 10); //%
};
~CParentalSetup(); ~CParentalSetup();
int exec(CMenuTarget* parent, const std::string & actionKey); int exec(CMenuTarget* parent, const std::string & actionKey);
}; };

View File

@@ -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]); personalize.addItem(MENU_SETTINGS, new CMenuForwarder(LOCALE_MAINSETTINGS_AUDIO, true, NULL, new CAudioSetup()), &g_settings.personalize[SNeutrinoSettings::P_MSET_AUDIO]);
// parental lock // 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 // network
if(networksetup == NULL) if(networksetup == NULL)