diff --git a/src/gui/audioplayer.cpp b/src/gui/audioplayer.cpp index 05836d205..d267edfd6 100644 --- a/src/gui/audioplayer.cpp +++ b/src/gui/audioplayer.cpp @@ -512,10 +512,9 @@ int CAudioPlayerGui::show() { if (m_show_playlist && !m_playlist.empty() ) { - int step = 0; int prevselected = m_selected; + int step = msg == CRCInput::RC_page_up ? m_listmaxshow : 1; - step = msg == CRCInput::RC_page_up ? m_listmaxshow : 1; m_selected -= step; if ((prevselected-step) < 0) m_selected = m_playlist.size()-1; @@ -1197,7 +1196,6 @@ void CAudioPlayerGui::scanXmlData(xmlDocPtr answer_parser, const char *nametag, char *ptr = NULL; char *name = NULL; char *url = NULL; - char *type = NULL; time_t bitrate = 0; bool skip = true; listPos++; @@ -1210,6 +1208,7 @@ void CAudioPlayerGui::scanXmlData(xmlDocPtr answer_parser, const char *nametag, #endif // LCD_UPDATE if (usechild) { + char *type = NULL; xmlNodePtr child = element->xmlChildrenNode; while (child) { if (strcmp(xmlGetName(child), nametag) == 0) diff --git a/src/gui/audioplayer_setup.cpp b/src/gui/audioplayer_setup.cpp index 5ebee8d9a..1d952128a 100644 --- a/src/gui/audioplayer_setup.cpp +++ b/src/gui/audioplayer_setup.cpp @@ -73,7 +73,6 @@ int CAudioPlayerSetup::exec(CMenuTarget* parent, const std::string &actionKey) if(actionKey == "audioplayerdir") { - parent->hide(); CFileBrowser b; b.Dir_Mode=true; if (b.exec(g_settings.network_nfs_audioplayerdir)) diff --git a/src/gui/color.cpp b/src/gui/color.cpp index 57c04ce2a..cc0d42f90 100644 --- a/src/gui/color.cpp +++ b/src/gui/color.cpp @@ -120,7 +120,7 @@ void changeBrightnessRGBRel2(RgbColor *rgb, int br) HsvColor hsv; Rgb2Hsv(rgb, &hsv); - hsv.v = br; + hsv.v = br_; Hsv2Rgb(&hsv, rgb); } diff --git a/src/gui/components/cc_frm_clock.cpp b/src/gui/components/cc_frm_clock.cpp index 5ffa37582..9b960aae7 100644 --- a/src/gui/components/cc_frm_clock.cpp +++ b/src/gui/components/cc_frm_clock.cpp @@ -36,6 +36,7 @@ #include #include #include +#include using namespace std; @@ -151,11 +152,9 @@ void CComponentsFrmClock::initCCLockItems() } } - int w_tmp; - int minSepWidth = (*getClockFont())->getRenderWidth(":", true); - w_tmp = (*getClockFont())->getRenderWidth(".", true); - if (w_tmp > minSepWidth) - minSepWidth = w_tmp; + //calculate minimal separator width, we use a space char...should be enough + int minSepWidth = 0; + minSepWidth = max((*getClockFont())->getRenderWidth("\x20", true), minSepWidth); //modify available label items with current segment chars for (size_t i = 0; i < v_cc_items.size(); i++) @@ -177,19 +176,11 @@ void CComponentsFrmClock::initCCLockItems() string stmp = s_time.substr(i, 1); //get width of current segment - int wtmp; - char c = stmp.at(0); - switch (c) { - case '0' ... '9': - wtmp = (*getClockFont())->getMaxDigitWidth(); - break; - case '.': - case ':': - wtmp = minSepWidth; - break; - default: - wtmp = (*getClockFont())->getRenderWidth(stmp, true); - } + int wtmp = 0; + if (isdigit(stmp.at(0)) ) //check for digits, if true, we use digit width + wtmp = (*getClockFont())->getMaxDigitWidth(); + else //not digit found, we use render width or minimal width + wtmp = max((*getClockFont())->getRenderWidth(stmp, true), minSepWidth); //set size, text, color of current item lbl->setDimensionsAll(cl_x, cl_y, wtmp, cl_h); diff --git a/src/gui/infoviewer.cpp b/src/gui/infoviewer.cpp index a0bfe06f0..6767e09eb 100644 --- a/src/gui/infoviewer.cpp +++ b/src/gui/infoviewer.cpp @@ -265,14 +265,16 @@ void CInfoViewer::paintTime (bool show_dot) if (clock == NULL){ clock = new CComponentsFrmClock(); - clock->setCorner(RADIUS_LARGE, CORNER_TOP_RIGHT); clock->doPaintBg(false); } + clock->setColorBody(COL_INFOBAR_PLUS_0); + clock->setCorner(RADIUS_LARGE, CORNER_TOP_RIGHT); clock->setDimensionsAll(clock_x, clock_y, clock_w, clock_h); clock->setClockFont(SNeutrinoSettings::FONT_TYPE_INFOBAR_CHANNAME); - clock->setClockFormat(show_dot ? "%H:%M" : "%H.%M"); - + clock->setClockFormat(show_dot ? "%H:%M" : "%H %M"); + clock->setTextColor(COL_INFOBAR_TEXT); + clock->paint(CC_SAVE_SCREEN_NO); } diff --git a/src/gui/scan_setup.cpp b/src/gui/scan_setup.cpp index 825951008..6fd0c13ba 100644 --- a/src/gui/scan_setup.cpp +++ b/src/gui/scan_setup.cpp @@ -443,7 +443,7 @@ printf("C: %d S: %d T: %d\n", CFEManager::getInstance()->haveCable(),CFEManager: r_system = DVB_C; //-------------------------------------------------------------- - settings->addItem(GenericMenuSeparatorLine); + //settings->addItem(GenericMenuSeparatorLine); //-------------------------------------------------------------- //tune timeout if(CFEManager::getInstance()->getFrontendCount() <= 1) { diff --git a/src/gui/timeosd.cpp b/src/gui/timeosd.cpp index c7ea16720..beb571812 100644 --- a/src/gui/timeosd.cpp +++ b/src/gui/timeosd.cpp @@ -139,13 +139,13 @@ void CTimeOSD::hide() if(!visible) return; - InfoClock->enableInfoClock(true); - //GetDimensions(); frameBuffer->paintBackgroundBoxRel(m_xend - m_width - t1, m_y, m_width, m_height); timescale->reset(); frameBuffer->paintBackgroundBoxRel(m_xstart-2, m_y, 2+BARLEN+2, m_height); //clear border visible=false; + + InfoClock->enableInfoClock(true); } void CTimeOSD::switchMode(int position, int duration) diff --git a/src/gui/widget/menue.cpp b/src/gui/widget/menue.cpp index bdc4c4123..3fd2d508d 100644 --- a/src/gui/widget/menue.cpp +++ b/src/gui/widget/menue.cpp @@ -1235,7 +1235,7 @@ int CMenuOptionNumberChooser::getWidth(void) int w1 = 0; if (_lower_bound < 0) { w1 += g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getRenderWidth("-", true); - lower_bound *= -1; + _lower_bound *= -1; } while (_lower_bound > 0) { w1 += m; diff --git a/src/gui/widget/menue.h b/src/gui/widget/menue.h index 4134bf051..6ee0da92f 100644 --- a/src/gui/widget/menue.h +++ b/src/gui/widget/menue.h @@ -217,8 +217,8 @@ class CMenuForwarder : public CMenuItem int getHeight(void) const; int getWidth(void); void setTextLocale(const neutrino_locale_t Text); - neutrino_locale_t getTextLocale(){return text;}; - CMenuTarget* getTarget(){return jumpTarget;}; + neutrino_locale_t getTextLocale() const {return text;}; + CMenuTarget* getTarget() const {return jumpTarget;}; std::string getActionKey(){return actionKey;}; int exec(CMenuTarget* parent); @@ -356,7 +356,7 @@ class CMenuOptionChooser : public CAbstractMenuOptionChooser int getWidth(void); int paint(bool selected); - std::string getOptionName() {return optionNameString;}; + std::string getOptionName()const {return optionNameString;}; int exec(CMenuTarget* parent); int isMenueOptionChooser(void) const{return 1;} @@ -502,16 +502,16 @@ class CMenuWidget : public CMenuTarget void insertItem(const uint& item_id, CMenuItem* menuItem); void removeItem(const uint& item_id); int getItemId(CMenuItem* menuItem); - int getItemsCount(){return items.size();}; + int getItemsCount()const{return items.size();}; CMenuItem* getItem(const uint& item_id); virtual void paint(); virtual void hide(); virtual int exec(CMenuTarget* parent, const std::string & actionKey); virtual std::string getName(); void setSelected(const int &Preselected){ preselected = Preselected; }; - int getSelected(){ return selected; }; + int getSelected()const { return selected; }; void move(int xoff, int yoff); - int getSelectedLine(void){return exit_pressed ? -1 : selected;}; + int getSelectedLine(void)const {return exit_pressed ? -1 : selected;}; void setWizardMode(bool _from_wizard) { from_wizard = _from_wizard;}; void enableFade(bool _enable) { fade = _enable; }; void enableSaveScreen(bool enable); diff --git a/src/neutrino.cpp b/src/neutrino.cpp index a8cb63159..10b1a98f4 100644 --- a/src/neutrino.cpp +++ b/src/neutrino.cpp @@ -2347,9 +2347,11 @@ void CNeutrinoApp::RealRun(CMenuWidget &mainMenu) // eventlist if (g_settings.personalize[SNeutrinoSettings::P_MAIN_RED_BUTTON] == CPersonalizeGui::PERSONALIZE_ACTIVE_MODE_ENABLED)// EventList Menu - Personalization Check { + InfoClock->enableInfoClock(false); StopSubtitles(); usermenu.showUserMenu(SNeutrinoSettings::BUTTON_RED); StartSubtitles(); + InfoClock->enableInfoClock(true); } else ShowHintUTF(LOCALE_MESSAGEBOX_INFO, g_Locale->getText(LOCALE_PERSONALIZE_MENUDISABLEDHINT),450, 10); diff --git a/src/nhttpd/tuxboxapi/coolstream/neutrinoapi.cpp b/src/nhttpd/tuxboxapi/coolstream/neutrinoapi.cpp index bf23dc0f6..fb952f2ff 100644 --- a/src/nhttpd/tuxboxapi/coolstream/neutrinoapi.cpp +++ b/src/nhttpd/tuxboxapi/coolstream/neutrinoapi.cpp @@ -483,18 +483,18 @@ std::string CNeutrinoAPI::getLogoFile(std::string _logoURL, t_channel_id channel std::string channelName = GetServiceName(channelId); // replace(channelName, " ", "_"); _logoURL+="/"; - if(access((_logoURL + channelIdAsString + ".jpg").c_str(), 4) == 0) - return _logoURL + channelIdAsString + ".jpg"; - else if (access((_logoURL + channelIdAsString + ".png").c_str(), 4) == 0) - return _logoURL + channelIdAsString + ".png"; - else if (access((_logoURL + channelIdAsString + ".gif").c_str(), 4) == 0) - return _logoURL + channelIdAsString + ".gif"; + if (access((_logoURL + channelName + ".png").c_str(), 4) == 0) + return _logoURL + channelName + ".png"; else if (access((_logoURL + channelName + ".jpg").c_str(), 4) == 0) return _logoURL + channelName + ".jpg"; - else if (access((_logoURL + channelName + ".png").c_str(), 4) == 0) - return _logoURL + channelName + ".png"; else if (access((_logoURL + channelName + ".gif").c_str(), 4) == 0) return _logoURL + channelName + ".gif"; + else if(access((_logoURL + channelIdAsString + ".png").c_str(), 4) == 0) + return _logoURL + channelIdAsString + ".png"; + else if (access((_logoURL + channelIdAsString + ".jpg").c_str(), 4) == 0) + return _logoURL + channelIdAsString + ".jpg"; + else if (access((_logoURL + channelIdAsString + ".gif").c_str(), 4) == 0) + return _logoURL + channelIdAsString + ".gif"; else return ""; }