From e3306076de75587af637a69d140c27baef9fd34e Mon Sep 17 00:00:00 2001 From: svenhoefer Date: Fri, 11 Nov 2016 00:51:32 +0100 Subject: [PATCH 1/5] - eventlist: allow windows size changes w/o neutrino restart --- src/gui/eventlist.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/gui/eventlist.cpp b/src/gui/eventlist.cpp index 0902ff472..79366cec2 100644 --- a/src/gui/eventlist.cpp +++ b/src/gui/eventlist.cpp @@ -849,8 +849,9 @@ void CEventList::paintHead(t_channel_id _channel_id, std::string _channelname, s int font_lr = SNeutrinoSettings::FONT_TYPE_EVENTLIST_ITEMLARGE; if (!header) - header = new CComponentsFrmChain(x, y, full_width, theight); + header = new CComponentsFrmChain(); + header->setDimensionsAll(x, y, full_width, theight); header->enableColBodyGradient(g_settings.theme.menu_Head_gradient, COL_MENUCONTENT_PLUS_0, g_settings.theme.menu_Head_gradient_direction); header->setCorner(RADIUS_LARGE, CORNER_TOP); header->clear(); From a57ef577144278d806ea907e6e7cb754fc64334a Mon Sep 17 00:00:00 2001 From: svenhoefer Date: Fri, 11 Nov 2016 08:51:35 +0100 Subject: [PATCH 2/5] - moviebrowser: remove obsolete strReplace() function --- src/gui/moviebrowser/mb.h | 1 - src/gui/moviebrowser/mb_functions.h | 2 -- 2 files changed, 3 deletions(-) diff --git a/src/gui/moviebrowser/mb.h b/src/gui/moviebrowser/mb.h index 3bd73fa17..b5f224185 100644 --- a/src/gui/moviebrowser/mb.h +++ b/src/gui/moviebrowser/mb.h @@ -65,7 +65,6 @@ /* percent */ #define MIN_BROWSER_FRAME_HEIGHT 10 #define MAX_BROWSER_FRAME_HEIGHT 80 -// void strReplace(std::string& orig, const char* fstr, const std::string &rstr); #define MB_MAX_ROWS LF_MAX_ROWS #define MB_MAX_DIRS NETWORK_NFS_NR_OF_ENTRIES diff --git a/src/gui/moviebrowser/mb_functions.h b/src/gui/moviebrowser/mb_functions.h index a5fd547d3..b83a9b405 100644 --- a/src/gui/moviebrowser/mb_functions.h +++ b/src/gui/moviebrowser/mb_functions.h @@ -43,8 +43,6 @@ #include "mb_types.h" #include -void strReplace(std::string& orig, const char* fstr, const std::string &rstr); - static std::string rateFormat(int i) { return to_string(i/10) + "," + to_string(i%10); From 2cd4a9e410e2c186c816bcd1af9e52e786472db4 Mon Sep 17 00:00:00 2001 From: svenhoefer Date: Fri, 11 Nov 2016 13:46:55 +0100 Subject: [PATCH 3/5] - moviebrowser: show sorting menu; displays only available options --- src/gui/moviebrowser/mb.cpp | 47 +++++++++++++++++++++++++++---------- 1 file changed, 35 insertions(+), 12 deletions(-) diff --git a/src/gui/moviebrowser/mb.cpp b/src/gui/moviebrowser/mb.cpp index fca906cde..e7b840fce 100644 --- a/src/gui/moviebrowser/mb.cpp +++ b/src/gui/moviebrowser/mb.cpp @@ -910,7 +910,6 @@ int CMovieBrowser::exec(CMenuTarget* parent, const std::string & actionKey) } } } - return returnval; } @@ -2011,18 +2010,42 @@ bool CMovieBrowser::onButtonPressMainFrame(neutrino_msg_t msg) if (m_settings.gui != MB_GUI_LAST_PLAY && m_settings.gui != MB_GUI_LAST_RECORD) { // sorting is not avialable for last play and record - do - { - if (m_settings.sorting.item + 1 >= MB_INFO_MAX_NUMBER) - m_settings.sorting.item = (MB_INFO_ITEM)0; - else - m_settings.sorting.item = (MB_INFO_ITEM)(m_settings.sorting.item + 1); - } while (sortBy[m_settings.sorting.item] == NULL); - TRACE("[mb]->new sorting %d,%s\n",m_settings.sorting.item,g_Locale->getText(m_localizedItemName[m_settings.sorting.item])); - refreshBrowserList(); - refreshMovieInfo(); - refreshFoot(); + int directkey = 1; + int selected = -1; + CMenuSelectorTarget * selector = new CMenuSelectorTarget(&selected); + + CMenuWidget m(LOCALE_MOVIEBROWSER_FOOT_SORT, NEUTRINO_ICON_SETTINGS); + m.addIntroItems(); + + // just show sorting options for displayed rows; sorted by rows + for (int row = 0; row < MB_MAX_ROWS && row < m_settings.browserRowNr; row++) + { + for (unsigned int i = 0; i < MB_INFO_MAX_NUMBER; i++) + { + if (sortBy[i] == NULL) + continue; + + if (m_settings.browserRowItem[row] == i) + m.addItem(new CMenuForwarder(g_Locale->getText(m_localizedItemName[i]), true, NULL, selector, to_string(i).c_str(), CRCInput::convertDigitToKey(directkey++))); + } + } + + m.enableSaveScreen(true); + m.exec(NULL, ""); + + delete selector; + + if (selected >= 0) + { + m_settings.sorting.item = (MB_INFO_ITEM) selected; + + TRACE("[mb]->new sorting %d, %s\n", m_settings.sorting.item, g_Locale->getText(m_localizedItemName[m_settings.sorting.item])); + + refreshBrowserList(); + refreshMovieInfo(); + refreshFoot(); + } } } else if (msg == CRCInput::RC_spkr) From af9672edb877c34f10b60c64b4e4a8a9925d4e5a Mon Sep 17 00:00:00 2001 From: svenhoefer Date: Fri, 11 Nov 2016 13:46:55 +0100 Subject: [PATCH 4/5] - locale: small changes in moviebrowser locales --- data/locale/deutsch.locale | 12 ++++++------ data/locale/english.locale | 12 ++++++------ 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/data/locale/deutsch.locale b/data/locale/deutsch.locale index eb1469ee6..c3de46465 100644 --- a/data/locale/deutsch.locale +++ b/data/locale/deutsch.locale @@ -1700,10 +1700,10 @@ moviebrowser.info_file Datei moviebrowser.info_filename Dateiname moviebrowser.info_genre_major Genre moviebrowser.info_genre_minor Genre (untergeordnet) -moviebrowser.info_head Film Informationen +moviebrowser.info_head Film-Informationen moviebrowser.info_head_update Inhalte in allen sichtbaren Filminfos speichern -moviebrowser.info_info1 Info 1 -moviebrowser.info_info2 Info 2 +moviebrowser.info_info1 Genre bzw. Episoden +moviebrowser.info_info2 Film-Beschreibung moviebrowser.info_length Spieldauer (Min) moviebrowser.info_parental_lockage FSK moviebrowser.info_parental_lockage_0year immer @@ -1760,9 +1760,9 @@ moviebrowser.short_filename Name moviebrowser.short_format Format moviebrowser.short_genre_major Genre moviebrowser.short_genre_minor Genre -moviebrowser.short_info1 Info 1 -moviebrowser.short_info2 Info 2 -moviebrowser.short_length Min +moviebrowser.short_info1 Genre/Episoden +moviebrowser.short_info2 Beschreibung +moviebrowser.short_length Länge moviebrowser.short_parental_lockage FSK moviebrowser.short_path Pfad moviebrowser.short_prevplaydate Zuletzt diff --git a/data/locale/english.locale b/data/locale/english.locale index cc29d58f4..ed16dddb2 100644 --- a/data/locale/english.locale +++ b/data/locale/english.locale @@ -1700,10 +1700,10 @@ moviebrowser.info_file File moviebrowser.info_filename Filename moviebrowser.info_genre_major Genre moviebrowser.info_genre_minor Genre (minor) -moviebrowser.info_head Film Information +moviebrowser.info_head Movie informations moviebrowser.info_head_update Save changes in all movie info files -moviebrowser.info_info1 Info 1 -moviebrowser.info_info2 Info 2 +moviebrowser.info_info1 Genre resp. episodes +moviebrowser.info_info2 Movie description moviebrowser.info_length Length (Min) moviebrowser.info_parental_lockage Parental Lock age moviebrowser.info_parental_lockage_0year always @@ -1760,9 +1760,9 @@ moviebrowser.short_filename Name moviebrowser.short_format Format moviebrowser.short_genre_major Genre moviebrowser.short_genre_minor Genre -moviebrowser.short_info1 Info 1 -moviebrowser.short_info2 Info 2 -moviebrowser.short_length Min +moviebrowser.short_info1 Genre/Episodes +moviebrowser.short_info2 Description +moviebrowser.short_length Length moviebrowser.short_parental_lockage Age moviebrowser.short_path Path moviebrowser.short_prevplaydate Last From ad7947d11a7c5c133b912474503e687cbf20e363 Mon Sep 17 00:00:00 2001 From: svenhoefer Date: Fri, 11 Nov 2016 16:35:50 +0100 Subject: [PATCH 5/5] - moviebrowser: reset m_pcInfo1 box to default height, ... when turning m_settings.browserAdditional off --- src/gui/moviebrowser/mb.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/gui/moviebrowser/mb.cpp b/src/gui/moviebrowser/mb.cpp index e7b840fce..42d995daf 100644 --- a/src/gui/moviebrowser/mb.cpp +++ b/src/gui/moviebrowser/mb.cpp @@ -3438,14 +3438,17 @@ bool CMovieBrowser::showMenu(bool calledExternally) if (reInitFrames) { #if 1 - if (m_settings.browserAdditional && oldAdditional != m_settings.browserAdditional) + if (oldAdditional != m_settings.browserAdditional) { /* Bad 'hack' to force a smaller m_pcInfo1 box. This can be reconfigured by user later. It's just to align view to channellist's view. */ - m_settings.browserFrameHeight = 75; + if (m_settings.browserAdditional) + m_settings.browserFrameHeight = 75; + else + m_settings.browserFrameHeight = 65; } #endif initFrames();