mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-29 08:21:07 +02:00
CPersonalizeGui: fix visualize of passive and active locked items
Origin commit data
------------------
Commit: 7c0d0b06d0
Author: Thilo Graf <dbt@novatux.de>
Date: 2017-09-17 (Sun, 17 Sep 2017)
This commit is contained in:
@@ -927,12 +927,13 @@ void CPersonalizeGui::addPersonalizedItems()
|
|||||||
use_pin = true;
|
use_pin = true;
|
||||||
|
|
||||||
//set pinmode for personalize menu or for settings manager menu and if any item is pin protected
|
//set pinmode for personalize menu or for settings manager menu and if any item is pin protected
|
||||||
if (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])
|
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;
|
use_pin = true;
|
||||||
lock_icon = NEUTRINO_ICON_LOCK_PASSIVE;
|
lock_icon = NEUTRINO_ICON_LOCK_PASSIVE;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//convert item to locked forwarder and use generated pin mode for usage as ask parameter
|
//convert item to locked forwarder and use generated pin mode for usage as ask parameter
|
||||||
v_item[i].menuItem = new CLockedMenuForwarder(fw->getTextLocale(),
|
v_item[i].menuItem = new CLockedMenuForwarder(fw->getTextLocale(),
|
||||||
@@ -941,6 +942,15 @@ void CPersonalizeGui::addPersonalizedItems()
|
|||||||
v_item[i].menuItem->hintIcon = fw->hintIcon;
|
v_item[i].menuItem->hintIcon = fw->hintIcon;
|
||||||
v_item[i].menuItem->hint = fw->hint;
|
v_item[i].menuItem->hint = fw->hint;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* assign of visualized lock mode with lock icons for 'personalize menu' itself,
|
||||||
|
* required menu item is identified with relatetd locale that is used inside the settings menu
|
||||||
|
*/
|
||||||
|
if (fw->getTextLocale() == LOCALE_PERSONALIZE_HEAD){
|
||||||
|
lock_icon = g_settings.personalize[SNeutrinoSettings::P_MAIN_PINSTATUS] ? NEUTRINO_ICON_LOCK : (in_pinmode ? NEUTRINO_ICON_LOCK_PASSIVE : NULL);
|
||||||
|
v_item[i].menuItem->setInfoIconRight(lock_icon);
|
||||||
|
}
|
||||||
|
|
||||||
//assign slot for items, causes disable/enable by condition eg: receiver mode
|
//assign slot for items, causes disable/enable by condition eg: receiver mode
|
||||||
if (v_item[i].condition != DCOND_MODE_NONE ){
|
if (v_item[i].condition != DCOND_MODE_NONE ){
|
||||||
sigc::slot0<void> sl = sigc::bind<0>(sigc::mem_fun1(v_item[i].menuItem, &CMenuForwarder::disableByCondition), v_item[i].condition);
|
sigc::slot0<void> sl = sigc::bind<0>(sigc::mem_fun1(v_item[i].menuItem, &CMenuForwarder::disableByCondition), v_item[i].condition);
|
||||||
|
Reference in New Issue
Block a user