From 8e5d36fe258aa1d7511afa8b4983067fb6dfeb8e Mon Sep 17 00:00:00 2001 From: vanhofen Date: Sun, 24 Jan 2016 21:28:37 +0100 Subject: [PATCH 1/6] plugins: fix movieplayer-plugin Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/bbd88cd0510202534f69ee28cca633c7fc15be27 Author: vanhofen Date: 2016-01-24 (Sun, 24 Jan 2016) Origin message was: ------------------ - plugins: fix movieplayer-plugin ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- src/gui/plugins.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gui/plugins.cpp b/src/gui/plugins.cpp index 99466f548..7aebc77f9 100644 --- a/src/gui/plugins.cpp +++ b/src/gui/plugins.cpp @@ -350,11 +350,11 @@ PluginParam * CPlugins::makeParam(const char * const id, const int value, Plugin } #endif -void CPlugins::startPlugin_by_name(const std::string & filename) +void CPlugins::startPlugin_by_name(const std::string & name) { for (int i = 0; i < (int) plugin_list.size(); i++) { - if (!filename.compare(g_PluginList->getFileName(i))) + if (name.compare(g_PluginList->getName(i)) == 0) { startPlugin(i); return; From eeb5987454f20c143e3a2f045bb564da3d9d531d Mon Sep 17 00:00:00 2001 From: vanhofen Date: Sun, 24 Jan 2016 21:29:31 +0100 Subject: [PATCH 2/6] plugins: startPlugin works with filename; just for clarity Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/55f0ab75af840be3e0459e9f63cd50cfad3df6e9 Author: vanhofen Date: 2016-01-24 (Sun, 24 Jan 2016) Origin message was: ------------------ - plugins: startPlugin works with filename; just for clarity ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- src/gui/plugins.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/gui/plugins.cpp b/src/gui/plugins.cpp index 7aebc77f9..fd86c8e99 100644 --- a/src/gui/plugins.cpp +++ b/src/gui/plugins.cpp @@ -362,13 +362,13 @@ void CPlugins::startPlugin_by_name(const std::string & name) } } -void CPlugins::startPlugin(const char * const name) +void CPlugins::startPlugin(const char * const filename) { - int pluginnr = find_plugin(name); + int pluginnr = find_plugin(filename); if (pluginnr > -1) startPlugin(pluginnr); else - printf("[CPlugins] could not find %s\n", name); + printf("[CPlugins] could not find %s\n", filename); } From b1177424b52a7ce098d5b2d04345b7dacce10b7f Mon Sep 17 00:00:00 2001 From: vanhofen Date: Mon, 25 Jan 2016 08:04:35 +0100 Subject: [PATCH 3/6] vfd: allow to disable rc-lock message on vfd Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/b56f4ed1492f8e33436069325db89a051596d72b Author: vanhofen Date: 2016-01-25 (Mon, 25 Jan 2016) Origin message was: ------------------ - vfd: allow to disable rc-lock message on vfd ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- data/locale/deutsch.locale | 2 ++ data/locale/english.locale | 2 ++ src/driver/vfd.cpp | 2 +- src/gui/vfd_setup.cpp | 4 ++++ src/neutrino.cpp | 2 ++ src/system/locals.h | 2 ++ src/system/locals_intern.h | 2 ++ src/system/settings.h | 2 ++ 8 files changed, 17 insertions(+), 1 deletion(-) diff --git a/data/locale/deutsch.locale b/data/locale/deutsch.locale index b1c7d40fd..debd59fac 100644 --- a/data/locale/deutsch.locale +++ b/data/locale/deutsch.locale @@ -859,6 +859,7 @@ lcdmenu.dim_brightness nach Dimm-Timeout lcdmenu.dim_time Dimm-Timeout lcdmenu.head VFD/LED Einstellungen lcdmenu.lcdcontroler Helligkeit +lcdmenu.notify_rclock Benachrichtigung bei FB-Sperre lcdmenu.scroll Laufschrift lcdmenu.statusline Statuszeile lcdmenu.statusline.both Lautstärke/Fortschritt @@ -1399,6 +1400,7 @@ menu.hint_vfd_brightnessstandby Definiert die Helligkeit im Standby-Modus menu.hint_vfd_defaults Zurücksetzen der Helligkeitswerte auf die Standardeinstellungen menu.hint_vfd_dimtime Geben Sie einen Wert in Sekunden ein, nachdem sich das Display automatisch auf den gewünschten Wert dimmt menu.hint_vfd_infoline Wählen Sie, was in der Infozeile angezeigt werden soll +menu.hint_vfd_notify_rclock Zeigt eine Meldung im Display, wenn bei gesperrter Fernbedienung eine Taste gedrückt wird menu.hint_vfd_scroll Laufschrift im Display ein- oder ausschalten menu.hint_vfd_statusline Wählen Sie, was in der Statuszeile angezeigt werden soll menu.hint_video Video-Ausgang, Auflösung, Format, Seitenverhältnisse und mehr diff --git a/data/locale/english.locale b/data/locale/english.locale index 68e9acdf9..96593f610 100644 --- a/data/locale/english.locale +++ b/data/locale/english.locale @@ -859,6 +859,7 @@ lcdmenu.dim_brightness Brightness after dim timeout lcdmenu.dim_time Dim timeout lcdmenu.head VFD/LED Settings lcdmenu.lcdcontroler Brightness +lcdmenu.notify_rclock Notify when RC is locked lcdmenu.scroll Enable text scroll lcdmenu.statusline status line lcdmenu.statusline.both volume / playtime @@ -1399,6 +1400,7 @@ menu.hint_vfd_brightnessstandby Brightness in soft-standby mode menu.hint_vfd_defaults Restore default brightness values menu.hint_vfd_dimtime Auto-dim time, in seconds menu.hint_vfd_infoline Choose what to display in main VFD line +menu.hint_vfd_notify_rclock Displays a notification when a key is pressed while remote control is locked menu.hint_vfd_scroll Enable or disable text scrolling on VFD menu.hint_vfd_statusline Choose what to display in short\nVFD status line menu.hint_video Video output, resolution, format\nAspect ratio, fast mode switch options diff --git a/src/driver/vfd.cpp b/src/driver/vfd.cpp index 0490201ae..7af3a18f0 100644 --- a/src/driver/vfd.cpp +++ b/src/driver/vfd.cpp @@ -406,7 +406,7 @@ void CVFD::showTime(bool force) void CVFD::showRCLock(int duration) { - if (!has_lcd) + if (!has_lcd || !g_settings.lcd_notify_rclock) { sleep(duration); return; diff --git a/src/gui/vfd_setup.cpp b/src/gui/vfd_setup.cpp index b5148232a..b4e3a053f 100644 --- a/src/gui/vfd_setup.cpp +++ b/src/gui/vfd_setup.cpp @@ -155,6 +155,10 @@ int CVfdSetup::showSetup() oj = new CMenuOptionChooser(LOCALE_LCDMENU_SCROLL, &g_settings.lcd_scroll, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, vfd_enabled); oj->setHint("", LOCALE_MENU_HINT_VFD_SCROLL); vfds->addItem(oj); + + oj = new CMenuOptionChooser(LOCALE_LCDMENU_NOTIFY_RCLOCK, &g_settings.lcd_notify_rclock, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, vfd_enabled); + oj->setHint("", LOCALE_MENU_HINT_VFD_NOTIFY_RCLOCK); + vfds->addItem(oj); } int res = vfds->exec(NULL, ""); diff --git a/src/neutrino.cpp b/src/neutrino.cpp index 1dd14710d..0671723b3 100644 --- a/src/neutrino.cpp +++ b/src/neutrino.cpp @@ -434,6 +434,7 @@ int CNeutrinoApp::loadSetup(const char * fname) g_settings.backlight_standby = configfile.getInt32( "backlight_standby", 0); g_settings.backlight_deepstandby = configfile.getInt32( "backlight_deepstandby", 0); g_settings.lcd_scroll = configfile.getInt32( "lcd_scroll", 1); + g_settings.lcd_notify_rclock = configfile.getInt32("lcd_notify_rclock", 1); g_settings.hdd_fs = configfile.getInt32( "hdd_fs", 0); g_settings.hdd_sleep = configfile.getInt32( "hdd_sleep", 120); @@ -984,6 +985,7 @@ void CNeutrinoApp::saveSetup(const char * fname) configfile.setInt32( "backlight_standby", g_settings.backlight_standby); configfile.setInt32( "backlight_deepstandby", g_settings.backlight_deepstandby); configfile.setInt32( "lcd_scroll", g_settings.lcd_scroll); + configfile.setInt32( "lcd_notify_rclock", g_settings.lcd_notify_rclock); //misc configfile.setInt32( "power_standby", g_settings.power_standby); diff --git a/src/system/locals.h b/src/system/locals.h index 5fe1c56e8..0bde8d6b9 100644 --- a/src/system/locals.h +++ b/src/system/locals.h @@ -886,6 +886,7 @@ typedef enum LOCALE_LCDMENU_DIM_TIME, LOCALE_LCDMENU_HEAD, LOCALE_LCDMENU_LCDCONTROLER, + LOCALE_LCDMENU_NOTIFY_RCLOCK, LOCALE_LCDMENU_SCROLL, LOCALE_LCDMENU_STATUSLINE, LOCALE_LCDMENU_STATUSLINE_BOTH, @@ -1426,6 +1427,7 @@ typedef enum LOCALE_MENU_HINT_VFD_DEFAULTS, LOCALE_MENU_HINT_VFD_DIMTIME, LOCALE_MENU_HINT_VFD_INFOLINE, + LOCALE_MENU_HINT_VFD_NOTIFY_RCLOCK, LOCALE_MENU_HINT_VFD_SCROLL, LOCALE_MENU_HINT_VFD_STATUSLINE, LOCALE_MENU_HINT_VIDEO, diff --git a/src/system/locals_intern.h b/src/system/locals_intern.h index 33ac965be..bc5c07f62 100644 --- a/src/system/locals_intern.h +++ b/src/system/locals_intern.h @@ -886,6 +886,7 @@ const char * locale_real_names[] = "lcdmenu.dim_time", "lcdmenu.head", "lcdmenu.lcdcontroler", + "lcdmenu.notify_rclock", "lcdmenu.scroll", "lcdmenu.statusline", "lcdmenu.statusline.both", @@ -1426,6 +1427,7 @@ const char * locale_real_names[] = "menu.hint_vfd_defaults", "menu.hint_vfd_dimtime", "menu.hint_vfd_infoline", + "menu.hint_vfd_notify_rclock", "menu.hint_vfd_scroll", "menu.hint_vfd_statusline", "menu.hint_video", diff --git a/src/system/settings.h b/src/system/settings.h index df64721d2..728ae275b 100644 --- a/src/system/settings.h +++ b/src/system/settings.h @@ -684,6 +684,8 @@ struct SNeutrinoSettings int backlight_standby; int backlight_deepstandby; int lcd_scroll; + int lcd_notify_rclock; + //#define FILESYSTEM_ENCODING_TO_UTF8(a) (g_settings.filesystem_is_utf8 ? (a) : ZapitTools::Latin1_to_UTF8(a).c_str()) #define FILESYSTEM_ENCODING_TO_UTF8(a) (isUTF8(a) ? (a) : ZapitTools::Latin1_to_UTF8(a).c_str()) #define UTF8_TO_FILESYSTEM_ENCODING(a) (g_settings.filesystem_is_utf8 ? (a) : ZapitTools::UTF8_to_Latin1(a).c_str()) From fea7c86ba5220d9188d4f95485a256512422b7d0 Mon Sep 17 00:00:00 2001 From: Stefan Seyfried Date: Sat, 23 Jan 2016 13:17:56 +0100 Subject: [PATCH 4/6] infoviewer: change show_Data() semantics slightly the "calledFromEvent" parameter was only used to force display of "no EPG available". It was set to true when calling from an "zap complete" or "epg event received" event, which is good, but also when calling from the display update timer, which is "strange". Now setting this parameter to false forces the update of the current event (if available) which is done from display update timer. This fixes the update of the remaining time display with constantly displayed infobar (radio mode). Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/9a6f9ea7869974ff3f58eb4ce819a70049af7f44 Author: Stefan Seyfried Date: 2016-01-23 (Sat, 23 Jan 2016) ------------------ This commit was generated by Migit --- src/gui/infoviewer.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gui/infoviewer.cpp b/src/gui/infoviewer.cpp index 6ebcd0298..ac27fe96c 100644 --- a/src/gui/infoviewer.cpp +++ b/src/gui/infoviewer.cpp @@ -1352,7 +1352,7 @@ int CInfoViewer::handleMsg (const neutrino_msg_t msg, neutrino_msg_data_t data) snprintf(runningRest, sizeof(runningRest), "%d / %d %s", (curr_pos + 30000) / 60000, (duration - curr_pos + 30000) / 60000, unit_short_minute); display_Info(NULL, NULL, false, CMoviePlayerGui::getInstance().file_prozent, NULL, runningRest); } else if (!IS_WEBTV(current_channel_id)) { - show_Data( true ); + show_Data(false); } } showLcdPercentOver (); @@ -1812,7 +1812,7 @@ void CInfoViewer::show_Data (bool calledFromEvent) if (info_CurrentNext.flags & CSectionsdClient::epgflags::has_current) { - if (info_CurrentNext.current_uniqueKey != last_curr_id) + if (!calledFromEvent || info_CurrentNext.current_uniqueKey != last_curr_id) { last_curr_id = info_CurrentNext.current_uniqueKey; curr_time = runningStart; From 921176b2a15bbaa99e5553cfd1fbaba97f5ccf33 Mon Sep 17 00:00:00 2001 From: vanhofen Date: Mon, 25 Jan 2016 12:00:47 +0100 Subject: [PATCH 5/6] infoviewer: show plugin name, when movieplayer-plugin is selected Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/0b74f601db3d79e0cd6cf853a30a78cdbbe0823e Author: vanhofen Date: 2016-01-25 (Mon, 25 Jan 2016) Origin message was: ------------------ - infoviewer: show plugin name, when movieplayer-plugin is selected ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- src/gui/infoviewer_bb.cpp | 8 ++++---- src/gui/keybind_setup.cpp | 7 +++++-- src/gui/keybind_setup.h | 2 +- 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/src/gui/infoviewer_bb.cpp b/src/gui/infoviewer_bb.cpp index f91408b3b..4f906866f 100644 --- a/src/gui/infoviewer_bb.cpp +++ b/src/gui/infoviewer_bb.cpp @@ -222,7 +222,7 @@ void CInfoViewerBB::getBBButtonInfo() frameBuffer->getIconSize(icon.c_str(), &w, &h); mode = CNeutrinoApp::getInstance()->getMode(); if (mode == NeutrinoMessages::mode_ts || mode == NeutrinoMessages::mode_webtv || mode == NeutrinoMessages::mode_audio) { - text = CKeybindSetup::getMoviePlayerButtonName(CRCInput::RC_red, active); + text = CKeybindSetup::getMoviePlayerButtonName(CRCInput::RC_red, active, g_settings.infobar_buttons_usertitle); if (!text.empty()) break; } @@ -237,7 +237,7 @@ void CInfoViewerBB::getBBButtonInfo() frameBuffer->getIconSize(icon.c_str(), &w, &h); mode = CNeutrinoApp::getInstance()->getMode(); if (mode == NeutrinoMessages::mode_ts || mode == NeutrinoMessages::mode_webtv || mode == NeutrinoMessages::mode_audio) { - text = CKeybindSetup::getMoviePlayerButtonName(CRCInput::RC_green, active); + text = CKeybindSetup::getMoviePlayerButtonName(CRCInput::RC_green, active, g_settings.infobar_buttons_usertitle); if (!text.empty()) break; } @@ -252,7 +252,7 @@ void CInfoViewerBB::getBBButtonInfo() frameBuffer->getIconSize(icon.c_str(), &w, &h); mode = CNeutrinoApp::getInstance()->getMode(); if (mode == NeutrinoMessages::mode_ts || mode == NeutrinoMessages::mode_webtv || mode == NeutrinoMessages::mode_audio) { - text = CKeybindSetup::getMoviePlayerButtonName(CRCInput::RC_yellow, active); + text = CKeybindSetup::getMoviePlayerButtonName(CRCInput::RC_yellow, active, g_settings.infobar_buttons_usertitle); if (!text.empty()) break; } @@ -267,7 +267,7 @@ void CInfoViewerBB::getBBButtonInfo() frameBuffer->getIconSize(icon.c_str(), &w, &h); mode = CNeutrinoApp::getInstance()->getMode(); if (mode == NeutrinoMessages::mode_ts || mode == NeutrinoMessages::mode_webtv || mode == NeutrinoMessages::mode_audio) { - text = CKeybindSetup::getMoviePlayerButtonName(CRCInput::RC_blue, active); + text = CKeybindSetup::getMoviePlayerButtonName(CRCInput::RC_blue, active, g_settings.infobar_buttons_usertitle); if (!text.empty()) break; } diff --git a/src/gui/keybind_setup.cpp b/src/gui/keybind_setup.cpp index 59b8f18a6..dd6db5654 100644 --- a/src/gui/keybind_setup.cpp +++ b/src/gui/keybind_setup.cpp @@ -569,7 +569,7 @@ bool CKeybindSetup::changeNotify(const neutrino_locale_t OptionName, void * /* d return false; } -const char *CKeybindSetup::getMoviePlayerButtonName(const neutrino_msg_t key, bool &active) +const char *CKeybindSetup::getMoviePlayerButtonName(const neutrino_msg_t key, bool &active, bool return_title) { active = false; for (unsigned int i = MPKEY_REWIND; i <= MPKEY_PLUGIN; i++) @@ -577,7 +577,10 @@ const char *CKeybindSetup::getMoviePlayerButtonName(const neutrino_msg_t key, bo if ((uint32_t)*key_settings[i].keyvalue_p == (unsigned int)key) { active = true; - return g_Locale->getText(key_settings[i].keydescription); + if (!return_title && (key_settings[i].keydescription == LOCALE_MPKEY_PLUGIN)) + return g_settings.movieplayer_plugin.c_str(); + else + return g_Locale->getText(key_settings[i].keydescription); } } return ""; diff --git a/src/gui/keybind_setup.h b/src/gui/keybind_setup.h index a43067ead..894b45bc1 100644 --- a/src/gui/keybind_setup.h +++ b/src/gui/keybind_setup.h @@ -112,7 +112,7 @@ class CKeybindSetup : public CMenuTarget, public CChangeObserver ~CKeybindSetup(); int exec(CMenuTarget* parent, const std::string & actionKey); bool changeNotify(const neutrino_locale_t OptionName, void * data); - static const char *getMoviePlayerButtonName(const neutrino_msg_t key, bool &active); + static const char *getMoviePlayerButtonName(const neutrino_msg_t key, bool &active, bool return_title = false); }; #endif From 2f3352918f2829bae8b36d080ac813cefa7d56a8 Mon Sep 17 00:00:00 2001 From: vanhofen Date: Mon, 25 Jan 2016 13:03:51 +0100 Subject: [PATCH 6/6] Revert "- infoviewer_bb: use getMoviePlayerButtonName in mode_webtv too" This reverts commit a3d801190c8b1dcff742657ab6e1be48936399fa because mode_webtv == (something like) live tv. So the movieplayer button names shouldn't be displayed. Conflicts: src/gui/infoviewer_bb.cpp Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/2786c1386722ba7201edbc134c563dba322c6a48 Author: vanhofen Date: 2016-01-25 (Mon, 25 Jan 2016) ------------------ This commit was generated by Migit --- src/gui/infoviewer_bb.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/gui/infoviewer_bb.cpp b/src/gui/infoviewer_bb.cpp index 4f906866f..f681ff58c 100644 --- a/src/gui/infoviewer_bb.cpp +++ b/src/gui/infoviewer_bb.cpp @@ -221,7 +221,7 @@ void CInfoViewerBB::getBBButtonInfo() icon = NEUTRINO_ICON_BUTTON_RED; frameBuffer->getIconSize(icon.c_str(), &w, &h); mode = CNeutrinoApp::getInstance()->getMode(); - if (mode == NeutrinoMessages::mode_ts || mode == NeutrinoMessages::mode_webtv || mode == NeutrinoMessages::mode_audio) { + if (mode == NeutrinoMessages::mode_ts || mode == NeutrinoMessages::mode_audio) { text = CKeybindSetup::getMoviePlayerButtonName(CRCInput::RC_red, active, g_settings.infobar_buttons_usertitle); if (!text.empty()) break; @@ -236,7 +236,7 @@ void CInfoViewerBB::getBBButtonInfo() icon = NEUTRINO_ICON_BUTTON_GREEN; frameBuffer->getIconSize(icon.c_str(), &w, &h); mode = CNeutrinoApp::getInstance()->getMode(); - if (mode == NeutrinoMessages::mode_ts || mode == NeutrinoMessages::mode_webtv || mode == NeutrinoMessages::mode_audio) { + if (mode == NeutrinoMessages::mode_ts || mode == NeutrinoMessages::mode_audio) { text = CKeybindSetup::getMoviePlayerButtonName(CRCInput::RC_green, active, g_settings.infobar_buttons_usertitle); if (!text.empty()) break; @@ -251,7 +251,7 @@ void CInfoViewerBB::getBBButtonInfo() icon = NEUTRINO_ICON_BUTTON_YELLOW; frameBuffer->getIconSize(icon.c_str(), &w, &h); mode = CNeutrinoApp::getInstance()->getMode(); - if (mode == NeutrinoMessages::mode_ts || mode == NeutrinoMessages::mode_webtv || mode == NeutrinoMessages::mode_audio) { + if (mode == NeutrinoMessages::mode_ts || mode == NeutrinoMessages::mode_audio) { text = CKeybindSetup::getMoviePlayerButtonName(CRCInput::RC_yellow, active, g_settings.infobar_buttons_usertitle); if (!text.empty()) break; @@ -266,7 +266,7 @@ void CInfoViewerBB::getBBButtonInfo() icon = NEUTRINO_ICON_BUTTON_BLUE; frameBuffer->getIconSize(icon.c_str(), &w, &h); mode = CNeutrinoApp::getInstance()->getMode(); - if (mode == NeutrinoMessages::mode_ts || mode == NeutrinoMessages::mode_webtv || mode == NeutrinoMessages::mode_audio) { + if (mode == NeutrinoMessages::mode_ts || mode == NeutrinoMessages::mode_audio) { text = CKeybindSetup::getMoviePlayerButtonName(CRCInput::RC_blue, active, g_settings.infobar_buttons_usertitle); if (!text.empty()) break;