From 7c341be80996024e4f64f400338597669b2d01eb Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Tue, 9 May 2017 11:30:06 +0200 Subject: [PATCH 01/20] CBuildInfo: fix shadow parameter Type is int not bool Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/1d5bb7cd8eb1d2c772d6b1e66fa0a9d9c8818791 Author: Thilo Graf Date: 2017-05-09 (Tue, 09 May 2017) ------------------ This commit was generated by Migit --- src/gui/buildinfo.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/buildinfo.cpp b/src/gui/buildinfo.cpp index 23f81f85b..b35300b78 100644 --- a/src/gui/buildinfo.cpp +++ b/src/gui/buildinfo.cpp @@ -53,7 +53,7 @@ void CBuildInfo::initVarBuildInfo() setWindowHeaderButtons(CComponentsHeader::CC_BTN_MENU | CComponentsHeader::CC_BTN_EXIT); - shadow = true; + shadow = CC_SHADOW_ON; } From ab7e287bdf968ce3a49ecfd61d1326ab8485b8d1 Mon Sep 17 00:00:00 2001 From: vanhofen Date: Tue, 9 May 2017 11:40:32 +0200 Subject: [PATCH 02/20] locale: minor changes in EPG-Plus locales Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/468fbcd79c776bd0b3decbb4d82f1c10eb7f5ff8 Author: vanhofen Date: 2017-05-09 (Tue, 09 May 2017) Origin message was: ------------------ - locale: minor changes in EPG-Plus locales ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- data/locale/deutsch.locale | 6 +++--- data/locale/english.locale | 24 ++++++++++++------------ 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/data/locale/deutsch.locale b/data/locale/deutsch.locale index d8739fca7..d44cc4275 100644 --- a/data/locale/deutsch.locale +++ b/data/locale/deutsch.locale @@ -1,5 +1,5 @@ AUDIOSelectMenue.head Auswahl der Tonspur -EPGMenu.epgplus Vorschauübersicht +EPGMenu.epgplus Vorschau-Übersicht EPGMenu.eventinfo Info zur Sendung EPGMenu.eventlist Vorschau aktuelles Programm EPGMenu.head EPG - Programminformation @@ -7,7 +7,7 @@ EPGMenu.streaminfo Technische Information EPGPlus.actions Aktionen EPGPlus.bybouquet_mode bouquetweise EPGPlus.bypage_mode seitenweise -EPGPlus.head Vorschau Übersicht (EPG Plus) +EPGPlus.head Vorschau-Übersicht (EPG Plus) EPGPlus.next_bouquet Bouquet vor EPGPlus.options Optionen EPGPlus.page_down Seite zurück @@ -19,7 +19,7 @@ EPGPlus.remind Vormerken EPGPlus.scroll_mode Scroll-Modus EPGPlus.stretch_mode Stretch-Modus EPGPlus.swap_mode Blättern -EPGPlus.view_mode Modus +EPGPlus.view_mode Ansicht GENRE.ALL aus GENRE.ARTS Kultur GENRE.ARTS.0 Kunst/Kultur diff --git a/data/locale/english.locale b/data/locale/english.locale index 7d71de370..e404aef70 100644 --- a/data/locale/english.locale +++ b/data/locale/english.locale @@ -2,24 +2,24 @@ AUDIOSelectMenue.head Audio Selection EPGMenu.epgplus Eventlist overview EPGMenu.eventinfo Details current program EPGMenu.eventlist Eventlist current programm -EPGMenu.head EPG - Program Information -EPGMenu.streaminfo technical information +EPGMenu.head EPG - Program information +EPGMenu.streaminfo Technical information EPGPlus.actions Actions EPGPlus.bybouquet_mode by bouquet EPGPlus.bypage_mode by page -EPGPlus.head Eventlist Overview (EPG Plus) -EPGPlus.next_bouquet next bouquet -EPGPlus.options options -EPGPlus.page_down page down -EPGPlus.page_up page up -EPGPlus.prev_bouquet prev bouquet +EPGPlus.head Eventlist overview (EPG Plus) +EPGPlus.next_bouquet Next bouquet +EPGPlus.options Options +EPGPlus.page_down Page down +EPGPlus.page_up Page up +EPGPlus.prev_bouquet Prev bouquet EPGPlus.record Record EPGPlus.refresh_epg Refresh EPGPlus.remind Schedule -EPGPlus.scroll_mode Scroll Mode -EPGPlus.stretch_mode Stretch Mode -EPGPlus.swap_mode swap mode -EPGPlus.view_mode view mode +EPGPlus.scroll_mode Scroll mode +EPGPlus.stretch_mode Stretch mode +EPGPlus.swap_mode Swap mode +EPGPlus.view_mode View mode GENRE.ALL off GENRE.ARTS Arts GENRE.ARTS.0 arts/culture From aab9c8df904f838027619d20921346c8a27fcef1 Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Tue, 9 May 2017 12:08:03 +0200 Subject: [PATCH 03/20] CLuaInstCCWindow: fix passed shadow paramater Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/1f978f01ad2a14ce69097b34bd1d550523b8f9e9 Author: Thilo Graf Date: 2017-05-09 (Tue, 09 May 2017) ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- src/gui/lua/lua_api_version.h | 2 +- src/gui/lua/lua_cc_window.cpp | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/gui/lua/lua_api_version.h b/src/gui/lua/lua_api_version.h index 078e88ef8..1edd9814a 100644 --- a/src/gui/lua/lua_api_version.h +++ b/src/gui/lua/lua_api_version.h @@ -4,4 +4,4 @@ * to luainstance.h changes */ #define LUA_API_VERSION_MAJOR 1 -#define LUA_API_VERSION_MINOR 73 +#define LUA_API_VERSION_MINOR 74 diff --git a/src/gui/lua/lua_cc_window.cpp b/src/gui/lua/lua_cc_window.cpp index 819fe18d2..8fb985e67 100644 --- a/src/gui/lua/lua_cc_window.cpp +++ b/src/gui/lua/lua_cc_window.cpp @@ -89,12 +89,13 @@ int CLuaInstCCWindow::CCWindowNew(lua_State *L) tableLookup(L, "name", name) || tableLookup(L, "title", name) || tableLookup(L, "caption", name); tableLookup(L, "icon", icon); - bool has_shadow = false; + int has_shadow = CC_SHADOW_OFF; if (!tableLookup(L, "has_shadow", has_shadow)) { tmp1 = "false"; if (tableLookup(L, "has_shadow", tmp1)) paramBoolDeprecated(L, tmp1.c_str()); - has_shadow = (tmp1 == "true" || tmp1 == "1" || tmp1 == "yes"); + if ((tmp1 == "true" || tmp1 == "1" || tmp1 == "yes")) + has_shadow = CC_SHADOW_ON; } tableLookup(L, "color_frame" , color_frame); @@ -126,7 +127,7 @@ int CLuaInstCCWindow::CCWindowNew(lua_State *L) CLuaCCWindow **udata = (CLuaCCWindow **) lua_newuserdata(L, sizeof(CLuaCCWindow *)); *udata = new CLuaCCWindow(); - (*udata)->w = new CComponentsWindow(x, y, dx, dy, name.c_str(), icon.c_str(), 0, has_shadow, (fb_pixel_t)color_frame, (fb_pixel_t)color_body, (fb_pixel_t)color_shadow); + (*udata)->w = new CComponentsWindow(x, y, dx, dy, name.c_str(), icon.c_str(), NULL, has_shadow, (fb_pixel_t)color_frame, (fb_pixel_t)color_body, (fb_pixel_t)color_shadow); /* Ignore percent conversion of width and height to remain compatible with the Lua API */ (*udata)->w->setWidth(dx); From c7a44bf07f6ef6f759c1a23bd41f2d89fa117b8e Mon Sep 17 00:00:00 2001 From: vanhofen Date: Tue, 9 May 2017 13:31:59 +0200 Subject: [PATCH 04/20] clearify comment Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/c08144a9d9ba022c2548512bc97881521f900af6 Author: vanhofen Date: 2017-05-09 (Tue, 09 May 2017) Origin message was: ------------------ - clearify comment ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- src/neutrino.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/neutrino.cpp b/src/neutrino.cpp index 07f6d2231..1ec31e04a 100644 --- a/src/neutrino.cpp +++ b/src/neutrino.cpp @@ -457,8 +457,8 @@ int CNeutrinoApp::loadSetup(const char * fname) g_settings.hdd_statfs_mode = configfile.getInt32( "hdd_statfs_mode", SNeutrinoSettings::HDD_STATFS_RECORDING); /* - hw_caps uses CFEManager and CFEManager needs g_settings. - So g_settings cannot use hw_caps. + hw_caps needs CFEManager and CFEManager needs g_settings. + So loadSetup() cannot use hw_caps to init g_settings. For this reason we need this workaround. */ From 631df290569d71ebb47dc9ce869db44c8c208602 Mon Sep 17 00:00:00 2001 From: vanhofen Date: Tue, 9 May 2017 14:05:32 +0200 Subject: [PATCH 05/20] locale: small changes in EPG Plus titles Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/3b53914ebac0c0b83efa0b9b28d04d4001bca7e3 Author: vanhofen Date: 2017-05-09 (Tue, 09 May 2017) Origin message was: ------------------ - locale: small changes in EPG Plus titles ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- data/locale/deutsch.locale | 4 ++-- data/locale/english.locale | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/data/locale/deutsch.locale b/data/locale/deutsch.locale index 30037da20..2c4d31792 100644 --- a/data/locale/deutsch.locale +++ b/data/locale/deutsch.locale @@ -1,5 +1,5 @@ AUDIOSelectMenue.head Tonoptionen -EPGMenu.epgplus Vorschau-Übersicht +EPGMenu.epgplus Vorschau-Übersicht (EPG Plus) EPGMenu.eventinfo Info zur Sendung EPGMenu.eventlist Vorschau aktuelles Programm EPGMenu.head EPG - Programminformation @@ -7,7 +7,7 @@ EPGMenu.streaminfo Technische Information EPGPlus.actions Aktionen EPGPlus.bybouquet_mode bouquetweise EPGPlus.bypage_mode seitenweise -EPGPlus.head Vorschau-Übersicht (EPG Plus) +EPGPlus.head EPG Plus EPGPlus.next_bouquet Bouquet vor EPGPlus.options Optionen EPGPlus.page_down Seite zurück diff --git a/data/locale/english.locale b/data/locale/english.locale index fd3cbd995..acdba6ab8 100644 --- a/data/locale/english.locale +++ b/data/locale/english.locale @@ -1,5 +1,5 @@ AUDIOSelectMenue.head Audio Selection -EPGMenu.epgplus Eventlist overview +EPGMenu.epgplus Eventlist overview (EPG Plus) EPGMenu.eventinfo Details current program EPGMenu.eventlist Eventlist current programm EPGMenu.head EPG - Program information @@ -7,7 +7,7 @@ EPGMenu.streaminfo Technical information EPGPlus.actions Actions EPGPlus.bybouquet_mode by bouquet EPGPlus.bypage_mode by page -EPGPlus.head Eventlist overview (EPG Plus) +EPGPlus.head EPG Plus EPGPlus.next_bouquet Next bouquet EPGPlus.options Options EPGPlus.page_down Page down From d50c8ef4f8c717ca89f4fa3ab5ead8a587a55ce7 Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Wed, 10 May 2017 10:42:08 +0200 Subject: [PATCH 06/20] CComponentsHeader: fix order of width calculation Required for following position calculation Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/107db09299f528ab0cea8bd7970a8aedb716d258 Author: Thilo Graf Date: 2017-05-10 (Wed, 10 May 2017) ------------------ This commit was generated by Migit --- src/gui/components/cc_frm_header.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/gui/components/cc_frm_header.cpp b/src/gui/components/cc_frm_header.cpp index f6e20c5a0..21633e22c 100644 --- a/src/gui/components/cc_frm_header.cpp +++ b/src/gui/components/cc_frm_header.cpp @@ -576,20 +576,20 @@ void CComponentsHeader::initCaption() //set header text properties if (cch_text_obj){ + //recalc caption width + cc_text_w = min(cc_text_w, cch_font->getRenderWidth(cch_text)/*+ OFFSET_INNER_MID*/); + //set alignment of text item in dependency from text alignment if (cch_caption_align == CTextBox::CENTER) cch_text_x = CC_CENTERED; - //recalc caption width - cc_text_w = min(cc_text_w, cch_font->getRenderWidth(cch_text)+ OFFSET_INNER_MID); - //assign general properties cch_text_obj->setDimensionsAll(cch_text_x, cch_items_y, cc_text_w, height); cch_text_obj->setColorBody(col_body); if (cc_body_gradient_enable != cc_body_gradient_enable_old) cch_text_obj->getCTextBoxObject()->clearScreenBuffer(); cch_text_obj->setTextColor(cch_col_text); - cch_text_obj->setText(cch_text, cch_caption_align, cch_font); + cch_text_obj->setText(cch_text, cch_caption_align, cch_font, cch_col_text); cch_text_obj->enableTboxSaveScreen(cc_body_gradient_enable || cc_txt_save_screen); //corner of text item From 2564b17c7a2c4e9567cca3bfc4c9814d61626dfe Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Wed, 10 May 2017 10:42:08 +0200 Subject: [PATCH 07/20] CComponentsHeader: remove double text color assignment Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/c320dbf8ec424c40795e1eeea212946763ccac2b Author: Thilo Graf Date: 2017-05-10 (Wed, 10 May 2017) ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- src/gui/components/cc_frm_header.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/src/gui/components/cc_frm_header.cpp b/src/gui/components/cc_frm_header.cpp index 21633e22c..e0ae29a75 100644 --- a/src/gui/components/cc_frm_header.cpp +++ b/src/gui/components/cc_frm_header.cpp @@ -588,7 +588,6 @@ void CComponentsHeader::initCaption() cch_text_obj->setColorBody(col_body); if (cc_body_gradient_enable != cc_body_gradient_enable_old) cch_text_obj->getCTextBoxObject()->clearScreenBuffer(); - cch_text_obj->setTextColor(cch_col_text); cch_text_obj->setText(cch_text, cch_caption_align, cch_font, cch_col_text); cch_text_obj->enableTboxSaveScreen(cc_body_gradient_enable || cc_txt_save_screen); From e0b4ef9cf34a25268e1f90f42157e82e497331ba Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Wed, 10 May 2017 10:42:08 +0200 Subject: [PATCH 08/20] CComponentsHeader: fix centering of header title Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/178bf6f5968a317cf0913f6bb6e2f0a734a4a343 Author: Thilo Graf Date: 2017-05-10 (Wed, 10 May 2017) ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- src/gui/components/cc_frm_header.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/components/cc_frm_header.cpp b/src/gui/components/cc_frm_header.cpp index e0ae29a75..1f075bfac 100644 --- a/src/gui/components/cc_frm_header.cpp +++ b/src/gui/components/cc_frm_header.cpp @@ -581,7 +581,7 @@ void CComponentsHeader::initCaption() //set alignment of text item in dependency from text alignment if (cch_caption_align == CTextBox::CENTER) - cch_text_x = CC_CENTERED; + cch_text_x = width/2 - cc_text_w/2; //assign general properties cch_text_obj->setDimensionsAll(cch_text_x, cch_items_y, cc_text_w, height); From 22bff2865b74b69c0e0688ef74a415e0a133d3d2 Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Wed, 10 May 2017 10:42:08 +0200 Subject: [PATCH 09/20] CComponentsHeader: Try to adopt different logo/title alignments Not all constellations are tested. Please report. Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/5b541571f936275ad7973af6e6c9d90fb5016bfa Author: Thilo Graf Date: 2017-05-10 (Wed, 10 May 2017) ------------------ This commit was generated by Migit --- src/gui/components/cc_frm_header.cpp | 56 +++++++++++++++++++++------- 1 file changed, 43 insertions(+), 13 deletions(-) diff --git a/src/gui/components/cc_frm_header.cpp b/src/gui/components/cc_frm_header.cpp index 1f075bfac..da59a3b7f 100644 --- a/src/gui/components/cc_frm_header.cpp +++ b/src/gui/components/cc_frm_header.cpp @@ -302,13 +302,23 @@ void CComponentsHeader::initLogo() //right end int x_logo_right = width - cch_logo_obj->getWidth(); - if (cch_btn_obj) - x_logo_right -= cch_btn_obj->getWidth(); - if (cch_cl_obj) - x_logo_right -= cch_cl_obj->getWidth(); + if (cch_caption_align != CTextBox::RIGHT){ + if (cch_btn_obj) + x_logo_right -= cch_btn_obj->getWidth(); + if (cch_cl_obj) + x_logo_right -= cch_cl_obj->getWidth(); + }else{ + if (cch_icon_obj) + x_logo_right += cch_icon_obj->getWidth(); + } //left end - int x_logo_left = getCCItem(prev_id) ? getCCItem(prev_id)->getXPos() + getCCItem(prev_id)->getWidth() : 0; + int x_logo_left = cch_offset; + if (cch_caption_align != CTextBox::RIGHT) + x_logo_left = getCCItem(prev_id) ? getCCItem(prev_id)->getXPos() + getCCItem(prev_id)->getWidth() : 0; + else + if (cch_icon_obj) + x_logo_left += cch_icon_obj->getWidth(); //calculate available space int logo_space = x_logo_right + cch_logo_obj->getWidth() - x_logo_left; @@ -319,17 +329,30 @@ void CComponentsHeader::initLogo() //set final logo position int x_logo = 0; - if (cch_logo.Align == CC_LOGO_RIGHT) - x_logo = x_logo_right; + if (cch_logo.Align == CC_LOGO_RIGHT){ + if (cch_caption_align == CTextBox::RIGHT) + if (cch_text_obj) + x_logo = cch_text_obj->getXPos() - cch_logo_obj->getWidth(); + else + x_logo = x_logo_right; + } if (cch_logo.Align == CC_LOGO_LEFT) x_logo = x_logo_left; if (cch_logo.Align == CC_LOGO_CENTER){ x_logo = width/2 - cch_logo_obj->getWidth()/2; - //fallback if previous item and logo are overlapping - if (getCCItem(prev_id)){ - int x_tmp = x_logo_left + logo_space/2 - cch_logo_obj->getWidth()/2; - if (x_logo <= x_logo_left) - x_logo = x_tmp; + //fallback if adjacent item and logo are overlapping + if (cch_caption_align != CTextBox::RIGHT){ + if (getCCItem(prev_id)){ + int x_tmp = x_logo_left + logo_space/2 - cch_logo_obj->getWidth()/2; + if (x_logo <= x_logo_left) + x_logo = x_tmp; + } + }else{ + if (cch_text_obj){ + if (x_logo + cch_logo_obj->getWidth() >= cch_text_obj->getXPos()){ + x_logo = (x_logo_left + cch_text_obj->getXPos())/2 - cch_logo_obj->getWidth()/2; + } + } } } @@ -576,13 +599,20 @@ void CComponentsHeader::initCaption() //set header text properties if (cch_text_obj){ + int w_free = cc_text_w; + //recalc caption width - cc_text_w = min(cc_text_w, cch_font->getRenderWidth(cch_text)/*+ OFFSET_INNER_MID*/); + cc_text_w = min(cc_text_w, cch_font->getRenderWidth(cch_text)+ OFFSET_INNER_MID); //set alignment of text item in dependency from text alignment if (cch_caption_align == CTextBox::CENTER) cch_text_x = width/2 - cc_text_w/2; + if (cch_caption_align == CTextBox::RIGHT){ + cch_text_x += w_free; + cch_text_x -= max(cc_text_w, cch_font->getRenderWidth(cch_text)+ OFFSET_INNER_MID); + } + //assign general properties cch_text_obj->setDimensionsAll(cch_text_x, cch_items_y, cc_text_w, height); cch_text_obj->setColorBody(col_body); From 1fe98a3e4d5582bb76a8164f0c286896607282ce Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Wed, 10 May 2017 10:42:08 +0200 Subject: [PATCH 10/20] CLuaInstCCWindow: try to fix window title align parameter Additional (lua_Integer)CTextBox::NO_AUTO_LINEBREAK) overwrites passed parameter and has no effect, because NO_AUTO_LINEBREAK is already default. Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/27eb80eb5b51f47c792a0c7ace9b4d597ac61579 Author: Thilo Graf Date: 2017-05-10 (Wed, 10 May 2017) ------------------ This commit was generated by Migit --- src/gui/lua/lua_api_version.h | 2 +- src/gui/lua/lua_cc_window.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gui/lua/lua_api_version.h b/src/gui/lua/lua_api_version.h index 1edd9814a..4320eacbe 100644 --- a/src/gui/lua/lua_api_version.h +++ b/src/gui/lua/lua_api_version.h @@ -4,4 +4,4 @@ * to luainstance.h changes */ #define LUA_API_VERSION_MAJOR 1 -#define LUA_API_VERSION_MINOR 74 +#define LUA_API_VERSION_MINOR 75 diff --git a/src/gui/lua/lua_cc_window.cpp b/src/gui/lua/lua_cc_window.cpp index 8fb985e67..490a48e37 100644 --- a/src/gui/lua/lua_cc_window.cpp +++ b/src/gui/lua/lua_cc_window.cpp @@ -224,7 +224,7 @@ int CLuaInstCCWindow::CCWindowSetCaption(lua_State *L) lua_Integer alignment = (lua_Integer)CTextBox::NO_AUTO_LINEBREAK; tableLookup(L, "alignment", alignment); - D->w->setWindowCaption(name, alignment | (lua_Integer)CTextBox::NO_AUTO_LINEBREAK); + D->w->setWindowCaption(name, alignment); return 0; } From 25645799c5af2d5a56bbaa5b6c10b13c25e0ac80 Mon Sep 17 00:00:00 2001 From: Jacek Jendrzej Date: Wed, 10 May 2017 15:35:44 +0200 Subject: [PATCH 11/20] use lua_Integer Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/843703b175b227151371afc2f941b356207f03f3 Author: Jacek Jendrzej Date: 2017-05-10 (Wed, 10 May 2017) ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- src/gui/lua/lua_cc_window.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/lua/lua_cc_window.cpp b/src/gui/lua/lua_cc_window.cpp index 490a48e37..6249af866 100644 --- a/src/gui/lua/lua_cc_window.cpp +++ b/src/gui/lua/lua_cc_window.cpp @@ -89,7 +89,7 @@ int CLuaInstCCWindow::CCWindowNew(lua_State *L) tableLookup(L, "name", name) || tableLookup(L, "title", name) || tableLookup(L, "caption", name); tableLookup(L, "icon", icon); - int has_shadow = CC_SHADOW_OFF; + lua_Integer has_shadow = CC_SHADOW_OFF; if (!tableLookup(L, "has_shadow", has_shadow)) { tmp1 = "false"; if (tableLookup(L, "has_shadow", tmp1)) From d831b0659aed1ee4124c193e4b80c8c50d807636 Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Thu, 11 May 2017 08:35:24 +0200 Subject: [PATCH 12/20] CComponentsHeader: fix brace error MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit suggest explicit braces to avoid ambiguous ‘else’ Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/1b2f1d320db1cf2fbfc7a85fec81c23597d52580 Author: Thilo Graf Date: 2017-05-11 (Thu, 11 May 2017) ------------------ This commit was generated by Migit --- src/gui/components/cc_frm_header.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gui/components/cc_frm_header.cpp b/src/gui/components/cc_frm_header.cpp index da59a3b7f..ea3af35d4 100644 --- a/src/gui/components/cc_frm_header.cpp +++ b/src/gui/components/cc_frm_header.cpp @@ -330,10 +330,10 @@ void CComponentsHeader::initLogo() //set final logo position int x_logo = 0; if (cch_logo.Align == CC_LOGO_RIGHT){ - if (cch_caption_align == CTextBox::RIGHT) + if (cch_caption_align == CTextBox::RIGHT){ if (cch_text_obj) x_logo = cch_text_obj->getXPos() - cch_logo_obj->getWidth(); - else + }else x_logo = x_logo_right; } if (cch_logo.Align == CC_LOGO_LEFT) From babdee806b28b9edf8f42240a7e44d8f7d997258 Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Thu, 11 May 2017 11:06:42 +0200 Subject: [PATCH 13/20] EpgPlus: use default parameter for titel arrangement Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/100a1606f05639f948c9e971b033a1d4006681d9 Author: Thilo Graf Date: 2017-05-11 (Thu, 11 May 2017) ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- src/gui/epgplus.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/epgplus.cpp b/src/gui/epgplus.cpp index 9fb8f0b57..7d554df79 100644 --- a/src/gui/epgplus.cpp +++ b/src/gui/epgplus.cpp @@ -126,7 +126,7 @@ void EpgPlus::Header::paint(const char * Name) this->logo->allowPaint(false); } this->head->setDimensionsAll(this->x, this->y, this->width, this->font->getHeight()); - this->head->setCaption(caption, CTextBox::NO_AUTO_LINEBREAK); + this->head->setCaption(caption); this->head->paint(CC_SAVE_SCREEN_NO); } } From 064b2cc58863b520cf9756d1d60f4efd79b07ef4 Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Thu, 11 May 2017 12:03:28 +0200 Subject: [PATCH 14/20] cc_frm_header.cpp/h: remove CTextBox types for title allignment Title object has only width of current text content. This causes CTextBox types have not a really visible effect. Now we have only three align types for title and these are related to cc-text object position. Involved classes adjusted too. Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/942a27e3ef1417506686ae5e8cda1fd10d785369 Author: Thilo Graf Date: 2017-05-11 (Thu, 11 May 2017) ------------------ This commit was generated by Migit --- src/gui/channellist.cpp | 2 +- src/gui/components/cc_frm_header.cpp | 24 +++++++------- src/gui/components/cc_frm_header.h | 48 ++++++++++++++++++---------- src/gui/components/cc_frm_window.cpp | 4 +-- src/gui/components/cc_frm_window.h | 12 ++++--- src/gui/eventlist.cpp | 2 +- src/gui/lua/lua_cc_window.cpp | 4 +-- src/gui/lua/lua_cc_window.h | 2 +- src/gui/scan.cpp | 2 +- src/gui/test_menu.cpp | 4 +-- 10 files changed, 60 insertions(+), 44 deletions(-) diff --git a/src/gui/channellist.cpp b/src/gui/channellist.cpp index 16f03c41b..3b08d8190 100644 --- a/src/gui/channellist.cpp +++ b/src/gui/channellist.cpp @@ -2132,7 +2132,7 @@ void CChannelList::paintHead() fb_pixel_t header_txt_col = (edit_state ? COL_RED : COL_MENUHEAD_TEXT); header->setColorBody(COL_MENUHEAD_PLUS_0); - header->setCaption(header_txt, CTextBox::NO_AUTO_LINEBREAK, header_txt_col); + header->setCaption(header_txt, DEFAULT_TITLE_ALIGN, header_txt_col); if (timeset) { if(!edit_state){ diff --git a/src/gui/components/cc_frm_header.cpp b/src/gui/components/cc_frm_header.cpp index ea3af35d4..f0a5ba052 100644 --- a/src/gui/components/cc_frm_header.cpp +++ b/src/gui/components/cc_frm_header.cpp @@ -130,7 +130,7 @@ void CComponentsHeader::initVarHeader( const int& x_pos, const int& y_pos, const cch_logo.dy_max = -1; cch_logo.Align = DEFAULT_LOGO_ALIGN; cch_col_text = COL_MENUHEAD_TEXT; - cch_caption_align = CTextBox::NO_AUTO_LINEBREAK; + cch_caption_align = DEFAULT_TITLE_ALIGN; cch_items_y = CC_CENTERED; cch_offset = OFFSET_INNER_MID; cch_icon_x = cch_offset; @@ -163,7 +163,7 @@ CComponentsHeader::~CComponentsHeader() v_cch_btn.clear(); } -void CComponentsHeader::setCaption(const std::string& caption, const int& align_mode, const fb_pixel_t& text_color) +void CComponentsHeader::setCaption(const std::string& caption, const cc_title_alignment_t& align_mode, const fb_pixel_t& text_color) { if (cch_cl_obj) cch_cl_obj->Stop(); @@ -172,7 +172,7 @@ void CComponentsHeader::setCaption(const std::string& caption, const int& align_ cch_col_text = text_color; } -void CComponentsHeader::setCaption(neutrino_locale_t caption_locale, const int& align_mode, const fb_pixel_t& text_color) +void CComponentsHeader::setCaption(neutrino_locale_t caption_locale, const cc_title_alignment_t& align_mode, const fb_pixel_t& text_color) { setCaption(string(g_Locale->getText(caption_locale)), align_mode, text_color); } @@ -302,7 +302,7 @@ void CComponentsHeader::initLogo() //right end int x_logo_right = width - cch_logo_obj->getWidth(); - if (cch_caption_align != CTextBox::RIGHT){ + if (!(cch_caption_align & CC_TITLE_RIGHT)){ if (cch_btn_obj) x_logo_right -= cch_btn_obj->getWidth(); if (cch_cl_obj) @@ -314,7 +314,7 @@ void CComponentsHeader::initLogo() //left end int x_logo_left = cch_offset; - if (cch_caption_align != CTextBox::RIGHT) + if (!(cch_caption_align & CC_TITLE_RIGHT)) x_logo_left = getCCItem(prev_id) ? getCCItem(prev_id)->getXPos() + getCCItem(prev_id)->getWidth() : 0; else if (cch_icon_obj) @@ -329,19 +329,19 @@ void CComponentsHeader::initLogo() //set final logo position int x_logo = 0; - if (cch_logo.Align == CC_LOGO_RIGHT){ - if (cch_caption_align == CTextBox::RIGHT){ + if (cch_logo.Align & CC_LOGO_RIGHT){ + if (cch_caption_align & CC_TITLE_RIGHT){ if (cch_text_obj) x_logo = cch_text_obj->getXPos() - cch_logo_obj->getWidth(); }else x_logo = x_logo_right; } - if (cch_logo.Align == CC_LOGO_LEFT) + if (cch_logo.Align & CC_LOGO_LEFT) x_logo = x_logo_left; - if (cch_logo.Align == CC_LOGO_CENTER){ + if (cch_logo.Align & CC_LOGO_CENTER){ x_logo = width/2 - cch_logo_obj->getWidth()/2; //fallback if adjacent item and logo are overlapping - if (cch_caption_align != CTextBox::RIGHT){ + if (!(cch_caption_align & CC_TITLE_RIGHT)){ if (getCCItem(prev_id)){ int x_tmp = x_logo_left + logo_space/2 - cch_logo_obj->getWidth()/2; if (x_logo <= x_logo_left) @@ -605,10 +605,10 @@ void CComponentsHeader::initCaption() cc_text_w = min(cc_text_w, cch_font->getRenderWidth(cch_text)+ OFFSET_INNER_MID); //set alignment of text item in dependency from text alignment - if (cch_caption_align == CTextBox::CENTER) + if (cch_caption_align & CC_TITLE_CENTER) cch_text_x = width/2 - cc_text_w/2; - if (cch_caption_align == CTextBox::RIGHT){ + if (cch_caption_align & CC_TITLE_RIGHT){ cch_text_x += w_free; cch_text_x -= max(cc_text_w, cch_font->getRenderWidth(cch_text)+ OFFSET_INNER_MID); } diff --git a/src/gui/components/cc_frm_header.h b/src/gui/components/cc_frm_header.h index 9550d1134..e26d28ff2 100644 --- a/src/gui/components/cc_frm_header.h +++ b/src/gui/components/cc_frm_header.h @@ -32,25 +32,29 @@ #include "cc_frm_clock.h" #include -#define DEFAULT_LOGO_ALIGN CComponentsHeader::CC_LOGO_CENTER +#define DEFAULT_LOGO_ALIGN CCHeaderTypes::CC_LOGO_CENTER +#define DEFAULT_TITLE_ALIGN CCHeaderTypes::CC_TITLE_LEFT -//! Sub class of CComponentsForm. Shows a header with prepared items. -/*! -CComponentsHeader provides prepared items like icon, caption and context button icons, mostly for usage in menues or simple windows -*/ - -class CComponentsHeader : public CComponentsForm, public CCTextScreen +class CCHeaderTypes { public: ///logo position options typedef enum { - CC_LOGO_RIGHT , - CC_LOGO_LEFT , - CC_LOGO_CENTER + CC_LOGO_RIGHT = 0x01, + CC_LOGO_LEFT = 0x02, + CC_LOGO_CENTER = 0x04 }cc_logo_alignment_t; - private: + ///title position options + typedef enum + { /*for compatibilty use CTextBox enums values*/ + CC_TITLE_LEFT = 0x400, + CC_TITLE_CENTER = 0x40 , + CC_TITLE_RIGHT = 0x80 + }cc_title_alignment_t; + + protected: ///required logo data type typedef struct cch_logo_t { @@ -60,7 +64,17 @@ class CComponentsHeader : public CComponentsForm, public CCTextScreen int32_t dy_max; cc_logo_alignment_t Align; } cch_logo_struct_t; +}; + +//! Sub class of CComponentsForm. Shows a header with prepared items. +/*! +CComponentsHeader provides prepared items like icon, caption and context button icons, mostly for usage in menues or simple windows +*/ + +class CComponentsHeader : public CComponentsForm, public CCTextScreen, CCHeaderTypes +{ + private: ///member: init genaral variables, parameters for mostly used properties void initVarHeader( const int& x_pos, const int& y_pos, const int& w, const int& h, const std::string& caption, @@ -116,8 +130,8 @@ class CComponentsHeader : public CComponentsForm, public CCTextScreen std::vector v_cch_btn; ///property: size of header, possible values are CC_HEADER_SIZE_LARGE, CC_HEADER_SIZE_SMALL int cch_size_mode; - ///property: alignment of caption within header, see also setCaptionAlignment(), possible values are CTextBox::CENTER, default = CTextBox::NO_AUTO_LINEBREAK (left) - int cch_caption_align; + ///property: alignment of caption within header, see also setCaptionAlignment() + cc_title_alignment_t cch_caption_align; ///property: enable/disable of clock, see also enableClock() bool cch_cl_enable; ///property: clock format @@ -167,12 +181,12 @@ class CComponentsHeader : public CComponentsForm, public CCTextScreen virtual ~CComponentsHeader(); ///set caption text, parameters: string, int align_mode (default left) - virtual void setCaption(const std::string& caption, const int& align_mode = CTextBox::NO_AUTO_LINEBREAK, const fb_pixel_t& text_color = COL_MENUHEAD_TEXT); + virtual void setCaption(const std::string& caption, const cc_title_alignment_t& align_mode = DEFAULT_TITLE_ALIGN, const fb_pixel_t& text_color = COL_MENUHEAD_TEXT); ///set caption text, parameters: loacle, int align_mode (default left) - virtual void setCaption(neutrino_locale_t caption_locale, const int& align_mode = CTextBox::NO_AUTO_LINEBREAK, const fb_pixel_t& text_color = COL_MENUHEAD_TEXT); + virtual void setCaption(neutrino_locale_t caption_locale, const cc_title_alignment_t& align_mode = DEFAULT_TITLE_ALIGN, const fb_pixel_t& text_color = COL_MENUHEAD_TEXT); - ///set alignment of caption within header, possible paramters are CTextBox::CENTER, CTextBox::NO_AUTO_LINEBREAK - virtual void setCaptionAlignment(const int& align_mode){cch_caption_align = align_mode;} + ///set alignment of caption within header, possible paramters are CComponentsHeader::CC_TITLE_LEFT, CComponentsHeader::CC_TITLE_RIGHT, CComponentsHeader::CC_TITLE_CENTER + virtual void setCaptionAlignment(const cc_title_alignment_t& align_mode){cch_caption_align = align_mode;} /**Set text font for title. * Internal default font is g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE] and diff --git a/src/gui/components/cc_frm_window.cpp b/src/gui/components/cc_frm_window.cpp index acf06e1b4..4d43e08be 100644 --- a/src/gui/components/cc_frm_window.cpp +++ b/src/gui/components/cc_frm_window.cpp @@ -150,7 +150,7 @@ void CComponentsWindow::initVarWindow( const int& x_pos, const int& y_pos, const ccw_buttons = 0; //no header buttons ccw_show_footer = true; ccw_show_header = true; - ccw_align_mode = CTextBox::NO_AUTO_LINEBREAK; + ccw_align_mode = DEFAULT_TITLE_ALIGN; ccw_show_l_sideber = false; ccw_show_r_sideber = false; ccw_w_sidebar = 40; @@ -187,7 +187,7 @@ void CComponentsWindow::initWindowPos() y = frameBuffer->getScreenY(); } -void CComponentsWindow::setWindowCaption(neutrino_locale_t locale_text, const int& align_mode) +void CComponentsWindow::setWindowCaption(neutrino_locale_t locale_text, const cc_title_alignment_t& align_mode) { ccw_caption = g_Locale->getText(locale_text); ccw_align_mode = align_mode; diff --git a/src/gui/components/cc_frm_window.h b/src/gui/components/cc_frm_window.h index 7b2f71796..f6eb80f20 100644 --- a/src/gui/components/cc_frm_window.h +++ b/src/gui/components/cc_frm_window.h @@ -52,7 +52,7 @@ items like text, labels, pictures ... */ -class CComponentsWindow : public CComponentsForm +class CComponentsWindow : public CComponentsForm, CCHeaderTypes { protected: ///object: header object, to get access to header properties see also getHeaderObject() @@ -68,7 +68,7 @@ class CComponentsWindow : public CComponentsForm ///property: caption in header, see also getHeaderObject() std::string ccw_caption; ///property: alignment mode for header caption - int ccw_align_mode; + cc_title_alignment_t ccw_align_mode; ///property: icon name in header, see also getHeaderObject() std::string ccw_icon_name; ///property: assigned default icon buttons in header, see also getHeaderObject() @@ -168,15 +168,17 @@ class CComponentsWindow : public CComponentsForm void enableSidebar(const int& sidbar_type = CC_WINDOW_LEFT_SIDEBAR | CC_WINDOW_RIGHT_SIDEBAR); ///set caption in header with string, see also getHeaderObject() - void setWindowCaption(const std::string& text, const int& align_mode = CTextBox::NO_AUTO_LINEBREAK){ccw_caption = text; ccw_align_mode = align_mode;} + void setWindowCaption(const std::string& text, const cc_title_alignment_t& align_mode = DEFAULT_TITLE_ALIGN){ccw_caption = text; ccw_align_mode = align_mode;} ///set header text color + void setWindowHeaderTextColor(const fb_pixel_t& color){ccw_col_head_text = color;} ///set background to header void setWindowHeaderColor(const fb_pixel_t& color){ccw_col_head = color;} + ///set caption in header from locales, see also getHeaderObject() - void setWindowCaption(neutrino_locale_t locale_text, const int& align_mode = CTextBox::NO_AUTO_LINEBREAK); + void setWindowCaption(neutrino_locale_t locale_text, const cc_title_alignment_t& align_mode = DEFAULT_TITLE_ALIGN); ///set caption alignment, see CTextBox for possible modes - void setWindowCaptionAlignment(const int& align_mode){ccw_align_mode = align_mode;}; + void setWindowCaptionAlignment(const cc_title_alignment_t& align_mode){ccw_align_mode = align_mode;}; ///set icon name in header, see also getHeaderObject() void setWindowIcon(const std::string& iconname){ccw_icon_name = iconname; initHeader();}; diff --git a/src/gui/eventlist.cpp b/src/gui/eventlist.cpp index d8203b2da..02f56f04a 100644 --- a/src/gui/eventlist.cpp +++ b/src/gui/eventlist.cpp @@ -888,7 +888,7 @@ void CEventList::paintHead(t_channel_id _channel_id, std::string _channelname, s if (header->isPainted()) header->getChannelLogoObject()->hide(); header->setChannelLogo(_channel_id,_channelname); - header->setCaption(_channelname,CTextBox::CENTER); + header->setCaption(_channelname, CCHeaderTypes::CC_TITLE_CENTER); header->paint(CC_SAVE_SCREEN_NO); diff --git a/src/gui/lua/lua_cc_window.cpp b/src/gui/lua/lua_cc_window.cpp index 6249af866..0d4c9d412 100644 --- a/src/gui/lua/lua_cc_window.cpp +++ b/src/gui/lua/lua_cc_window.cpp @@ -221,10 +221,10 @@ int CLuaInstCCWindow::CCWindowSetCaption(lua_State *L) std::string name = ""; tableLookup(L, "name", name) || tableLookup(L, "title", name) || tableLookup(L, "caption", name); - lua_Integer alignment = (lua_Integer)CTextBox::NO_AUTO_LINEBREAK; + lua_Integer alignment = (lua_Integer)DEFAULT_TITLE_ALIGN; tableLookup(L, "alignment", alignment); - D->w->setWindowCaption(name, alignment); + D->w->setWindowCaption(name, (cc_title_alignment_t)alignment); return 0; } diff --git a/src/gui/lua/lua_cc_window.h b/src/gui/lua/lua_cc_window.h index 98cd9ac86..2c5c961f3 100644 --- a/src/gui/lua/lua_cc_window.h +++ b/src/gui/lua/lua_cc_window.h @@ -29,7 +29,7 @@ class CLuaCCWindow ~CLuaCCWindow() { delete w; } }; -class CLuaInstCCWindow +class CLuaInstCCWindow : CCHeaderTypes { public: CLuaInstCCWindow() {}; diff --git a/src/gui/scan.cpp b/src/gui/scan.cpp index 26a00d41c..1709db61e 100644 --- a/src/gui/scan.cpp +++ b/src/gui/scan.cpp @@ -507,7 +507,7 @@ void CScanTs::paintLine(int px, int py, int w, const char * const txt) void CScanTs::paint(bool fortest) { CComponentsHeaderLocalized header(x, y, width, hheight, fortest ? LOCALE_SCANTS_TEST : LOCALE_SCANTS_HEAD); - header.setCaptionAlignment(CTextBox::CENTER); + header.setCaptionAlignment(CCHeaderTypes::CC_TITLE_CENTER); header.paint(CC_SAVE_SCREEN_NO); frameBuffer->paintBoxRel(x, y + hheight, width, height - hheight, COL_MENUCONTENT_PLUS_0, RADIUS_LARGE, CORNER_BOTTOM); diff --git a/src/gui/test_menu.cpp b/src/gui/test_menu.cpp index 060e7858b..9d1865966 100644 --- a/src/gui/test_menu.cpp +++ b/src/gui/test_menu.cpp @@ -743,11 +743,11 @@ int CTestMenu::exec(CMenuTarget* parent, const std::string &actionKey) else if (actionKey == "window"){ if (window == NULL){ window = new CComponentsWindow(); - window->setWindowCaption("|........HEADER........|", CTextBox::CENTER); + window->setWindowCaption("|........HEADER........|", CCHeaderTypes::CC_TITLE_CENTER); window->setDimensionsAll(50, 50, 500, 500); window->setWindowIcon(NEUTRINO_ICON_INFO); window->enableShadow(); - window->getFooterObject()->setCaption("|........FOOTER........|", CTextBox::CENTER); + window->getFooterObject()->setCaption("|........FOOTER........|", CCHeaderTypes::CC_TITLE_CENTER); CComponentsShapeCircle *c10 = new CComponentsShapeCircle(0, 0, 28); CComponentsShapeCircle *c11 = new CComponentsShapeCircle(0, CC_APPEND, 28); From 5705809f1ade6483ef3628cebf64fa0dcbef294d Mon Sep 17 00:00:00 2001 From: vanhofen Date: Sat, 13 May 2017 17:45:59 +0200 Subject: [PATCH 15/20] movieplayer: allow bisectional jumps with RC_page_up/down based upon code by TangoCash Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/ca218e5390ed2471eeb6ef89e8c097786065271c Author: vanhofen Date: 2017-05-13 (Sat, 13 May 2017) Origin message was: ------------------ - movieplayer: allow bisectional jumps with RC_page_up/down based upon code by TangoCash ------------------ This commit was generated by Migit --- data/locale/deutsch.locale | 2 ++ data/locale/english.locale | 2 ++ src/gui/keybind_setup.cpp | 7 +++++++ src/gui/movieplayer.cpp | 34 ++++++++++++++++++++++++++++++++++ src/neutrino.cpp | 2 ++ src/system/locals.h | 2 ++ src/system/locals_intern.h | 2 ++ src/system/settings.h | 1 + 8 files changed, 52 insertions(+) diff --git a/data/locale/deutsch.locale b/data/locale/deutsch.locale index 2c4d31792..250e388da 100644 --- a/data/locale/deutsch.locale +++ b/data/locale/deutsch.locale @@ -1352,6 +1352,7 @@ menu.hint_misc_zapit Verwaltung der Start-Kanäle für den TV/Radio-Modus menu.hint_movie Wiedergabe von Filmen menu.hint_moviebrowser_fonts Ändern Sie die Schriftgrößen im Moviebrowser (Meine Aufnahmen) menu.hint_moviebrowser_setup Legen Sie Auswahl- und Anzeigeoptionen des MovieBrowsers fest +menu.hint_movieplayer_bisection_jump Für das Vor- und Zurückspringen mit Seite hoch/runter wird ein bisektionaler Modus verwendet menu.hint_movieplayer_plugin Wählen Sie ein Plugin, das mit einer Schnellstart-Taste im Movieplayer-Modus gestartet wird menu.hint_net_broadcast Ändern Sie die Broadcast-Adresse.\nWenn Sie unsicher sind, verwenden Sie zuletzt .255 menu.hint_net_dhcp Verwenden Sie einen DHCP-Server für die automatische Vergabe einer IP-Adresse im Netzwerk @@ -1999,6 +2000,7 @@ moviebrowser.yt_region Region moviebrowser.yt_related Passende Videos moviebrowser.yt_search Suche nach Stichwort moviecut.cancel Bearbeiten des Filmes abbrechen? +movieplayer.bisection_jump Bisektionale Sprünge movieplayer.bookmark Bookmarks movieplayer.bookmarkname Bookmark Name movieplayer.bookmarkname_hint1 Geben Sie den Namen für das neue Lesezeichen ein diff --git a/data/locale/english.locale b/data/locale/english.locale index acdba6ab8..f2848a9a0 100644 --- a/data/locale/english.locale +++ b/data/locale/english.locale @@ -1352,6 +1352,7 @@ menu.hint_misc_zapit Initial TV/Radio channels menu.hint_movie Play movies menu.hint_moviebrowser_fonts Change moviebrowser (My recordings) font sizes menu.hint_moviebrowser_setup Set selection and display options. +menu.hint_movieplayer_bisection_jump Use bisectional mode to jump forward/backward with page up/down menu.hint_movieplayer_plugin Choose a plugin that's executed with the one touch key in movieplayer mode menu.hint_net_broadcast Enter broadcast address\nif unsure, use IP address with last .255 menu.hint_net_dhcp Use DHCP server to auto-configure @@ -1999,6 +2000,7 @@ moviebrowser.yt_region Region moviebrowser.yt_related Related videos moviebrowser.yt_search Search keyword moviecut.cancel Cancel movie editing? +movieplayer.bisection_jump Bisectional jumps movieplayer.bookmark Bookmarks movieplayer.bookmarkname Bookmarkname movieplayer.bookmarkname_hint1 Enter a name for your new bookmark diff --git a/src/gui/keybind_setup.cpp b/src/gui/keybind_setup.cpp index bd6af76e7..4027eebe5 100644 --- a/src/gui/keybind_setup.cpp +++ b/src/gui/keybind_setup.cpp @@ -512,6 +512,13 @@ void CKeybindSetup::showKeyBindMovieplayerSetup(CMenuWidget *bindSettings_mplaye mf->setHint("", key_settings[i].hint); bindSettings_mplayer->addItem(mf); } + + bindSettings_mplayer->addItem(GenericMenuSeparatorLine); //NI + + //NI - bisectional jumps + CMenuOptionChooser * mc = new CMenuOptionChooser(LOCALE_MOVIEPLAYER_BISECTION_JUMP, &g_settings.movieplayer_bisection_jump, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true); + mc->setHint("", LOCALE_MENU_HINT_MOVIEPLAYER_BISECTION_JUMP); + bindSettings_mplayer->addItem(mc); } void CKeybindSetup::showKeyBindMoviebrowserSetup(CMenuWidget *bindSettings_mbrowser) diff --git a/src/gui/movieplayer.cpp b/src/gui/movieplayer.cpp index bed0d13ec..7f806bdaa 100644 --- a/src/gui/movieplayer.cpp +++ b/src/gui/movieplayer.cpp @@ -1350,6 +1350,11 @@ void CMoviePlayerGui::PlayFileLoop(void) int position_tmp = 0; bool at_eof = !(playstate >= CMoviePlayerGui::PLAY);; keyPressed = CMoviePlayerGui::PLUGIN_PLAYSTATE_NORMAL; + neutrino_msg_t lastmsg = 0; //NI + + //NI - bisectional jumps + int bisection_jump = 300; + int bisection_loop = -1; while (playstate >= CMoviePlayerGui::PLAY) { @@ -1366,6 +1371,12 @@ void CMoviePlayerGui::PlayFileLoop(void) neutrino_msg_data_t data; g_RCInput->getMsg(&msg, &data, 10); // 1 secs.. + //NI - bisectional jumps + if (bisection_loop > -1) + bisection_loop++; + if (bisection_loop > 10) + bisection_loop = -1; + if ((playstate >= CMoviePlayerGui::PLAY) && (timeshift != TSHIFT_MODE_OFF || (playstate != CMoviePlayerGui::PAUSE))) { if (playback->GetPosition(position, duration)) { FileTimeOSD->update(position, duration); @@ -1610,10 +1621,30 @@ void CMoviePlayerGui::PlayFileLoop(void) SetPosition(duration/2, true); } else if (msg == CRCInput::RC_8) { // goto end SetPosition(duration - 60 * 1000, true); +//NI +#if 0 } else if (msg == CRCInput::RC_page_up) { SetPosition(10 * 1000); } else if (msg == CRCInput::RC_page_down) { SetPosition(-10 * 1000); +#endif + //NI - bisectional jumps + } else if (msg == CRCInput::RC_page_up || msg == CRCInput::RC_page_down) { + int direction = (msg == CRCInput::RC_page_up) ? 1 : -1; + int jump = 10; + + if (g_settings.movieplayer_bisection_jump) + { + if ((lastmsg == CRCInput::RC_page_up || lastmsg == CRCInput::RC_page_down) && (bisection_loop > -1 && bisection_loop <= 10)) + bisection_jump /= 2; + else + bisection_jump = 300; + + bisection_loop = 0; + jump = bisection_jump; + } + + SetPosition(direction*jump * 1000); } else if (msg == CRCInput::RC_0) { // cancel bookmark jump handleMovieBrowser(CRCInput::RC_0, position); } else if (msg == (neutrino_msg_t) g_settings.mpkey_goto) { @@ -1736,6 +1767,9 @@ void CMoviePlayerGui::PlayFileLoop(void) clearSubtitle(); } } + //NI + if (msg < CRCInput::RC_MaxRC) + lastmsg = msg; } printf("CMoviePlayerGui::PlayFile: exit, isMovieBrowser %d p_movie_info %p\n", isMovieBrowser, p_movie_info); playstate = CMoviePlayerGui::STOPPED; diff --git a/src/neutrino.cpp b/src/neutrino.cpp index ceb5fe5ab..702df0427 100644 --- a/src/neutrino.cpp +++ b/src/neutrino.cpp @@ -906,6 +906,7 @@ int CNeutrinoApp::loadSetup(const char * fname) //Movie-Player g_settings.movieplayer_repeat_on = configfile.getInt32("movieplayer_repeat_on", CMoviePlayerGui::REPEAT_OFF); + g_settings.movieplayer_bisection_jump = configfile.getInt32("movieplayer_bisection_jump", 1); //NI g_settings.youtube_dev_id = configfile.getString("youtube_dev_id","AIzaSyBLdZe7M3rpNMZqSj-3IEvjbb2hATWJIdM"); //NI g_settings.youtube_enabled = configfile.getInt32("youtube_enabled", 1); g_settings.youtube_enabled = check_youtube_dev_id(); @@ -1571,6 +1572,7 @@ void CNeutrinoApp::saveSetup(const char * fname) //Movie-Player configfile.setInt32( "movieplayer_repeat_on", g_settings.movieplayer_repeat_on ); + configfile.setInt32( "movieplayer_bisection_jump", g_settings.movieplayer_bisection_jump ); //NI configfile.setString( "youtube_dev_id", g_settings.youtube_dev_id ); configfile.setInt32( "youtube_enabled", g_settings.youtube_enabled ); configfile.setString( "tmdb_api_key", g_settings.tmdb_api_key ); diff --git a/src/system/locals.h b/src/system/locals.h index 79c7a77d1..9c9e5081e 100644 --- a/src/system/locals.h +++ b/src/system/locals.h @@ -1379,6 +1379,7 @@ typedef enum LOCALE_MENU_HINT_MOVIE, LOCALE_MENU_HINT_MOVIEBROWSER_FONTS, LOCALE_MENU_HINT_MOVIEBROWSER_SETUP, + LOCALE_MENU_HINT_MOVIEPLAYER_BISECTION_JUMP, LOCALE_MENU_HINT_MOVIEPLAYER_PLUGIN, LOCALE_MENU_HINT_NET_BROADCAST, LOCALE_MENU_HINT_NET_DHCP, @@ -2026,6 +2027,7 @@ typedef enum LOCALE_MOVIEBROWSER_YT_RELATED, LOCALE_MOVIEBROWSER_YT_SEARCH, LOCALE_MOVIECUT_CANCEL, + LOCALE_MOVIEPLAYER_BISECTION_JUMP, LOCALE_MOVIEPLAYER_BOOKMARK, LOCALE_MOVIEPLAYER_BOOKMARKNAME, LOCALE_MOVIEPLAYER_BOOKMARKNAME_HINT1, diff --git a/src/system/locals_intern.h b/src/system/locals_intern.h index 852617c36..d391c083e 100644 --- a/src/system/locals_intern.h +++ b/src/system/locals_intern.h @@ -1379,6 +1379,7 @@ const char * locale_real_names[] = "menu.hint_movie", "menu.hint_moviebrowser_fonts", "menu.hint_moviebrowser_setup", + "menu.hint_movieplayer_bisection_jump", "menu.hint_movieplayer_plugin", "menu.hint_net_broadcast", "menu.hint_net_dhcp", @@ -2026,6 +2027,7 @@ const char * locale_real_names[] = "moviebrowser.yt_related", "moviebrowser.yt_search", "moviecut.cancel", + "movieplayer.bisection_jump", "movieplayer.bookmark", "movieplayer.bookmarkname", "movieplayer.bookmarkname_hint1", diff --git a/src/system/settings.h b/src/system/settings.h index d54bb7b79..bda412206 100644 --- a/src/system/settings.h +++ b/src/system/settings.h @@ -787,6 +787,7 @@ struct SNeutrinoSettings //movieplayer int movieplayer_repeat_on; + int movieplayer_bisection_jump; //NI std::string youtube_dev_id; int youtube_enabled; std::string tmdb_api_key; From cd85a9c85692eb78041c31fa17a83825c5e1d019 Mon Sep 17 00:00:00 2001 From: vanhofen Date: Tue, 16 May 2017 10:31:25 +0200 Subject: [PATCH 16/20] buttons: use OFFSET defines Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/bf852064bcef5cbce388ba0ea78fbbe8a619a07f Author: vanhofen Date: 2017-05-16 (Tue, 16 May 2017) Origin message was: ------------------ - buttons: use OFFSET defines ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- src/gui/widget/buttons.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/gui/widget/buttons.cpp b/src/gui/widget/buttons.cpp index e0095b45e..9c5a7995e 100644 --- a/src/gui/widget/buttons.cpp +++ b/src/gui/widget/buttons.cpp @@ -103,8 +103,8 @@ int paintButtons( const button_label_ext * const content, int w_footer = footerwidth; int h_footer = 0; - int w_space = 10; //minimal space between buttons - int h_space = 4; //minimal space between caption and/or icon and border + int w_space = OFFSET_INNER_MID; //minimal space between buttons + int h_space = OFFSET_INNER_SMALL; //minimal space between caption and/or icon and border int x_icon = x_footer + w_space; int x_caption = 0; @@ -312,8 +312,8 @@ int paintButtons( const int &x, int w_footer = footerwidth; int h_footer = 0; - int w_space = 10; //minimal space between buttons - int h_space = 4; //minimal space between caption and/or icon and border + int w_space = OFFSET_INNER_MID; //minimal space between buttons + int h_space = OFFSET_INNER_SMALL; //minimal space between caption and/or icon and border int x_icon = x_footer + w_space; int x_caption = 0; From cc0835b0789b265565e1d55064ffef3ce0b51fb7 Mon Sep 17 00:00:00 2001 From: vanhofen Date: Tue, 16 May 2017 15:26:20 +0200 Subject: [PATCH 17/20] movieplayer: reduce timeout for bisectional jumps Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/a0918616dc84b70178a086fa4bc92164ac60f3ab Author: vanhofen Date: 2017-05-16 (Tue, 16 May 2017) Origin message was: ------------------ - movieplayer: reduce timeout for bisectional jumps ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- src/gui/movieplayer.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/gui/movieplayer.cpp b/src/gui/movieplayer.cpp index 7f806bdaa..dde44218d 100644 --- a/src/gui/movieplayer.cpp +++ b/src/gui/movieplayer.cpp @@ -1355,6 +1355,7 @@ void CMoviePlayerGui::PlayFileLoop(void) //NI - bisectional jumps int bisection_jump = 300; int bisection_loop = -1; + int bisection_loop_max = 5; while (playstate >= CMoviePlayerGui::PLAY) { @@ -1374,7 +1375,7 @@ void CMoviePlayerGui::PlayFileLoop(void) //NI - bisectional jumps if (bisection_loop > -1) bisection_loop++; - if (bisection_loop > 10) + if (bisection_loop > bisection_loop_max) bisection_loop = -1; if ((playstate >= CMoviePlayerGui::PLAY) && (timeshift != TSHIFT_MODE_OFF || (playstate != CMoviePlayerGui::PAUSE))) { @@ -1635,7 +1636,7 @@ void CMoviePlayerGui::PlayFileLoop(void) if (g_settings.movieplayer_bisection_jump) { - if ((lastmsg == CRCInput::RC_page_up || lastmsg == CRCInput::RC_page_down) && (bisection_loop > -1 && bisection_loop <= 10)) + if ((lastmsg == CRCInput::RC_page_up || lastmsg == CRCInput::RC_page_down) && (bisection_loop > -1 && bisection_loop <= bisection_loop_max)) bisection_jump /= 2; else bisection_jump = 300; From 8bf073a7cd78000acc2242f0341ad65f56fb918f Mon Sep 17 00:00:00 2001 From: vanhofen Date: Tue, 16 May 2017 15:26:20 +0200 Subject: [PATCH 18/20] deutsch.locale: minor change Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/e99b0188abc480204686df88f48a677fa2672911 Author: vanhofen Date: 2017-05-16 (Tue, 16 May 2017) Origin message was: ------------------ - deutsch.locale: minor change ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- data/locale/deutsch.locale | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data/locale/deutsch.locale b/data/locale/deutsch.locale index 250e388da..0626d9b40 100644 --- a/data/locale/deutsch.locale +++ b/data/locale/deutsch.locale @@ -1351,7 +1351,7 @@ menu.hint_misc_onlineservices Konfigurieren und steuern von Online-Diensten wie menu.hint_misc_zapit Verwaltung der Start-Kanäle für den TV/Radio-Modus menu.hint_movie Wiedergabe von Filmen menu.hint_moviebrowser_fonts Ändern Sie die Schriftgrößen im Moviebrowser (Meine Aufnahmen) -menu.hint_moviebrowser_setup Legen Sie Auswahl- und Anzeigeoptionen des MovieBrowsers fest +menu.hint_moviebrowser_setup Legen Sie Auswahl- und Anzeigeoptionen des Moviebrowsers fest menu.hint_movieplayer_bisection_jump Für das Vor- und Zurückspringen mit Seite hoch/runter wird ein bisektionaler Modus verwendet menu.hint_movieplayer_plugin Wählen Sie ein Plugin, das mit einer Schnellstart-Taste im Movieplayer-Modus gestartet wird menu.hint_net_broadcast Ändern Sie die Broadcast-Adresse.\nWenn Sie unsicher sind, verwenden Sie zuletzt .255 From 4c2826f420fa62f6fece439b24f350746451769b Mon Sep 17 00:00:00 2001 From: vanhofen Date: Tue, 16 May 2017 15:26:20 +0200 Subject: [PATCH 19/20] movieplayer: make bisection jump period configurable Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/69e5cb286caee0aa2592eb879817cd309e213b23 Author: vanhofen Date: 2017-05-16 (Tue, 16 May 2017) Origin message was: ------------------ - movieplayer: make bisection jump period configurable ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- src/gui/keybind_setup.cpp | 7 ++++--- src/gui/movieplayer.cpp | 4 ++-- src/neutrino.cpp | 2 +- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/gui/keybind_setup.cpp b/src/gui/keybind_setup.cpp index 4027eebe5..0926595c4 100644 --- a/src/gui/keybind_setup.cpp +++ b/src/gui/keybind_setup.cpp @@ -516,9 +516,10 @@ void CKeybindSetup::showKeyBindMovieplayerSetup(CMenuWidget *bindSettings_mplaye bindSettings_mplayer->addItem(GenericMenuSeparatorLine); //NI //NI - bisectional jumps - CMenuOptionChooser * mc = new CMenuOptionChooser(LOCALE_MOVIEPLAYER_BISECTION_JUMP, &g_settings.movieplayer_bisection_jump, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true); - mc->setHint("", LOCALE_MENU_HINT_MOVIEPLAYER_BISECTION_JUMP); - bindSettings_mplayer->addItem(mc); + CMenuOptionNumberChooser* nc = new CMenuOptionNumberChooser(LOCALE_MOVIEPLAYER_BISECTION_JUMP, &g_settings.movieplayer_bisection_jump, true, 0, 10, this, CRCInput::RC_nokey, NULL, 0, 0, LOCALE_OPTIONS_OFF); + nc->setNumberFormat(std::string("%d ") + g_Locale->getText(LOCALE_UNIT_SHORT_MINUTE)); + nc->setHint("", LOCALE_MENU_HINT_MOVIEPLAYER_BISECTION_JUMP); + bindSettings_mplayer->addItem(nc); } void CKeybindSetup::showKeyBindMoviebrowserSetup(CMenuWidget *bindSettings_mbrowser) diff --git a/src/gui/movieplayer.cpp b/src/gui/movieplayer.cpp index dde44218d..15611c12a 100644 --- a/src/gui/movieplayer.cpp +++ b/src/gui/movieplayer.cpp @@ -1353,7 +1353,7 @@ void CMoviePlayerGui::PlayFileLoop(void) neutrino_msg_t lastmsg = 0; //NI //NI - bisectional jumps - int bisection_jump = 300; + int bisection_jump = g_settings.movieplayer_bisection_jump * 60; int bisection_loop = -1; int bisection_loop_max = 5; @@ -1639,7 +1639,7 @@ void CMoviePlayerGui::PlayFileLoop(void) if ((lastmsg == CRCInput::RC_page_up || lastmsg == CRCInput::RC_page_down) && (bisection_loop > -1 && bisection_loop <= bisection_loop_max)) bisection_jump /= 2; else - bisection_jump = 300; + bisection_jump = g_settings.movieplayer_bisection_jump * 60; bisection_loop = 0; jump = bisection_jump; diff --git a/src/neutrino.cpp b/src/neutrino.cpp index 702df0427..ad5f455bf 100644 --- a/src/neutrino.cpp +++ b/src/neutrino.cpp @@ -906,7 +906,7 @@ int CNeutrinoApp::loadSetup(const char * fname) //Movie-Player g_settings.movieplayer_repeat_on = configfile.getInt32("movieplayer_repeat_on", CMoviePlayerGui::REPEAT_OFF); - g_settings.movieplayer_bisection_jump = configfile.getInt32("movieplayer_bisection_jump", 1); //NI + g_settings.movieplayer_bisection_jump = configfile.getInt32("movieplayer_bisection_jump", 5); //NI g_settings.youtube_dev_id = configfile.getString("youtube_dev_id","AIzaSyBLdZe7M3rpNMZqSj-3IEvjbb2hATWJIdM"); //NI g_settings.youtube_enabled = configfile.getInt32("youtube_enabled", 1); g_settings.youtube_enabled = check_youtube_dev_id(); From 91a37cf8403bbaf90f7e39c01a1d049d53c0205a Mon Sep 17 00:00:00 2001 From: vanhofen Date: Tue, 16 May 2017 15:26:20 +0200 Subject: [PATCH 20/20] configure.ac: increase version to 3.40 Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/cade9ead989c100fbd71d3616943bf80d2677774 Author: vanhofen Date: 2017-05-16 (Tue, 16 May 2017) Origin message was: ------------------ - configure.ac: increase version to 3.40 ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index beb0a3b85..244e3bc9f 100644 --- a/configure.ac +++ b/configure.ac @@ -1,4 +1,4 @@ -AC_INIT(NI-Neutrino,3.30.0) +AC_INIT(NI-Neutrino,3.40.0) AM_INIT_AUTOMAKE([1.0.1 nostdinc]) m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES])