mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-09-02 18:31:12 +02:00
Main Menu: try to add dynamic possibility to disable items on runtime
The issue is that it's not really possible to disable/enable menu items on
runtime with an existant menu widget instance eg with personalized menu items.
Here we need a dynamic solution to disable items depends on stb-mode (mode_ts, mode_tv etc)
This should be solved here with an additional parameter for personalized items.
New paramter is named: disable_condition
Possible alvailable values at the moment are:
DCOND_MODE_NONE as default
DCOND_MODE_TV
DCOND_MODE_RADIO
DCOND_MODE_TS
includes some improvements by Sven
- menue: remove old_iconName handling
... icons should be painted on deactivated items too
- menue: try to fix position <-> selection missmatch
Origin commit data
------------------
Branch: ni/coolstream
Commit: 1f95f38d32
Author: Thilo Graf <dbt@novatux.de>
Date: 2015-12-13 (Sun, 13 Dec 2015)
Origin message was:
------------------
Main Menu: try to add dynamic possibility to disable items on runtime
The issue is that it's not really possible to disable/enable menu items on
runtime with an existant menu widget instance eg with personalized menu items.
Here we need a dynamic solution to disable items depends on stb-mode (mode_ts, mode_tv etc)
This should be solved here with an additional parameter for personalized items.
New paramter is named: disable_condition
Possible alvailable values at the moment are:
DCOND_MODE_NONE as default
DCOND_MODE_TV
DCOND_MODE_RADIO
DCOND_MODE_TS
includes some improvements by Sven
- menue: remove old_iconName handling
... icons should be painted on deactivated items too
- menue: try to fix position <-> selection missmatch
------------------
This commit was generated by Migit
This commit is contained in:
@@ -111,6 +111,7 @@ typedef struct menu_item_t
|
||||
int* personalize_mode;
|
||||
int item_mode;
|
||||
CMenuItem *observer_Item;
|
||||
int condition;
|
||||
}menu_item_struct_t;
|
||||
|
||||
typedef struct observ_menu_item_t
|
||||
@@ -242,8 +243,8 @@ class CPersonalizeGui : public CMenuTarget, public CChangeObserver, public CPINP
|
||||
int getItemsCount(CMenuWidget *widget);
|
||||
int getItemsCount(const int& widget_id);
|
||||
void setShortcut(const int& short_cut = 1) {shortcut = short_cut;};
|
||||
void addItem(CMenuWidget *widget, CMenuItem *menu_Item, const int *personalize_mode = NULL, const bool defaultselected = false, const int& item_mode = PERSONALIZE_SHOW_AS_ITEM_OPTION, CMenuItem *observer_Item = NULL);
|
||||
void addItem(const int& widget_id, CMenuItem *menu_Item, const int *personalize_mode = NULL, const bool defaultselected = false, const int& item_mode = PERSONALIZE_SHOW_AS_ITEM_OPTION, CMenuItem *observer_Item = NULL);
|
||||
void addItem(CMenuWidget *widget, CMenuItem *menu_Item, const int *personalize_mode = NULL, const bool defaultselected = false, const int& item_mode = PERSONALIZE_SHOW_AS_ITEM_OPTION, CMenuItem *observer_Item = NULL, const menu_item_disable_cond_t& disable_condition = DCOND_MODE_NONE );
|
||||
void addItem(const int& widget_id, CMenuItem *menu_Item, const int *personalize_mode = NULL, const bool defaultselected = false, const int& item_mode = PERSONALIZE_SHOW_AS_ITEM_OPTION, CMenuItem *observer_Item = NULL, const menu_item_disable_cond_t& disable_condition = DCOND_MODE_NONE );
|
||||
void addIntroItems(CMenuWidget *widget);
|
||||
void addIntroItems(const int& widget_id);
|
||||
void addSeparator(CMenuWidget &menu, const neutrino_locale_t locale_text = NONEXISTANT_LOCALE, const int& item_mode = PERSONALIZE_SHOW_AS_ITEM_OPTION);
|
||||
|
Reference in New Issue
Block a user