drop easymenu

Origin commit data
------------------
Commit: b502ed31b9
Author: vanhofen <vanhofen@gmx.de>
Date: 2017-09-12 (Tue, 12 Sep 2017)

Origin message was:
------------------
- drop easymenu
This commit is contained in:
vanhofen
2017-09-12 23:46:22 +02:00
parent 367977ada4
commit ff21981795
24 changed files with 333 additions and 681 deletions

View File

@@ -310,7 +310,7 @@ int CPersonalizeGui::exec(CMenuTarget* parent, const string & actionKey)
//pin protected access to personalize menu also if found any pin protected items
bool is_pin_protected = g_settings.personalize[SNeutrinoSettings::P_MAIN_PINSTATUS];
if (!g_settings.easymenu && (is_pin_protected || hasPinItems())) {
if (is_pin_protected || hasPinItems()) {
setHint(LOCALE_PERSONALIZE_PINHINT); //from CPINProtection
is_pin_protected = true;
if (check())
@@ -330,41 +330,14 @@ int CPersonalizeGui::ShowPersonalizationMenu()
{
width = 40;
CMenuWidget* pMenu = new CMenuWidget(g_settings.easymenu ? LOCALE_PARENTALLOCK_MENU : LOCALE_PERSONALIZE_HEAD, NEUTRINO_ICON_PERSONALIZE, width, MN_WIDGET_ID_PERSONALIZE);
CMenuWidget* pMenu = new CMenuWidget(LOCALE_PERSONALIZE_HEAD, NEUTRINO_ICON_PERSONALIZE, width, MN_WIDGET_ID_PERSONALIZE);
pMenu->addIntroItems(NONEXISTANT_LOCALE, LOCALE_PERSONALIZE_ACCESS);
//pin
CPINChangeWidget *pinChangeWidget = NULL;
if (!g_settings.easymenu && show_pin_setup)
if (show_pin_setup)
ShowPinSetup(pMenu, pinChangeWidget);
int res;
if (g_settings.easymenu) {
int count = 0;
for (uint j = 0; j<v_item.size(); j++) {
printf("v_item[i].widget [%s]\n", v_item[j].widget->getName());
//pin protected items only
if (v_item[j].item_mode == PERSONALIZE_SHOW_AS_ACCESS_OPTION)
{
const neutrino_msg_t key = (count == 0) ? CRCInput::RC_red :
(count == 1) ? CRCInput::RC_green :
(count == 2) ? CRCInput::RC_yellow :
(count == 3) ? CRCInput::RC_blue : CRCInput::RC_nokey;
count++;
string itm_name = g_Locale->getText(v_item[j].locale_name);
itm_name += " ";
itm_name += g_Locale->getText(LOCALE_PERSONALIZE_PINSTATUS);
if (v_item[j].personalize_mode != NULL)
pMenu->addItem(new CMenuOptionChooser(itm_name.c_str(), v_item[j].personalize_mode, PERSONALIZE_PROTECT_MODE_OPTIONS, PERSONALIZE_PROTECT_MODE_MAX, v_item[j].menuItem->active, NULL, key));
}
}
res = pMenu->exec(NULL, "");
delete pMenu;
delete pinChangeWidget;
return res;
}
//personalized menues
CMenuForwarder *p_mn[widget_count];
for (int i = 0; i<(widget_count); i++)
@@ -378,7 +351,6 @@ int CPersonalizeGui::ShowPersonalizationMenu()
pMenu->addItem(p_mn[i]);
}
//usermenu
uMenu = NULL;
if (show_usermenu)
@@ -407,7 +379,7 @@ int CPersonalizeGui::ShowPersonalizationMenu()
pMenu->addItem(GenericMenuSeparatorLine);
pMenu->addItem(new CMenuForwarder(LOCALE_PERSONALIZE_HELP, true, NULL, this, "personalize_help", CRCInput::RC_help));
res = pMenu->exec(NULL, "");
int res = pMenu->exec(NULL, "");
if (show_pluginmenu) {
g_settings.plugins_disabled = "";
g_settings.plugins_game = "";
@@ -761,10 +733,6 @@ void CPersonalizeGui::SaveAndExit()
// Save the settings and left menu, if user wants to!
if (haveChangedSettings())
{
if (g_settings.easymenu) {
ApplySettings();
return;
}
if (ShowMsg(LOCALE_PERSONALIZE_HEAD, g_Locale->getText(LOCALE_PERSONALIZE_APPLY_SETTINGS), CMsgBox::mbrYes, CMsgBox::mbYes | CMsgBox::mbNo, NEUTRINO_ICON_QUESTION) == CMsgBox::mbrYes)
{
CHintBox hintBox(LOCALE_MESSAGEBOX_INFO, g_Locale->getText(LOCALE_MAINSETTINGS_SAVESETTINGSNOW_HINT)); // UTF-8
@@ -959,7 +927,7 @@ void CPersonalizeGui::addPersonalizedItems()
use_pin = true;
//set pinmode for personalize menu or for settings manager menu and if any item is pin protected
if (!g_settings.easymenu && (in_pinmode && !use_pin))
if (in_pinmode && !use_pin)
if (v_item[i].personalize_mode == &g_settings.personalize[SNeutrinoSettings::P_MAIN_PINSTATUS] || v_item[i].personalize_mode == &g_settings.personalize[SNeutrinoSettings::P_MSET_SETTINGS_MANAGER])
{
use_pin = true;
@@ -968,7 +936,7 @@ void CPersonalizeGui::addPersonalizedItems()
//convert item to locked forwarder and use generated pin mode for usage as ask parameter
v_item[i].menuItem = new CLockedMenuForwarder(fw->getTextLocale(),
g_settings.easymenu ? g_settings.parentallock_pincode : g_settings.personalize_pincode,
g_settings.personalize_pincode,
use_pin, fw->active, NULL, fw->getTarget(), fw->getActionKey(), d_key, NULL, lock_icon);
v_item[i].menuItem->hintIcon = fw->hintIcon;
v_item[i].menuItem->hint = fw->hint;