mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-29 16:31:11 +02:00
CMenuItem: add members set/get info icon inside menu items
This commit is contained in:
@@ -69,10 +69,7 @@ CMenuItem::CMenuItem(bool Active, neutrino_msg_t DirectKey, const char * const I
|
||||
else
|
||||
setIconName();
|
||||
|
||||
if (IconName_Info_right && *IconName_Info_right)
|
||||
iconName_Info_right = IconName_Info_right;
|
||||
else
|
||||
iconName_Info_right = NULL;
|
||||
setInfoIconRight(IconName_Info_right);
|
||||
|
||||
hintIcon = NULL;
|
||||
|
||||
@@ -156,6 +153,13 @@ void CMenuItem::disableByCondition(const menu_item_disable_cond_t& condition)
|
||||
}
|
||||
}
|
||||
|
||||
void CMenuItem::setInfoIconRight(const char * const IconName_Info_right){
|
||||
if (IconName_Info_right && *IconName_Info_right)
|
||||
iconName_Info_right = IconName_Info_right;
|
||||
else
|
||||
iconName_Info_right = NULL;
|
||||
}
|
||||
|
||||
void CMenuItem::setMarked(const bool Marked)
|
||||
{
|
||||
marked = Marked;
|
||||
|
@@ -197,6 +197,8 @@ class CMenuItem : public CComponentsSignals
|
||||
void activateNotify(void);
|
||||
virtual void disableByCondition(const menu_item_disable_cond_t& condition);
|
||||
void setParentWidget(CMenuWidget* parent){parent_widget = parent;}
|
||||
void setInfoIconRight(const char * const IconName_Info_right);
|
||||
const char* getInfoIconRight(){return iconName_Info_right;}
|
||||
};
|
||||
|
||||
class CMenuSeparator : public CMenuItem
|
||||
@@ -689,7 +691,6 @@ class CLockedMenuForwarder : public CMenuForwarder, public CPINProtection
|
||||
: CMenuForwarder(Text, Active, Option, Target, ActionKey, DirectKey, IconName, IconName_Info_right) ,CPINProtection(_validPIN)
|
||||
{
|
||||
Ask = ask;
|
||||
|
||||
//if we in ask mode then show NEUTRINO_ICON_SCRAMBLED as default info icon or no icon,
|
||||
//but use always an info icon if defined in parameter 'IconName_Info_right'
|
||||
if (IconName_Info_right || ask)
|
||||
|
Reference in New Issue
Block a user