mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-09-10 23:28:28 +02:00
Merge branch 'master' into pu/mp
Origin commit data
------------------
Branch: ni/coolstream
Commit: a23737a626
Author: Jacek Jendrzej <overx300@gmail.com>
Date: 2017-09-18 (Mon, 18 Sep 2017)
------------------
No further description and justification available within origin commit message!
------------------
This commit was generated by Migit
This commit is contained in:
@@ -929,12 +929,13 @@ void CPersonalizeGui::addPersonalizedItems()
|
||||
use_pin = true;
|
||||
|
||||
//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])
|
||||
{
|
||||
use_pin = true;
|
||||
lock_icon = NEUTRINO_ICON_LOCK_PASSIVE;
|
||||
}
|
||||
}
|
||||
|
||||
//convert item to locked forwarder and use generated pin mode for usage as ask parameter
|
||||
v_item[i].menuItem = new CLockedMenuForwarder(fw->getTextLocale(),
|
||||
@@ -943,6 +944,15 @@ void CPersonalizeGui::addPersonalizedItems()
|
||||
v_item[i].menuItem->hintIcon = fw->hintIcon;
|
||||
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
|
||||
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);
|
||||
|
@@ -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)
|
||||
|
@@ -2087,18 +2087,21 @@ void CControlAPI::ScreenshotCGI(CyhookHandler *hh)
|
||||
if(!hh->ParamList["name"].empty())
|
||||
filename = hh->ParamList["name"];
|
||||
|
||||
CScreenShot * sc = new CScreenShot("/tmp/" + filename + ".png", (CScreenShot::screenshot_format_t)0 /*PNG*/);
|
||||
sc->EnableOSD(enableOSD);
|
||||
sc->EnableVideo(enableVideo);
|
||||
CScreenShot * screenshot = new CScreenShot("/tmp/" + filename + ".png", (CScreenShot::screenshot_format_t)0 /*PNG*/);
|
||||
if(screenshot){
|
||||
screenshot->EnableOSD(enableOSD);
|
||||
screenshot->EnableVideo(enableVideo);
|
||||
#if 0
|
||||
sc->Start();
|
||||
hh->SendOk(); // FIXME what if sc->Start() failed?
|
||||
screenshot->Start();
|
||||
hh->SendOk(); // FIXME what if screenshot->Start() failed?
|
||||
#else
|
||||
if (sc->StartSync())
|
||||
if (screenshot->StartSync())
|
||||
hh->SendOk();
|
||||
else
|
||||
hh->SendError();
|
||||
#endif
|
||||
delete screenshot;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
|
Reference in New Issue
Block a user