mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-31 17:31:20 +02:00
Merge branch 'master' into pu/mp
This commit is contained in:
@@ -268,7 +268,8 @@ void CHintBox::addHintItem(const std::string& Text, const int& text_mode, const
|
||||
/* pre define required info height depends of lines and minimal needed height*/
|
||||
int line_breaks = CTextBox::getLines(Text);
|
||||
int h_font = item_font->getHeight();
|
||||
int h_lines = h_font * line_breaks;
|
||||
int h_lines = h_font;
|
||||
h_lines += h_font * line_breaks;
|
||||
|
||||
/* get required height depends of possible lines and max height */
|
||||
h_hint_obj = min(HINTBOX_MAX_HEIGHT - (ccw_head ? ccw_head->getHeight() : 0), h_lines + 2*w_indentation);
|
||||
|
@@ -67,9 +67,9 @@ int CKeyChooserItem::exec(CMenuTarget* parent, const std::string &)
|
||||
// 10 seconds to choose a new key
|
||||
int timeout = 10;
|
||||
|
||||
CHintBox * hintbox = new CHintBox(name, LOCALE_KEYCHOOSER_TEXT, HINTBOX_MIN_WIDTH, NEUTRINO_ICON_SETTINGS, NEUTRINO_ICON_HINT_KEYS);
|
||||
//hintbox->setTimeOut(timeout);
|
||||
hintbox->paint();
|
||||
CHintBox hintbox(name, LOCALE_KEYCHOOSER_TEXT, HINTBOX_MIN_WIDTH, NEUTRINO_ICON_SETTINGS, NEUTRINO_ICON_HINT_KEYS);
|
||||
//hintbox.setTimeOut(timeout);
|
||||
hintbox.paint();
|
||||
|
||||
CFrameBuffer::getInstance()->blit();
|
||||
|
||||
@@ -92,7 +92,7 @@ int CKeyChooserItem::exec(CMenuTarget* parent, const std::string &)
|
||||
}
|
||||
|
||||
g_RCInput->setLongPressAny(false);
|
||||
hintbox->hide();
|
||||
hintbox.hide();
|
||||
return res;
|
||||
}
|
||||
|
||||
|
@@ -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