Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Simplify Setup pincode checking. Refs #10950

  • Loading branch information...
commit beeeebb392d2521906bbb825a38640323179524d 1 parent 262c7c7
@stuartm stuartm authored
View
13 mythtv/libs/libmythui/myththemedmenu.cpp
@@ -96,10 +96,8 @@ MythThemedMenu::MythThemedMenu(const QString &cdir, const QString &menufile,
bool allowreorder, MythThemedMenuState *state)
: MythThemedMenuState(parent, name),
m_state(state), m_allocedstate(false), m_foundtheme(false),
- m_ignorekeys(false), m_wantpop(false)
+ m_ignorekeys(false), m_wantpop(false), m_menuPopup(NULL)
{
- m_menuPopup = NULL;
-
if (!m_state)
{
m_state = new MythThemedMenuState(parent, "themedmenustate");
@@ -757,13 +755,8 @@ bool MythThemedMenu::handleAction(const QString &action, const QString &password
{
MythUIMenuCallbacks *cbs = GetMythUI()->GetMenuCBs();
- if (((password == "SetupPinCode") &&
- GetMythDB()->GetNumSetting("SetupPinCodeRequired", 0)) ||
- (!password.isEmpty() && password != "SetupPinCode"))
- {
- if (!checkPinCode(password))
- return true;
- }
+ if (!password.isEmpty() && !checkPinCode(password))
+ return true;
if (action.left(5) == "EXEC ")
{
View
5 mythtv/libs/libmythui/myththemedmenu.h
@@ -80,10 +80,9 @@ class MUI_PUBLIC MythThemedMenu : public MythThemedMenuState
void ShowMenu();
void aboutScreen();
- MythDialogBox* m_menuPopup;
void customEvent(QEvent *event);
void mediaEvent(MythMediaEvent *event);
-
+
protected:
virtual bool keyPressEvent(QKeyEvent *e);
@@ -120,6 +119,8 @@ class MUI_PUBLIC MythThemedMenu : public MythThemedMenuState
bool m_wantpop;
QString m_menumode;
+
+ MythDialogBox* m_menuPopup;
};
Q_DECLARE_METATYPE(ThemedButton)
View
15 mythtv/programs/mythfrontend/globalsettings.cpp
@@ -1647,19 +1647,11 @@ static HostLineEdit *SetupPinCode()
ge->setHelpText(QObject::tr("This PIN is used to control access to the "
"setup menus. If you want to use this feature, then "
"setting the value to all numbers will make your life "
- "much easier. Set it to blank to disable."));
- return ge;
-}
-
-static HostCheckBox *SetupPinCodeRequired()
-{
- HostCheckBox *gc = new HostCheckBox("SetupPinCodeRequired");
- gc->setLabel(QObject::tr("Require setup PIN") + " ");
- gc->setValue(false);
- gc->setHelpText(QObject::tr("If enabled, you will not be able to return "
+ "much easier. Set it to blank to disable."
+ "If enabled, you will not be able to return "
"to this screen and reset the Setup PIN without first "
"entering the current PIN."));
- return gc;
+ return ge;
}
static HostComboBox *XineramaScreen()
@@ -3263,7 +3255,6 @@ MainGeneralSettings::MainGeneralSettings()
VerticalConfigurationGroup *pin =
new VerticalConfigurationGroup(false, true, false, false);
pin->setLabel(QObject::tr("Settings Access"));
- pin->addChild(SetupPinCodeRequired());
pin->addChild(SetupPinCode());
addChild(pin);
Please sign in to comment.
Something went wrong with that request. Please try again.