diff --git a/src/gui/osd_setup.cpp b/src/gui/osd_setup.cpp index 58464cfa3..db6148b6c 100644 --- a/src/gui/osd_setup.cpp +++ b/src/gui/osd_setup.cpp @@ -1631,6 +1631,7 @@ int COsdSetup::showContextChanlistMenu(CChannelList *parent_channellist) int res = menu_chanlist->exec(NULL, ""); cselected = menu_chanlist->getSelected(); + delete channellistNotifier; delete menu_chanlist; return res; } diff --git a/src/gui/personalize.cpp b/src/gui/personalize.cpp index f93bc669e..b65309707 100644 --- a/src/gui/personalize.cpp +++ b/src/gui/personalize.cpp @@ -927,12 +927,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(), @@ -941,6 +942,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 sl = sigc::bind<0>(sigc::mem_fun1(v_item[i].menuItem, &CMenuForwarder::disableByCondition), v_item[i].condition); diff --git a/src/gui/widget/hintbox.cpp b/src/gui/widget/hintbox.cpp index e0b6bfd4c..c08b31be5 100644 --- a/src/gui/widget/hintbox.cpp +++ b/src/gui/widget/hintbox.cpp @@ -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); diff --git a/src/gui/widget/keychooser.cpp b/src/gui/widget/keychooser.cpp index 8cbf96e75..6d8f712ab 100644 --- a/src/gui/widget/keychooser.cpp +++ b/src/gui/widget/keychooser.cpp @@ -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; } diff --git a/src/gui/widget/menue.cpp b/src/gui/widget/menue.cpp index 7ab626ada..b3cbbbb0c 100644 --- a/src/gui/widget/menue.cpp +++ b/src/gui/widget/menue.cpp @@ -73,10 +73,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; @@ -162,6 +159,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; diff --git a/src/gui/widget/menue.h b/src/gui/widget/menue.h index 00a6ebb6f..ac57996af 100644 --- a/src/gui/widget/menue.h +++ b/src/gui/widget/menue.h @@ -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;} //NI lcd4l-support std::string lcd4l_text; @@ -692,7 +694,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) diff --git a/src/neutrino.cpp b/src/neutrino.cpp index 357f4732a..be8c2950f 100644 --- a/src/neutrino.cpp +++ b/src/neutrino.cpp @@ -4067,6 +4067,7 @@ void CNeutrinoApp::saveEpg(bool cvfd_mode) //printf("Msg %x timeout %d EVT_SI_FINISHED %x\n", msg, CRCInput::RC_timeout, NeutrinoMessages::EVT_SI_FINISHED); CVFD::getInstance()->Clear(); CVFD::getInstance()->setMode(cvfd_mode ? CVFD::MODE_SHUTDOWN : CVFD::MODE_STANDBY);// true CVFD::MODE_SHUTDOWN , false CVFD::MODE_STANDBY + delete [] (unsigned char*) data; break; } else if (!cvfd_mode){ printf("wait for epg saving, Msg %x \n", (int) msg); diff --git a/src/nhttpd/tuxboxapi/controlapi.cpp b/src/nhttpd/tuxboxapi/controlapi.cpp index a214a67cd..c74bb6fe0 100644 --- a/src/nhttpd/tuxboxapi/controlapi.cpp +++ b/src/nhttpd/tuxboxapi/controlapi.cpp @@ -2091,18 +2091,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()) - hh->SendOk(); - else - hh->SendError(); + if (screenshot->StartSync()) + hh->SendOk(); + else + hh->SendError(); #endif + delete screenshot; + } } //-----------------------------------------------------------------------------