Merge remote-tracking branch 'check/next-cc'

...only build-tested, needs fixes


Origin commit data
------------------
Branch: ni/coolstream
Commit: ecd62d81d1
Author: Stefan Seyfried <seife@tuxbox-git.slipkontur.de>
Date: 2014-02-15 (Sat, 15 Feb 2014)



------------------
This commit was generated by Migit
This commit is contained in:
Stefan Seyfried
2014-02-15 20:22:07 +01:00
77 changed files with 1056 additions and 396 deletions

View File

@@ -818,7 +818,7 @@ void CMenuWidget::checkHints()
{
GenericMenuBack->setHint("", NONEXISTANT_LOCALE);
for (unsigned int i= 0; i< items.size(); i++) {
if(!items[i]->hintIcon.empty() || items[i]->hint != NONEXISTANT_LOCALE) {
if(!items[i]->hintIcon.empty() || items[i]->hint != NONEXISTANT_LOCALE || !items[i]->hintText.empty()) {
has_hints = true;
break;
}
@@ -1133,7 +1133,7 @@ void CMenuWidget::paintHint(int pos)
CMenuItem* item = items[pos];
if (item->hintIcon.empty() && item->hint == NONEXISTANT_LOCALE) {
if (item->hintIcon.empty() && item->hint == NONEXISTANT_LOCALE && item->hintText.empty()) {
if (info_box) {
savescreen ? info_box->hide(false) : info_box->kill();
hint_painted = false;
@@ -1141,7 +1141,7 @@ void CMenuWidget::paintHint(int pos)
return;
}
if (item->hint == NONEXISTANT_LOCALE)
if (item->hint == NONEXISTANT_LOCALE && item->hintText.empty())
return;
int iheight = item->getHeight();
@@ -1168,7 +1168,7 @@ void CMenuWidget::paintHint(int pos)
}
//init infobox
std::string str = g_Locale->getText(item->hint);
std::string str = item->hintText.empty() ? g_Locale->getText(item->hint) : item->hintText;
if (info_box){
info_box->setDimensionsAll(x, ypos2, iwidth, hint_height);
info_box->setFrameThickness(2);
@@ -1814,7 +1814,8 @@ int CMenuOptionLanguageChooser::paint( bool selected )
//-------------------------------------------------------------------------------------------------------------------------------
CMenuForwarder::CMenuForwarder(const neutrino_locale_t Text, const bool Active, const std::string &Option, CMenuTarget* Target, const char * const ActionKey, neutrino_msg_t DirectKey, const char * const IconName, const char * const IconName_Info_right, bool IsStatic)
{
option_string_ptr = &Option;
option_string = &Option;
option = NULL;
name = Text;
nameString = "";
active = Active;
@@ -1828,7 +1829,8 @@ CMenuForwarder::CMenuForwarder(const neutrino_locale_t Text, const bool Active,
CMenuForwarder::CMenuForwarder(const std::string& Text, const bool Active, const std::string &Option, CMenuTarget* Target, const char * const ActionKey, neutrino_msg_t DirectKey, const char * const IconName, const char * const IconName_Info_right, bool IsStatic)
{
option_string_ptr = &Option;
option_string = &Option;
option = NULL;
name = NONEXISTANT_LOCALE;
nameString = Text;
active = Active;
@@ -1842,8 +1844,8 @@ CMenuForwarder::CMenuForwarder(const std::string& Text, const bool Active, const
CMenuForwarder::CMenuForwarder(const neutrino_locale_t Text, const bool Active, const char * const Option, CMenuTarget* Target, const char * const ActionKey, neutrino_msg_t DirectKey, const char * const IconName, const char * const IconName_Info_right, bool IsStatic)
{
option_string = Option ? Option : "";
option_string_ptr = &option_string;
option_string = NULL;
option = Option;
name = Text;
nameString = "";
active = Active;
@@ -1857,8 +1859,8 @@ CMenuForwarder::CMenuForwarder(const neutrino_locale_t Text, const bool Active,
CMenuForwarder::CMenuForwarder(const std::string& Text, const bool Active, const char * const Option, CMenuTarget* Target, const char * const ActionKey, neutrino_msg_t DirectKey, const char * const IconName, const char * const IconName_Info_right, bool IsStatic)
{
option_string = Option ? Option : "";
option_string_ptr = &option_string;
option_string = NULL;
option = Option;
name = NONEXISTANT_LOCALE;
nameString = Text;
active = Active;
@@ -1882,9 +1884,20 @@ void CMenuForwarder::setName(const neutrino_locale_t t)
nameString = "";
}
void CMenuForwarder::setOption(const char * const Option)
{
option = Option;
option_string = NULL;
if (used && x != -1)
paint();
}
void CMenuForwarder::setOption(const std::string &Option)
{
option_string = Option;
option = NULL;
option_string = &Option;
if (used && x != -1)
paint();
}
int CMenuForwarder::getHeight(void) const
@@ -1924,9 +1937,11 @@ int CMenuForwarder::exec(CMenuTarget* parent)
std::string CMenuForwarder::getOption(void)
{
if (!option_string_ptr->empty())
return *option_string_ptr;
if (jumpTarget)
if (option)
return (std::string)option;
else if (option_string)
return *option_string;
else if (jumpTarget)
return jumpTarget->getValue();
return "";
}