From 8882b8913b607f97dee25d71c6c096d8e46f84ac Mon Sep 17 00:00:00 2001 From: Michael Liebmann Date: Mon, 28 Dec 2015 15:24:35 +0100 Subject: [PATCH 01/38] CLuaInstance: Display warning when using a obsolete parameter... ...in cwindow/ctext/cpicture:hide() Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/75631a97f1eb09751d360ac233690d93c731241a Author: Michael Liebmann Date: 2015-12-28 (Mon, 28 Dec 2015) --- src/gui/lua/lua_cc_picture.cpp | 15 ++++++--------- src/gui/lua/lua_cc_text.cpp | 15 ++++++--------- src/gui/lua/lua_cc_window.cpp | 15 ++++++--------- 3 files changed, 18 insertions(+), 27 deletions(-) diff --git a/src/gui/lua/lua_cc_picture.cpp b/src/gui/lua/lua_cc_picture.cpp index 84eceb74b..23d4c6bfc 100644 --- a/src/gui/lua/lua_cc_picture.cpp +++ b/src/gui/lua/lua_cc_picture.cpp @@ -148,15 +148,12 @@ int CLuaInstCCPicture::CCPictureHide(lua_State *L) lua_assert(lua_istable(L,1)); CLuaCCPicture *D = CCPictureCheck(L, 1); if (!D) return 0; -#if 0 - bool no_restore = false; - if (!tableLookup(L, "no_restore", no_restore)) { - std::string tmp = "false"; - if (tableLookup(L, "no_restore", tmp)) - paramBoolDeprecated(L, tmp.c_str()); - no_restore = (tmp == "true" || tmp == "1" || tmp == "yes"); - } -#endif + + bool tmp1 = false; + std::string tmp2 = "false"; + if ((tableLookup(L, "no_restore", tmp1)) || (tableLookup(L, "no_restore", tmp2))) + printf("[%s:hide] Warning, obsolete parameter in use, please remove!\n", "cpicture"); + if (D->parent) { D->cp->setPicture(""); D->cp->paint(); diff --git a/src/gui/lua/lua_cc_text.cpp b/src/gui/lua/lua_cc_text.cpp index 294df354d..af488a8be 100644 --- a/src/gui/lua/lua_cc_text.cpp +++ b/src/gui/lua/lua_cc_text.cpp @@ -173,15 +173,12 @@ int CLuaInstCCText::CCTextHide(lua_State *L) lua_assert(lua_istable(L,1)); CLuaCCText *D = CCTextCheck(L, 1); if (!D) return 0; -#if 0 - bool no_restore = false; - if (!tableLookup(L, "no_restore", no_restore)) { - std::string tmp = "false"; - if (tableLookup(L, "no_restore", tmp)) - paramBoolDeprecated(L, tmp.c_str()); - no_restore = (tmp == "true" || tmp == "1" || tmp == "yes"); - } -#endif + + bool tmp1 = false; + std::string tmp2 = "false"; + if ((tableLookup(L, "no_restore", tmp1)) || (tableLookup(L, "no_restore", tmp2))) + printf("[%s:hide] Warning, obsolete parameter in use, please remove!\n", "ctext"); + if (D->parent) { D->ct->setText("", D->mode, g_Font[D->font_text]); D->ct->paint(); diff --git a/src/gui/lua/lua_cc_window.cpp b/src/gui/lua/lua_cc_window.cpp index dacba8780..467a9baeb 100644 --- a/src/gui/lua/lua_cc_window.cpp +++ b/src/gui/lua/lua_cc_window.cpp @@ -196,15 +196,12 @@ int CLuaInstCCWindow::CCWindowHide(lua_State *L) lua_assert(lua_istable(L,1)); CLuaCCWindow *D = CCWindowCheck(L, 1); if (!D) return 0; -#if 0 - bool no_restore = false; - if (!tableLookup(L, "no_restore", no_restore)) { - std::string tmp = "false"; - if (tableLookup(L, "no_restore", tmp)) - paramBoolDeprecated(L, tmp.c_str()); - no_restore = (tmp == "true" || tmp == "1" || tmp == "yes"); - } -#endif + + bool tmp1 = false; + std::string tmp2 = "false"; + if ((tableLookup(L, "no_restore", tmp1)) || (tableLookup(L, "no_restore", tmp2))) + printf("[%s:hide] Warning, obsolete parameter in use, please remove!\n", "cwindow"); + D->w->hide(); return 0; } From e850bae22431a04d85497ce5bb44047130853d5d Mon Sep 17 00:00:00 2001 From: Michael Liebmann Date: Mon, 28 Dec 2015 15:24:35 +0100 Subject: [PATCH 02/38] Fix & sort locale Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/182e6ae5d17515a076856f5a8c9090aed19c0f35 Author: Michael Liebmann Date: 2015-12-28 (Mon, 28 Dec 2015) --- data/locale/deutsch.locale | 4 ++-- data/locale/english.locale | 5 ++--- src/gui/opkg_manager.cpp | 6 +++--- src/system/locals.h | 6 +++--- src/system/locals_intern.h | 4 ++-- 5 files changed, 12 insertions(+), 13 deletions(-) diff --git a/data/locale/deutsch.locale b/data/locale/deutsch.locale index a7e8a5e8c..9a536e1a7 100644 --- a/data/locale/deutsch.locale +++ b/data/locale/deutsch.locale @@ -1196,7 +1196,7 @@ menu.hint_next Weiter zum nächsten Menü.\nDie Taste 'Menü' schließt alle Men menu.hint_next_brief Weiter zum nächsten Menü menu.hint_numeric_adjust Bei numerischer Programmwahl die Kanalliste am neu gewählten Programm ausrichten menu.hint_opkg Software-Pakete installieren oder vorhandene aktualisieren -menu.hint_opkg_feed_address_edit Bearbeiten von Feed-Adressen +menu.hint_opkg_feed_addresses_edit Bearbeiten von Feed-Adressen menu.hint_opkg_install_local_package Paket von USB-Stick, SD, Freigabe oder lokalem Ordner installieren. menu.hint_opkg_upgrade Aktualisiert alle installierten Pakete auf die neueste verfügbare Version menu.hint_osd Farben, Schriftarten, Anzeigegröße, Ansichtsoptionen der Menüs und mehr @@ -1348,8 +1348,8 @@ menu.hint_screensaver_delay Legen sie die Zeit (in Minuten) fest, nach der der B menu.hint_screensaver_dir Wählen Sie das Verzeichnis, in dem die Bilder für Ihren Bildschirmschoner gespeichert sind menu.hint_screensaver_mode Modus des Bilschirmschoners wählen. menu.hint_screensaver_random Aktviere/deaktiviere zufällige Bilderauswahl. -menu.hint_screensaver_timeout Wechselintervall des Bildschirmschoners menu.hint_screensaver_setup Konfigurieren Sie die Optionen des Bildschirmschoners für den Audioplayer und den Radio-Modus +menu.hint_screensaver_timeout Wechselintervall des Bildschirmschoners menu.hint_screenshot_count Wählen Sie, wie viele Screenshots erstellt werden sollen menu.hint_screenshot_cover Während der Wiedergabe von Aufnahmen kann ein Screenshot für die Vorschau im Moviebrowser erstellt werden menu.hint_screenshot_dir Wählen Sie das Verzeichnis zum Speichern der Screenshots diff --git a/data/locale/english.locale b/data/locale/english.locale index 504a3aa17..7be0dd633 100644 --- a/data/locale/english.locale +++ b/data/locale/english.locale @@ -1196,7 +1196,7 @@ menu.hint_next Continue to next menu\nPress menu key to close all menus menu.hint_next_brief Continue to next menu menu.hint_numeric_adjust Adjust channel list mode on numeric zap menu.hint_opkg Install or update software packages -menu.hint_opkg_feed_address_edit Edit feed addresses +menu.hint_opkg_feed_addresses_edit Edit feed addresses menu.hint_opkg_install_local_package Install package from USB, SD, share or local directory. menu.hint_opkg_upgrade Updates all installed packages to the most recent version available menu.hint_osd Colors, fonts, screen size\nGUI look and feel options @@ -1348,8 +1348,8 @@ menu.hint_screensaver_delay Set the time (in minutes) after which the screensave menu.hint_screensaver_dir Select directory in which the screensaver has to start menu.hint_screensaver_mode Select screensaver mode. menu.hint_screensaver_random Enable/disable random image selection. -menu.hint_screensaver_timeout Select the timeout to changes in screensavers menu.hint_screensaver_setup Configure screensaver options for audioplayer and radio mode +menu.hint_screensaver_timeout Select the timeout to changes in screensavers menu.hint_screenshot_count When no GUI on screen, you can save 1-5\nscreenshot serie menu.hint_screenshot_cover ON: When playing record, overwrite single\nscreenshot to show inside MovieBrowser menu.hint_screenshot_dir Select directory to save screenshots @@ -1433,7 +1433,6 @@ messagebox.back Back messagebox.cancel Cancel messagebox.discard Discard changes? messagebox.error Error -messagebox.feature_not_supported Funkcia nie je podporovaná. messagebox.feature_not_supported Feature is not supported. Please contact your firmware provider! messagebox.info Information messagebox.no No diff --git a/src/gui/opkg_manager.cpp b/src/gui/opkg_manager.cpp index eb954d4c6..1b925818d 100644 --- a/src/gui/opkg_manager.cpp +++ b/src/gui/opkg_manager.cpp @@ -492,8 +492,8 @@ int COPKGManager::showMenu() //feed setup CMenuWidget feeds_menu(LOCALE_OPKG_TITLE, NEUTRINO_ICON_UPDATE, w_max (100, 10)); showMenuConfigFeed(&feeds_menu); - fw = new CMenuForwarder(LOCALE_OPKG_FEED_ADRESSES, true, NULL, &feeds_menu, NULL, CRCInput::RC_www); - fw->setHint(NEUTRINO_ICON_HINT_SW_UPDATE, LOCALE_MENU_HINT_OPKG_FEED_ADRESSES_EDIT); + fw = new CMenuForwarder(LOCALE_OPKG_FEED_ADDRESSES, true, NULL, &feeds_menu, NULL, CRCInput::RC_www); + fw->setHint(NEUTRINO_ICON_HINT_SW_UPDATE, LOCALE_MENU_HINT_OPKG_FEED_ADDRESSES_EDIT); menu->addItem(fw); menu->addItem(GenericMenuSeparatorLine); @@ -879,7 +879,7 @@ bool COPKGManager::isUpgradable(const string& pkg_name) void COPKGManager::showMenuConfigFeed(CMenuWidget *feed_menu) { - feed_menu->addIntroItems(LOCALE_OPKG_FEED_ADRESSES); + feed_menu->addIntroItems(LOCALE_OPKG_FEED_ADDRESSES); for(size_t i=0; i Date: Tue, 1 Dec 2015 21:01:10 +0100 Subject: [PATCH 03/38] CComponentsForm: add return value to addCCItem() return value = current id of added item Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/888c575ef4c3138bd04f380a401eaab90d982aed Author: Thilo Graf Date: 2015-12-01 (Tue, 01 Dec 2015) --- src/gui/components/cc_frm.cpp | 8 +++++--- src/gui/components/cc_frm.h | 6 ++++-- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/src/gui/components/cc_frm.cpp b/src/gui/components/cc_frm.cpp index 3b61a8023..6e2fc8920 100644 --- a/src/gui/components/cc_frm.cpp +++ b/src/gui/components/cc_frm.cpp @@ -202,7 +202,7 @@ void CComponentsForm::clear() } -void CComponentsForm::addCCItem(CComponentsItem* cc_Item) +int CComponentsForm::addCCItem(CComponentsItem* cc_Item) { if (cc_Item){ dprintf(DEBUG_DEBUG, "[CComponentsForm] %s-%d try to add cc_Item [type %d] to form [current index=%d] \n", __func__, __LINE__, cc_Item->getItemType(), cc_item_index); @@ -218,16 +218,18 @@ void CComponentsForm::addCCItem(CComponentsItem* cc_Item) cc_Item->setFocus(true); dprintf(DEBUG_DEBUG, "\t%s-%d parent index = %d, assigned index ======> %d\n", __func__, __LINE__, cc_item_index, new_index); - + return getCCItemId(cc_Item); } else dprintf(DEBUG_NORMAL, "[CComponentsForm] %s-%d tried to add an empty or invalide cc_item !!!\n", __func__, __LINE__); + return -1; } -void CComponentsForm::addCCItem(const std::vector &cc_Items) +int CComponentsForm::addCCItem(const std::vector &cc_Items) { for (size_t i= 0; i< cc_Items.size(); i++) addCCItem(cc_Items[i]); + return size(); } int CComponentsForm::getCCItemId(CComponentsItem* cc_Item) diff --git a/src/gui/components/cc_frm.h b/src/gui/components/cc_frm.h index 52c3d5934..94c488350 100644 --- a/src/gui/components/cc_frm.h +++ b/src/gui/components/cc_frm.h @@ -78,8 +78,10 @@ class CComponentsForm : public CComponentsItem ///NOTE: Items always have parent bindings to "this" and use the parent background color as default! Set parameter 'ignore_parent=true' to ignore parent background color! virtual void killCCItems(const fb_pixel_t& bg_color, bool ignore_parent); - virtual void addCCItem(CComponentsItem* cc_Item); - virtual void addCCItem(const std::vector &cc_items); + ///add an item to form collection, returns id + virtual int addCCItem(CComponentsItem* cc_Item); + ///add items from a vector to form collection, returns size/count of items + virtual int addCCItem(const std::vector &cc_items); virtual void insertCCItem(const uint& cc_item_id, CComponentsItem* cc_Item); ///removes item object from container and deallocates instance From 306bd00eeb7b24bae09f2fd050dd8d7282537a31 Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Mon, 28 Dec 2015 18:13:21 +0100 Subject: [PATCH 04/38] CComponentsWindow: add return value to addWindowCCItem(), fix footer color - return value of addWindowCCItem() = current id of added body item - assignment of footer color was missing Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/4bd3173d4183000c269ad8431c345e331de0a726 Author: Thilo Graf Date: 2015-12-28 (Mon, 28 Dec 2015) --- src/gui/components/cc_frm_window.cpp | 7 +++++-- src/gui/components/cc_frm_window.h | 7 ++++++- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/src/gui/components/cc_frm_window.cpp b/src/gui/components/cc_frm_window.cpp index 3d6711df5..56df2802b 100644 --- a/src/gui/components/cc_frm_window.cpp +++ b/src/gui/components/cc_frm_window.cpp @@ -154,6 +154,7 @@ void CComponentsWindow::initVarWindow( const int& x_pos, const int& y_pos, const ccw_w_sidebar = 40; ccw_col_head = COL_MENUCONTENT_PLUS_0; ccw_col_head_text = COL_MENUHEAD_TEXT; + ccw_col_footer = COL_INFOBAR_SHADOW_PLUS_1; page_scroll_mode = PG_SCROLL_M_OFF; //permanent disabled here, only in body used! @@ -217,6 +218,7 @@ void CComponentsWindow::initFooter() ccw_footer->setWidth(width-2*fr_thickness); ccw_footer->enableShadow(shadow); ccw_footer->setCorner(corner_rad, CORNER_BOTTOM); + ccw_footer->setColorBody(ccw_col_footer); } } @@ -359,10 +361,11 @@ void CComponentsWindow::enableSidebar(const int& sidbar_type) initCCWItems(); } -void CComponentsWindow::addWindowItem(CComponentsItem* cc_Item) +int CComponentsWindow::addWindowItem(CComponentsItem* cc_Item) { if (ccw_body) - ccw_body->addCCItem(cc_Item); + return ccw_body->addCCItem(cc_Item); + return -1; } void CComponentsWindow::setCurrentPage(const u_int8_t& current_page) diff --git a/src/gui/components/cc_frm_window.h b/src/gui/components/cc_frm_window.h index 120804d51..da09fb342 100644 --- a/src/gui/components/cc_frm_window.h +++ b/src/gui/components/cc_frm_window.h @@ -87,6 +87,8 @@ class CComponentsWindow : public CComponentsForm fb_pixel_t ccw_col_head; ///header text color fb_pixel_t ccw_col_head_text; + ///footer bg color + fb_pixel_t ccw_col_footer; ///initialze header object void initHeader(); @@ -146,7 +148,7 @@ class CComponentsWindow : public CComponentsForm fb_pixel_t color_shadow = COL_MENUCONTENTDARK_PLUS_0); ///add item to body object, also usable is addCCItem() to add items to the windo object - void addWindowItem(CComponentsItem* cc_Item); + int addWindowItem(CComponentsItem* cc_Item); ///allow/disallow paint a footer, default true, see also ccw_show_footer, showHeader() void showFooter(bool show = true){ccw_show_footer = show; initCCWItems();}; @@ -186,6 +188,9 @@ class CComponentsWindow : public CComponentsForm ///returns a pointer to the internal footer object, use this to get access to footer properities CComponentsFooter* getFooterObject(){return ccw_footer;}; + ///set background to footer + void setWindowFooterColor(const fb_pixel_t& color){ccw_col_footer = color;} + ///returns a pointer to the internal left side bar object, use this to get access to left sidebar properities CComponentsFrmChain* getLeftSidebarObject(){return ccw_left_sidebar;}; ///returns a pointer to the internal right side bar object, use this to get access to right sidebar properities From fa501ae26f550e90a404ce433d25b2e4e3f4f31e Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Mon, 28 Dec 2015 18:36:21 +0100 Subject: [PATCH 05/38] themes: add demo themes Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/52cc52a28b665247c316ee44c449d80cc5f4ecc3 Author: Thilo Graf Date: 2015-12-28 (Mon, 28 Dec 2015) --- data/themes/Makefile.am | 3 +- .../{Neutrino3.0.theme => Neutrino-3.0.theme} | 0 data/themes/Olive-3.0.theme | 65 +++++++++++++++++++ 3 files changed, 67 insertions(+), 1 deletion(-) rename data/themes/{Neutrino3.0.theme => Neutrino-3.0.theme} (100%) create mode 100644 data/themes/Olive-3.0.theme diff --git a/data/themes/Makefile.am b/data/themes/Makefile.am index c94cf8815..4947e59a2 100644 --- a/data/themes/Makefile.am +++ b/data/themes/Makefile.am @@ -9,7 +9,8 @@ install_DATA = \ Gray.theme \ Grey-Blue.theme \ MonoChrom.theme \ - Neutrino3.0.theme \ + Neutrino-3.0.theme \ Olive.theme \ + Olive-3.0.theme \ Red.theme \ VirginMedia.theme diff --git a/data/themes/Neutrino3.0.theme b/data/themes/Neutrino-3.0.theme similarity index 100% rename from data/themes/Neutrino3.0.theme rename to data/themes/Neutrino-3.0.theme diff --git a/data/themes/Olive-3.0.theme b/data/themes/Olive-3.0.theme new file mode 100644 index 000000000..b16933cbe --- /dev/null +++ b/data/themes/Olive-3.0.theme @@ -0,0 +1,65 @@ +clock_Digit_alpha=0 +clock_Digit_blue=100 +clock_Digit_green=100 +clock_Digit_red=100 +colored_events_alpha=0 +colored_events_blue=0 +colored_events_channellist=2 +colored_events_green=84 +colored_events_infobar=2 +colored_events_red=63 +infobar_Text_alpha=0 +infobar_Text_blue=18 +infobar_Text_green=20 +infobar_Text_red=20 +infobar_alpha=0 +infobar_blue=84 +infobar_casystem_alpha=8 +infobar_casystem_blue=0 +infobar_casystem_green=0 +infobar_casystem_red=0 +infobar_gradient_bottom=3 +infobar_gradient_bottom_direction=1 +infobar_gradient_top=4 +infobar_gradient_top_direction=1 +infobar_green=76 +infobar_red=72 +menu_ButtonBar_gradient=0 +menu_ButtonBar_gradient_direction=1 +menu_Content_Selected_Text_alpha=0 +menu_Content_Selected_Text_blue=0 +menu_Content_Selected_Text_green=0 +menu_Content_Selected_Text_red=0 +menu_Content_Selected_alpha=0 +menu_Content_Selected_blue=0 +menu_Content_Selected_green=85 +menu_Content_Selected_red=65 +menu_Content_Text_alpha=0 +menu_Content_Text_blue=100 +menu_Content_Text_green=100 +menu_Content_Text_red=100 +menu_Content_alpha=20 +menu_Content_blue=0 +menu_Content_green=0 +menu_Content_inactive_Text_alpha=0 +menu_Content_inactive_Text_blue=60 +menu_Content_inactive_Text_green=60 +menu_Content_inactive_Text_red=60 +menu_Content_inactive_alpha=20 +menu_Content_inactive_blue=0 +menu_Content_inactive_green=0 +menu_Content_inactive_red=0 +menu_Content_red=0 +menu_Head_Text_alpha=0 +menu_Head_Text_blue=0 +menu_Head_Text_green=82 +menu_Head_Text_red=60 +menu_Head_alpha=0 +menu_Head_blue=78 +menu_Head_gradient=4 +menu_Head_gradient_direction=1 +menu_Head_green=70 +menu_Head_red=66 +menu_Hint_gradient=3 +menu_Hint_gradient_direction=0 +menu_Separator_gradient_enable=1 From c4225738f4c85f1efe3eb871c9eba0e3c4dffe63 Mon Sep 17 00:00:00 2001 From: vanhofen Date: Mon, 28 Dec 2015 18:58:32 +0100 Subject: [PATCH 06/38] yWeb: show correct header in timer list Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/6d6f055732a924e0bd019e0ebf87600d428d20f8 Author: vanhofen Date: 2015-12-28 (Mon, 28 Dec 2015) Origin message was: ------------------ - yWeb: show correct header in timer list --- src/nhttpd/web/Y_Timer_List.yhtm | 2 +- src/nhttpd/web/Y_Version.txt | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/nhttpd/web/Y_Timer_List.yhtm b/src/nhttpd/web/Y_Timer_List.yhtm index d79a6409f..b813152dd 100644 --- a/src/nhttpd/web/Y_Timer_List.yhtm +++ b/src/nhttpd/web/Y_Timer_List.yhtm @@ -13,7 +13,7 @@ {=L:live.timer_edit.alarm_date=} {=L:live.timer_edit.stop_date=} {=L:live.timer_edit.repeat=} - {=L:live.timer_edit.repeat=} + {=L:live.timer_edit.repeat1=} {=L:live.timer_edit.type=} {=L:live.timer_edit.description=}   diff --git a/src/nhttpd/web/Y_Version.txt b/src/nhttpd/web/Y_Version.txt index d4626810e..ecf60e920 100644 --- a/src/nhttpd/web/Y_Version.txt +++ b/src/nhttpd/web/Y_Version.txt @@ -1,4 +1,4 @@ -version=2.9.0.23 -date=01.05.2015 +version=2.9.0.24 +date=28.12.2015 type=Release info=Port CST From afdcf34688e017568c41714e1c102db209d876b2 Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Mon, 28 Dec 2015 20:19:40 +0100 Subject: [PATCH 07/38] CComponentsDetailLine: fix possible rests on screen after hided detailsline Shadow width was missing. Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/68b5040c9f0e272accb6286c46b5c95535ad2c9b Author: Thilo Graf Date: 2015-12-28 (Mon, 28 Dec 2015) --- src/gui/components/cc_detailsline.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/components/cc_detailsline.cpp b/src/gui/components/cc_detailsline.cpp index 843ebddcf..561f698a2 100644 --- a/src/gui/components/cc_detailsline.cpp +++ b/src/gui/components/cc_detailsline.cpp @@ -103,7 +103,7 @@ void CComponentsDetailLine::paint(bool do_save_bg) cc_fbdata_t fbdata[] = { /*buffered bg full width and height */ - {true, CC_FBDATA_TYPE_BGSCREEN, x, y_mark_top, width, y_mark_down-y_mark_top+h_mark_down, 0, 0, 0, 0, NULL, NULL, NULL, false}, + {true, CC_FBDATA_TYPE_BGSCREEN, x, y_mark_top, width, y_mark_down-y_mark_top+h_mark_down+sw, 0, 0, 0, 0, NULL, NULL, NULL, false}, /* vertical item mark | */ {true, CC_FBDATA_TYPE_BOX, x+width-thickness-sw, y_mark_top, thickness, h_mark_top, col_body, 0, 0, 0, NULL, NULL, NULL, false}, From d1e7fb48b3516f682c73aa716a279608a19125a0 Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Tue, 29 Dec 2015 12:46:29 +0100 Subject: [PATCH 08/38] COsdSetup: try to fix multiple item arrangement while open osd settings Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/a78721f6406f7ce494d552132c71346cd7e23583 Author: Thilo Graf Date: 2015-12-29 (Tue, 29 Dec 2015) --- src/gui/osd_setup.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/gui/osd_setup.cpp b/src/gui/osd_setup.cpp index 6b90a8536..1464b0dbe 100644 --- a/src/gui/osd_setup.cpp +++ b/src/gui/osd_setup.cpp @@ -510,15 +510,14 @@ int COsdSetup::showOsdSetup() osd_menu = new CMenuWidget(LOCALE_MAINMENU_SETTINGS, NEUTRINO_ICON_COLORS, width, MN_WIDGET_ID_OSDSETUP); osd_menu->setWizardMode(is_wizard); - //menu colors - if (osd_menu_colors == NULL) - osd_menu_colors = new CMenuWidget(LOCALE_MAINMENU_SETTINGS, NEUTRINO_ICON_COLORS, width, MN_WIDGET_ID_OSDSETUP_MENUCOLORS); - //intro with subhead and back button osd_menu->addIntroItems(LOCALE_MAINSETTINGS_OSD); //item menu colors - showOsdMenueColorSetup(osd_menu_colors); + if (osd_menu_colors == NULL){ + osd_menu_colors = new CMenuWidget(LOCALE_MAINMENU_SETTINGS, NEUTRINO_ICON_COLORS, width, MN_WIDGET_ID_OSDSETUP_MENUCOLORS); + showOsdMenueColorSetup(osd_menu_colors); + } CMenuForwarder * mf = new CMenuForwarder(LOCALE_COLORMENU_MENUCOLORS, true, NULL, osd_menu_colors, NULL, CRCInput::RC_red); mf->setHint("", LOCALE_MENU_HINT_COLORS); osd_menu->addItem(mf); From acae623f95f4412d3cc0b1d0a36e43b24eb054c9 Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Tue, 29 Dec 2015 12:55:03 +0100 Subject: [PATCH 09/38] clean up: remove useless line in osd_setup.cpp Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/961d6ce888db3d4d8f815094f46c75c53b2d5432 Author: Thilo Graf Date: 2015-12-29 (Tue, 29 Dec 2015) --- src/gui/osd_setup.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/gui/osd_setup.cpp b/src/gui/osd_setup.cpp index 1464b0dbe..1cf348fc4 100644 --- a/src/gui/osd_setup.cpp +++ b/src/gui/osd_setup.cpp @@ -650,10 +650,8 @@ int COsdSetup::showOsdSetup() if (oldInfoClockSize != g_settings.infoClockFontSize) { CInfoClock::getInstance()->setHeight(g_settings.infoClockFontSize); CVolumeHelper::getInstance()->refresh(); - if (CNeutrinoApp::getInstance()->isMuted()) { - CAudioMute::getInstance()->enableMuteIcon(false); + if (CNeutrinoApp::getInstance()->isMuted()) CAudioMute::getInstance()->enableMuteIcon(true); - } } delete colorInfoclockNotifier; From a6ac956894c1eab383e48accde28e91fb715cf9e Mon Sep 17 00:00:00 2001 From: vanhofen Date: Sun, 27 Dec 2015 22:13:08 +0100 Subject: [PATCH 10/38] infoviewer_bb: use getMoviePlayerButtonName in mode_webtv too Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/5e51b5e252cedbcc17540d070033f5d5e6f516c4 Author: vanhofen Date: 2015-12-27 (Sun, 27 Dec 2015) Origin message was: ------------------ - infoviewer_bb: use getMoviePlayerButtonName in mode_webtv too --- 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 c90e03dd7..eecbf4f05 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) { + if (mode == NeutrinoMessages::mode_ts || mode == NeutrinoMessages::mode_webtv) { text = CKeybindSetup::getMoviePlayerButtonName(CRCInput::RC_red, active); if (!text.empty()) break; @@ -238,7 +238,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) { + if (mode == NeutrinoMessages::mode_ts || mode == NeutrinoMessages::mode_webtv) { text = CKeybindSetup::getMoviePlayerButtonName(CRCInput::RC_green, active); if (text != g_Locale->getText(LOCALE_MPKEY_AUDIO)) break; @@ -263,7 +263,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) { + if (mode == NeutrinoMessages::mode_ts || mode == NeutrinoMessages::mode_webtv) { text = CKeybindSetup::getMoviePlayerButtonName(CRCInput::RC_yellow, active); if (!text.empty()) break; @@ -280,7 +280,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) { + if (mode == NeutrinoMessages::mode_ts || mode == NeutrinoMessages::mode_webtv) { text = CKeybindSetup::getMoviePlayerButtonName(CRCInput::RC_blue, active); if (!text.empty()) break; From 709277bb24ce639fc23a28f78c51837125aac82a Mon Sep 17 00:00:00 2001 From: vanhofen Date: Sun, 27 Dec 2015 23:02:24 +0100 Subject: [PATCH 11/38] infoviewer_bb: use getMoviePlayerButtonName in mode_audio too; ugly workaround; why we're in mode_audio when using upnp-browser? do we need a mode_upnp? Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/a2b28048d63f638ea263adbdfe1c33744f29ae15 Author: vanhofen Date: 2015-12-27 (Sun, 27 Dec 2015) Origin message was: ------------------ - infoviewer_bb: use getMoviePlayerButtonName in mode_audio too; ugly workaround; why we're in mode_audio when using upnp-browser? do we need a mode_upnp? --- 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 eecbf4f05..3269bef31 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) { + if (mode == NeutrinoMessages::mode_ts || mode == NeutrinoMessages::mode_webtv || mode == NeutrinoMessages::mode_audio) { text = CKeybindSetup::getMoviePlayerButtonName(CRCInput::RC_red, active); if (!text.empty()) break; @@ -238,7 +238,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) { + if (mode == NeutrinoMessages::mode_ts || mode == NeutrinoMessages::mode_webtv || mode == NeutrinoMessages::mode_audio) { text = CKeybindSetup::getMoviePlayerButtonName(CRCInput::RC_green, active); if (text != g_Locale->getText(LOCALE_MPKEY_AUDIO)) break; @@ -263,7 +263,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) { + if (mode == NeutrinoMessages::mode_ts || mode == NeutrinoMessages::mode_webtv || mode == NeutrinoMessages::mode_audio) { text = CKeybindSetup::getMoviePlayerButtonName(CRCInput::RC_yellow, active); if (!text.empty()) break; @@ -280,7 +280,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) { + if (mode == NeutrinoMessages::mode_ts || mode == NeutrinoMessages::mode_webtv || mode == NeutrinoMessages::mode_audio) { text = CKeybindSetup::getMoviePlayerButtonName(CRCInput::RC_blue, active); if (!text.empty()) break; From acf3a5a980e8e57fb8b0c34924e30e38d0c18764 Mon Sep 17 00:00:00 2001 From: vanhofen Date: Sun, 27 Dec 2015 22:19:43 +0100 Subject: [PATCH 12/38] infoviewer_bb: remove arbitrarily titles from color buttons Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/6d144ad68539f193641695bfbe4886784abb1412 Author: vanhofen Date: 2015-12-27 (Sun, 27 Dec 2015) Origin message was: ------------------ - infoviewer_bb: remove arbitrarily titles from color buttons --- src/gui/infoviewer_bb.cpp | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/src/gui/infoviewer_bb.cpp b/src/gui/infoviewer_bb.cpp index 3269bef31..d2a8255c7 100644 --- a/src/gui/infoviewer_bb.cpp +++ b/src/gui/infoviewer_bb.cpp @@ -230,8 +230,6 @@ void CInfoViewerBB::getBBButtonInfo() if (!text.empty()) break; text = g_settings.usermenu[SNeutrinoSettings::BUTTON_RED]->title; - if (text.empty()) - text = g_Locale->getText(LOCALE_INFOVIEWER_EVENTLIST); break; case CInfoViewerBB::BUTTON_GREEN: pers = SNeutrinoSettings::P_MAIN_GREEN_BUTTON; @@ -251,11 +249,6 @@ void CInfoViewerBB::getBBButtonInfo() break; if ((mode == NeutrinoMessages::mode_ts || mode == NeutrinoMessages::mode_webtv || mode == NeutrinoMessages::mode_audio) && !CMoviePlayerGui::getInstance().timeshift) { text = CMoviePlayerGui::getInstance(mode == NeutrinoMessages::mode_webtv).CurrentAudioName(); - } else if (!g_RemoteControl->current_PIDs.APIDs.empty()) { - int selected = g_RemoteControl->current_PIDs.PIDs.selected_apid; - if (text.empty()){ - text = g_RemoteControl->current_PIDs.APIDs[selected].desc; - } } break; case CInfoViewerBB::BUTTON_YELLOW: @@ -272,8 +265,6 @@ void CInfoViewerBB::getBBButtonInfo() if (!text.empty()) break; text = g_settings.usermenu[SNeutrinoSettings::BUTTON_YELLOW]->title; - if (text.empty()) - text = g_Locale->getText((g_RemoteControl->are_subchannels) ? LOCALE_INFOVIEWER_SUBSERVICE : LOCALE_INFOVIEWER_SELECTTIME); break; case CInfoViewerBB::BUTTON_BLUE: pers = SNeutrinoSettings::P_MAIN_BLUE_BUTTON; @@ -289,8 +280,6 @@ void CInfoViewerBB::getBBButtonInfo() if (!text.empty()) break; text = g_settings.usermenu[SNeutrinoSettings::BUTTON_BLUE]->title; - if (text.empty()) - text = g_Locale->getText(LOCALE_INFOVIEWER_STREAMINFO); break; default: break; From 49a62fb5d804c1bd594a7965b90aa7992faaf3ec Mon Sep 17 00:00:00 2001 From: vanhofen Date: Tue, 29 Dec 2015 12:49:52 +0100 Subject: [PATCH 13/38] infoviewer_bb: remove labeling of audio control from green button ... ... now user can use any color key to control audio Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/0561f6e663b6ca6fed4921237bdc35ae7f8942f8 Author: vanhofen Date: 2015-12-29 (Tue, 29 Dec 2015) Origin message was: ------------------ - infoviewer_bb: remove labeling of audio control from green button ... ... now user can use any color key to control audio --- src/gui/infoviewer_bb.cpp | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/src/gui/infoviewer_bb.cpp b/src/gui/infoviewer_bb.cpp index d2a8255c7..52ae55426 100644 --- a/src/gui/infoviewer_bb.cpp +++ b/src/gui/infoviewer_bb.cpp @@ -238,18 +238,13 @@ void CInfoViewerBB::getBBButtonInfo() mode = CNeutrinoApp::getInstance()->getMode(); if (mode == NeutrinoMessages::mode_ts || mode == NeutrinoMessages::mode_webtv || mode == NeutrinoMessages::mode_audio) { text = CKeybindSetup::getMoviePlayerButtonName(CRCInput::RC_green, active); - if (text != g_Locale->getText(LOCALE_MPKEY_AUDIO)) + if (!text.empty()) break; } text = CUserMenu::getUserMenuButtonName(1, active); - if (!text.empty() && (mode == NeutrinoMessages::mode_tv || mode == NeutrinoMessages::mode_radio)) + if (!text.empty()) break; text = g_settings.usermenu[SNeutrinoSettings::BUTTON_GREEN]->title; - if (text != g_Locale->getText(LOCALE_AUDIOSELECTMENUE_HEAD)) - break; - if ((mode == NeutrinoMessages::mode_ts || mode == NeutrinoMessages::mode_webtv || mode == NeutrinoMessages::mode_audio) && !CMoviePlayerGui::getInstance().timeshift) { - text = CMoviePlayerGui::getInstance(mode == NeutrinoMessages::mode_webtv).CurrentAudioName(); - } break; case CInfoViewerBB::BUTTON_YELLOW: pers = SNeutrinoSettings::P_MAIN_YELLOW_BUTTON; @@ -284,6 +279,17 @@ void CInfoViewerBB::getBBButtonInfo() default: break; } + //label audio control button in movieplayer/upnp mode + if (mode == NeutrinoMessages::mode_ts || mode == NeutrinoMessages::mode_webtv || mode == NeutrinoMessages::mode_audio) + { + if (!CMoviePlayerGui::getInstance().timeshift) + { + if (text == g_Locale->getText(LOCALE_MPKEY_AUDIO)) + { + text = CMoviePlayerGui::getInstance(mode == NeutrinoMessages::mode_webtv).CurrentAudioName(); + } + } + } bbButtonInfo[i].w = g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->getRenderWidth(text) + w + 10; bbButtonInfo[i].cx = w + 5; bbButtonInfo[i].h = h; From 58b18acca0e21924b08566da23cfe57fc5f28dcd Mon Sep 17 00:00:00 2001 From: vanhofen Date: Tue, 29 Dec 2015 09:44:43 +0100 Subject: [PATCH 14/38] user_menue_setup: don't override users title anymore Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/0c82bbe8d629873e4e01e6a560ada1c848f97f95 Author: vanhofen Date: 2015-12-29 (Tue, 29 Dec 2015) Origin message was: ------------------ - user_menue_setup: don't override users title anymore --- src/gui/user_menue_setup.cpp | 24 ++++++++---------------- src/gui/user_menue_setup.h | 1 - 2 files changed, 8 insertions(+), 17 deletions(-) diff --git a/src/gui/user_menue_setup.cpp b/src/gui/user_menue_setup.cpp index fd2d3e3af..7fd2d38aa 100644 --- a/src/gui/user_menue_setup.cpp +++ b/src/gui/user_menue_setup.cpp @@ -262,37 +262,31 @@ int CUserMenuSetup::showSetup() } -//check items of current button menu and set prefered menue name -void CUserMenuSetup::checkButtonItems() +//check button name for details like empty string and show an user message on issue +void CUserMenuSetup::checkButtonName() { //count of configured items int used_items = getUsedItemsCount(); - + //warn if no items defined and reset menu name, if empty - if (used_items == 0){ + if (used_items == 0) + { if (!g_settings.usermenu[button]->title.empty()){ // DisplayInfoMessage(g_Locale->getText(LOCALE_USERMENU_MSG_WARNING_NO_ITEMS)); g_settings.usermenu[button]->title = ""; } + //exit function return; } +#if 0 //if found only 1 configured item, ensure that the caption of usermenu is the same like this if (used_items == 1) { bool dummy; g_settings.usermenu[button]->title = CUserMenu::getUserMenuButtonName(button, dummy); } -} +#endif -//check button name for details like empty string and show an user message on issue -void CUserMenuSetup::checkButtonName() -{ - checkButtonItems(); - - //exit function, if no items found - if (getUsedItemsCount() == 0) - return; - if (button < USERMENU_ITEMS_COUNT && g_settings.usermenu[button]->title.empty()) { std::string msg(g_Locale->getText(LOCALE_USERMENU_MSG_INFO_IS_EMPTY)); @@ -303,10 +297,8 @@ void CUserMenuSetup::checkButtonName() } } - //get count of used items int CUserMenuSetup::getUsedItemsCount() { return ::split(g_settings.usermenu[button]->items, ',').size(); } - diff --git a/src/gui/user_menue_setup.h b/src/gui/user_menue_setup.h index 8f0041b1c..088e135e6 100644 --- a/src/gui/user_menue_setup.h +++ b/src/gui/user_menue_setup.h @@ -76,7 +76,6 @@ class CUserMenuSetup : public CMenuTarget std::map vals; int showSetup(); - void checkButtonItems(); void checkButtonName(); public: From 98af60b459063ef77b0d6f1cc7bcd9f0092a9483 Mon Sep 17 00:00:00 2001 From: vanhofen Date: Tue, 29 Dec 2015 12:10:27 +0100 Subject: [PATCH 15/38] user_menu: allow controlable return_title value Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/9325385ce9d479dcf591c4831632b1ed59e87a2a Author: vanhofen Date: 2015-12-29 (Tue, 29 Dec 2015) Origin message was: ------------------ - user_menu: allow controlable return_title value --- src/gui/user_menue.cpp | 3 +-- src/gui/user_menue.h | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/gui/user_menue.cpp b/src/gui/user_menue.cpp index ac21a8602..bb6109591 100644 --- a/src/gui/user_menue.cpp +++ b/src/gui/user_menue.cpp @@ -478,13 +478,12 @@ bool CUserMenu::showUserMenu(neutrino_msg_t msg) return true; } -const char *CUserMenu::getUserMenuButtonName(int button, bool &active) +const char *CUserMenu::getUserMenuButtonName(int button, bool &active, bool return_title) { active = false; if(button < 0 || button >= (int) g_settings.usermenu.size()) return ""; - bool return_title = false; neutrino_locale_t loc = NONEXISTANT_LOCALE; const char *text = NULL; diff --git a/src/gui/user_menue.h b/src/gui/user_menue.h index 5d15efa5b..33a90f0c2 100644 --- a/src/gui/user_menue.h +++ b/src/gui/user_menue.h @@ -76,7 +76,7 @@ class CUserMenu : public CChangeObserver CUserMenu(); ~CUserMenu(); bool showUserMenu(neutrino_msg_t msg); - static const char *getUserMenuButtonName(int button, bool &active); + static const char *getUserMenuButtonName(int button, bool &active, bool return_title = false); }; From b1956fde389c0540bd2ae217ef188af94312c015 Mon Sep 17 00:00:00 2001 From: vanhofen Date: Mon, 28 Dec 2015 00:47:27 +0100 Subject: [PATCH 16/38] add menu item to force usertitles for color buttons in infobar Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/3107e621ef6f4e6c6b05301a915e3c561da9e18b Author: vanhofen Date: 2015-12-28 (Mon, 28 Dec 2015) Origin message was: ------------------ - add menu item to force usertitles for color buttons in infobar --- data/locale/deutsch.locale | 2 ++ data/locale/english.locale | 2 ++ src/gui/osd_setup.cpp | 5 +++++ src/neutrino.cpp | 2 ++ src/system/locals.h | 2 ++ src/system/locals_intern.h | 2 ++ src/system/settings.h | 1 + 7 files changed, 16 insertions(+) diff --git a/data/locale/deutsch.locale b/data/locale/deutsch.locale index 9a536e1a7..4eb12d295 100644 --- a/data/locale/deutsch.locale +++ b/data/locale/deutsch.locale @@ -1047,6 +1047,7 @@ menu.hint_inactive_textcolor Ändern Sie die Textfarbe für deaktivierte Fenster menu.hint_inet_radio Internetradio menu.hint_info Informationen über das Image, CPU, Arbeitsspeicher und Stream und mehr menu.hint_infobar_back Ändern Sie die Hintergrundfarbe für die Infobar +menu.hint_infobar_buttons_usertitle Erzwingt die benutzerdefinierten Titel der Farbtasten menu.hint_infobar_casys ein: zeigt alle Aktiven farbig, Mini: einzelnes Symbol ob gesperrt, Diskret: alle Aktiven CA-Systeme menu.hint_infobar_casys_color Ändern Sie die Hintergrundfarbe für die CA-Systemanzeige der Infobar menu.hint_infobar_casys_dotmatrix ein: CA-Systemanzeige mit Punktematrix im Hintergrund @@ -1477,6 +1478,7 @@ miscsettings.epg_scan_standby Im Standby Modus miscsettings.general Allgemein miscsettings.head Erweitert miscsettings.infobar Infobar +miscsettings.infobar_buttons_usertitle Benutzertitel für Farbtasten miscsettings.infobar_casystem_display CA-Systemanzeige miscsettings.infobar_casystem_dotmatrix CA-Anzeige mit Punktematrix miscsettings.infobar_casystem_frame CA-Anzeige mit Rahmen diff --git a/data/locale/english.locale b/data/locale/english.locale index 7be0dd633..2debf79f3 100644 --- a/data/locale/english.locale +++ b/data/locale/english.locale @@ -1047,6 +1047,7 @@ menu.hint_inactive_textcolor Change inactive item text color menu.hint_inet_radio Internet radio menu.hint_info Information about image, box cpu and storage,\nstream information menu.hint_infobar_back Change infobar background color +menu.hint_infobar_buttons_usertitle Forces userdefined titles for the color keys menu.hint_infobar_casys On: display all with colored active, mini: single\nlocked icon, descreet: all active ca-systems menu.hint_infobar_casys_color Change CA-System background color menu.hint_infobar_casys_dotmatrix on: CA-System with dot matrix in background @@ -1477,6 +1478,7 @@ miscsettings.epg_scan_standby Standby miscsettings.general General miscsettings.head Extended settings miscsettings.infobar Infobar +miscsettings.infobar_buttons_usertitle Usertitles for color keys miscsettings.infobar_casystem_display CA-System display miscsettings.infobar_casystem_dotmatrix CA display with dot matrix miscsettings.infobar_casystem_frame CA display with frame diff --git a/src/gui/osd_setup.cpp b/src/gui/osd_setup.cpp index 1cf348fc4..f60ac1869 100644 --- a/src/gui/osd_setup.cpp +++ b/src/gui/osd_setup.cpp @@ -1045,6 +1045,11 @@ void COsdSetup::showOsdInfobarSetup(CMenuWidget *menu_infobar) mc->setHint("", LOCALE_MENU_HINT_INFOBAR_RADIOTEXT); menu_infobar->addItem(mc); + // buttons usertitle + mc = new CMenuOptionChooser(LOCALE_MISCSETTINGS_INFOBAR_BUTTONS_USERTITLE, &g_settings.infobar_buttons_usertitle, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true, this); + mc->setHint("", LOCALE_MENU_HINT_INFOBAR_BUTTONS_USERTITLE); + menu_infobar->addItem(mc); + menu_infobar->addItem(GenericMenuSeparator); // display options diff --git a/src/neutrino.cpp b/src/neutrino.cpp index 385a36a70..32d574354 100644 --- a/src/neutrino.cpp +++ b/src/neutrino.cpp @@ -464,6 +464,7 @@ int CNeutrinoApp::loadSetup(const char * fname) g_settings.infobar_sat_display = configfile.getBool("infobar_sat_display" , true ); g_settings.infobar_show_channeldesc = configfile.getBool("infobar_show_channeldesc" , false ); g_settings.infobar_subchan_disp_pos = configfile.getInt32("infobar_subchan_disp_pos" , 0 ); + g_settings.infobar_buttons_usertitle = configfile.getBool("infobar_buttons_usertitle", false ); g_settings.progressbar_gradient = configfile.getBool("progressbar_gradient", true ); g_settings.progressbar_design = configfile.getInt32("progressbar_design", CProgressBar::PB_COLOR); bool pb_color = configfile.getBool("progressbar_color", true ); @@ -1011,6 +1012,7 @@ void CNeutrinoApp::saveSetup(const char * fname) configfile.setBool("infobar_sat_display" , g_settings.infobar_sat_display ); configfile.setBool("infobar_show_channeldesc" , g_settings.infobar_show_channeldesc ); configfile.setInt32("infobar_subchan_disp_pos" , g_settings.infobar_subchan_disp_pos ); + configfile.setBool("infobar_buttons_usertitle", g_settings.infobar_buttons_usertitle); configfile.setBool("progressbar_gradient", g_settings.progressbar_gradient); configfile.setInt32("progressbar_design", g_settings.progressbar_design); configfile.setInt32("progressbar_timescale_red", g_settings.progressbar_timescale_red); diff --git a/src/system/locals.h b/src/system/locals.h index f71be0215..1323053fa 100644 --- a/src/system/locals.h +++ b/src/system/locals.h @@ -1074,6 +1074,7 @@ typedef enum LOCALE_MENU_HINT_INET_RADIO, LOCALE_MENU_HINT_INFO, LOCALE_MENU_HINT_INFOBAR_BACK, + LOCALE_MENU_HINT_INFOBAR_BUTTONS_USERTITLE, LOCALE_MENU_HINT_INFOBAR_CASYS, LOCALE_MENU_HINT_INFOBAR_CASYS_COLOR, LOCALE_MENU_HINT_INFOBAR_CASYS_DOTMATRIX, @@ -1504,6 +1505,7 @@ typedef enum LOCALE_MISCSETTINGS_GENERAL, LOCALE_MISCSETTINGS_HEAD, LOCALE_MISCSETTINGS_INFOBAR, + LOCALE_MISCSETTINGS_INFOBAR_BUTTONS_USERTITLE, LOCALE_MISCSETTINGS_INFOBAR_CASYSTEM_DISPLAY, LOCALE_MISCSETTINGS_INFOBAR_CASYSTEM_DOTMATRIX, LOCALE_MISCSETTINGS_INFOBAR_CASYSTEM_FRAME, diff --git a/src/system/locals_intern.h b/src/system/locals_intern.h index 14f7c9b09..4a7a86c5b 100644 --- a/src/system/locals_intern.h +++ b/src/system/locals_intern.h @@ -1074,6 +1074,7 @@ const char * locale_real_names[] = "menu.hint_inet_radio", "menu.hint_info", "menu.hint_infobar_back", + "menu.hint_infobar_buttons_usertitle", "menu.hint_infobar_casys", "menu.hint_infobar_casys_color", "menu.hint_infobar_casys_dotmatrix", @@ -1504,6 +1505,7 @@ const char * locale_real_names[] = "miscsettings.general", "miscsettings.head", "miscsettings.infobar", + "miscsettings.infobar_buttons_usertitle", "miscsettings.infobar_casystem_display", "miscsettings.infobar_casystem_dotmatrix", "miscsettings.infobar_casystem_frame", diff --git a/src/system/settings.h b/src/system/settings.h index c07a7428a..df64721d2 100644 --- a/src/system/settings.h +++ b/src/system/settings.h @@ -169,6 +169,7 @@ struct SNeutrinoSettings int infobar_sat_display; int infobar_show_channeldesc; int infobar_subchan_disp_pos; + int infobar_buttons_usertitle; int fan_speed; int infobar_show; int infobar_show_channellogo; From 81360714182e14623e6e531b5fcb79c9843e5b85 Mon Sep 17 00:00:00 2001 From: vanhofen Date: Tue, 29 Dec 2015 13:02:16 +0100 Subject: [PATCH 17/38] infoviewer_bb: use new infobar_buttons_usertitle key Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/974480fc4f93512641269a2fc3de869833685086 Author: vanhofen Date: 2015-12-29 (Tue, 29 Dec 2015) Origin message was: ------------------ - infoviewer_bb: use new infobar_buttons_usertitle key --- src/gui/infoviewer_bb.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/gui/infoviewer_bb.cpp b/src/gui/infoviewer_bb.cpp index 52ae55426..691665b6d 100644 --- a/src/gui/infoviewer_bb.cpp +++ b/src/gui/infoviewer_bb.cpp @@ -226,7 +226,7 @@ void CInfoViewerBB::getBBButtonInfo() if (!text.empty()) break; } - text = CUserMenu::getUserMenuButtonName(0, active); + text = CUserMenu::getUserMenuButtonName(0, active, g_settings.infobar_buttons_usertitle); if (!text.empty()) break; text = g_settings.usermenu[SNeutrinoSettings::BUTTON_RED]->title; @@ -241,7 +241,7 @@ void CInfoViewerBB::getBBButtonInfo() if (!text.empty()) break; } - text = CUserMenu::getUserMenuButtonName(1, active); + text = CUserMenu::getUserMenuButtonName(1, active, g_settings.infobar_buttons_usertitle); if (!text.empty()) break; text = g_settings.usermenu[SNeutrinoSettings::BUTTON_GREEN]->title; @@ -256,7 +256,7 @@ void CInfoViewerBB::getBBButtonInfo() if (!text.empty()) break; } - text = CUserMenu::getUserMenuButtonName(2, active); + text = CUserMenu::getUserMenuButtonName(2, active, g_settings.infobar_buttons_usertitle); if (!text.empty()) break; text = g_settings.usermenu[SNeutrinoSettings::BUTTON_YELLOW]->title; @@ -271,7 +271,7 @@ void CInfoViewerBB::getBBButtonInfo() if (!text.empty()) break; } - text = CUserMenu::getUserMenuButtonName(3, active); + text = CUserMenu::getUserMenuButtonName(3, active, g_settings.infobar_buttons_usertitle); if (!text.empty()) break; text = g_settings.usermenu[SNeutrinoSettings::BUTTON_BLUE]->title; @@ -284,7 +284,7 @@ void CInfoViewerBB::getBBButtonInfo() { if (!CMoviePlayerGui::getInstance().timeshift) { - if (text == g_Locale->getText(LOCALE_MPKEY_AUDIO)) + if (text == g_Locale->getText(LOCALE_MPKEY_AUDIO) && !g_settings.infobar_buttons_usertitle) { text = CMoviePlayerGui::getInstance(mode == NeutrinoMessages::mode_webtv).CurrentAudioName(); } From 9926ef86265e0f383edd843e8ce7010cbd4caa22 Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Tue, 29 Dec 2015 14:52:39 +0100 Subject: [PATCH 18/38] COPKGManager: don't init if no opkg support available This avoids creating of any basic configuration files or directories on non opkg supported firmware releases. Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/bea8f5e980f875e399b243a56b2d645fad2f67d8 Author: Thilo Graf Date: 2015-12-29 (Tue, 29 Dec 2015) --- src/gui/opkg_manager.cpp | 8 ++++++++ src/gui/opkg_manager.h | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/gui/opkg_manager.cpp b/src/gui/opkg_manager.cpp index 1b925818d..dd04a9e7a 100644 --- a/src/gui/opkg_manager.cpp +++ b/src/gui/opkg_manager.cpp @@ -105,6 +105,14 @@ static const string pkg_types[OM_MAX] = COPKGManager::COPKGManager(): opkg_conf('\t') { + init(); +} + +void COPKGManager::init() +{ + if (!hasOpkgSupport()) + return; + OM_ERRORS(); width = 80; diff --git a/src/gui/opkg_manager.h b/src/gui/opkg_manager.h index 4979c9c9b..78cebaa49 100644 --- a/src/gui/opkg_manager.h +++ b/src/gui/opkg_manager.h @@ -51,7 +51,7 @@ class COPKGManager : public CMenuTarget void saveConfig(); void loadConfig(); struct pkg; - + void init(); //config std::string config_src[OPKG_MAX_FEEDS]; std::vector config_dest; From 9401f2e8d18fadbf870843c1a3275d3c80d766d5 Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Tue, 29 Dec 2015 15:56:27 +0100 Subject: [PATCH 19/38] COsdSetup: kill instance of osd_menu_colors Suggested, by svenhoefer Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/14124c7dd6dcc7274560658842ac95912d42b06e Author: Thilo Graf Date: 2015-12-29 (Tue, 29 Dec 2015) --- src/gui/osd_setup.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/gui/osd_setup.cpp b/src/gui/osd_setup.cpp index f60ac1869..94f878488 100644 --- a/src/gui/osd_setup.cpp +++ b/src/gui/osd_setup.cpp @@ -514,10 +514,11 @@ int COsdSetup::showOsdSetup() osd_menu->addIntroItems(LOCALE_MAINSETTINGS_OSD); //item menu colors - if (osd_menu_colors == NULL){ - osd_menu_colors = new CMenuWidget(LOCALE_MAINMENU_SETTINGS, NEUTRINO_ICON_COLORS, width, MN_WIDGET_ID_OSDSETUP_MENUCOLORS); - showOsdMenueColorSetup(osd_menu_colors); - } + if (osd_menu_colors) + delete osd_menu_colors; + osd_menu_colors = new CMenuWidget(LOCALE_MAINMENU_SETTINGS, NEUTRINO_ICON_COLORS, width, MN_WIDGET_ID_OSDSETUP_MENUCOLORS); + showOsdMenueColorSetup(osd_menu_colors); + CMenuForwarder * mf = new CMenuForwarder(LOCALE_COLORMENU_MENUCOLORS, true, NULL, osd_menu_colors, NULL, CRCInput::RC_red); mf->setHint("", LOCALE_MENU_HINT_COLORS); osd_menu->addItem(mf); From 1fb4e04e2735cab20f475ccb715f11221057ff1d Mon Sep 17 00:00:00 2001 From: Jacek Jendrzej Date: Tue, 29 Dec 2015 17:58:31 +0100 Subject: [PATCH 20/38] fix possible segafult, invalid type Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/946d64fc37da5c28acd24805ae04753401225961 Author: Jacek Jendrzej Date: 2015-12-29 (Tue, 29 Dec 2015) --- src/gui/timeosd.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/gui/timeosd.cpp b/src/gui/timeosd.cpp index 621eef062..5660a483a 100644 --- a/src/gui/timeosd.cpp +++ b/src/gui/timeosd.cpp @@ -44,6 +44,7 @@ CTimeOSD::CTimeOSD():CComponentsFrmClock( 1, 1, NULL, "%H:%M:%S", NULL, false, 1 void CTimeOSD::Init() { paint_bg = g_settings.infoClockBackground; + m_time_show = time(0); //use current theme colors setColorAll(COL_MENUCONTENT_PLUS_6, COL_MENUCONTENT_PLUS_0, COL_MENUCONTENTDARK_PLUS_0); From bccc45e33c34f2e4d090492ce9251347b75c4379 Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Tue, 29 Dec 2015 23:56:49 +0100 Subject: [PATCH 21/38] CCDraw: add parameter force_paint to member enableShadow() TODO executed Default behavior is not changed but parameter allows repaint shadow in some constellations if required. Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/ad6940fd8510c67c231bf6461e062f4512c1d815 Author: Thilo Graf Date: 2015-12-29 (Tue, 29 Dec 2015) --- src/gui/components/cc_draw.cpp | 6 ++++-- src/gui/components/cc_draw.h | 9 +++++++-- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/src/gui/components/cc_draw.cpp b/src/gui/components/cc_draw.cpp index f5c283c72..8433253a7 100644 --- a/src/gui/components/cc_draw.cpp +++ b/src/gui/components/cc_draw.cpp @@ -50,6 +50,7 @@ CCDraw::CCDraw() : COSDFader(g_settings.theme.menu_Content_alpha) shadow = CC_SHADOW_OFF; shadow_w = shadow_w_old = SHADOW_OFFSET; + shadow_force = false; cc_paint_cache = false; cc_scrdata.pixbuf = NULL; @@ -543,7 +544,7 @@ void CCDraw::paintFbItems(bool do_save_bg) frameBuffer->paintBackgroundBoxRel(x, y, fbdata.dx, fbdata.dy); } } - if (fbtype == CC_FBDATA_TYPE_SHADOW_BOX && !is_painted) { //TODO: is_painted is too global here, shadow will not paint on current instance without called kill/hide + if (fbtype == CC_FBDATA_TYPE_SHADOW_BOX && (!is_painted || shadow_force)) { if (fbdata.enabled) { /* here we paint the shadow around the body * on 1st step we check for already cached screen buffer, if true @@ -688,12 +689,13 @@ bool CCDraw::doPaintBg(bool do_paint) return true; } -void CCDraw::enableShadow(int mode, const int& shadow_width) +void CCDraw::enableShadow(int mode, const int& shadow_width, bool force_paint) { if (shadow != mode) shadow = mode; if (shadow != CC_SHADOW_OFF) if (shadow_width != -1) setShadowWidth(shadow_width); + shadow_force = force_paint; } diff --git a/src/gui/components/cc_draw.h b/src/gui/components/cc_draw.h index 1381b0f31..152a6359b 100644 --- a/src/gui/components/cc_draw.h +++ b/src/gui/components/cc_draw.h @@ -84,6 +84,8 @@ class CCDraw : public COSDFader, public CComponentsSignals int shadow; ///property: width of shadow int shadow_w, shadow_w_old; + ///property: force shadow paint, see enableShadow() + bool shadow_force; ///returns true if internal property was changed virtual bool hasChanges(); @@ -245,8 +247,11 @@ class CCDraw : public COSDFader, public CComponentsSignals ///switch shadow on/off virtual void setShadowWidth(const int& shadow_width){if (shadow_w != shadow_width) shadow_w = shadow_width;} - ///Note: it's recommended to use #defines: CC_SHADOW_ON=true or CC_SHADOW_OFF=false as parameter, see also cc_types.h - virtual void enableShadow(int mode = CC_SHADOW_ON, const int& shadow_width = -1); + /**1st parameter requires defines CC_SHADOW_ON (default), CC_SHADOW_OFF, CC_SHADOW_BOTTOM or CC_SHADOW_RIGHT, see also cc_types.h + * 2nd parameter defines shadow width, default = defined by system + * 3rd parameter forces paint of shadow layer, default = false, Note: default shadow will paint only on first paint, use 3rd parameter=true ignores this + */ + virtual void enableShadow(int mode = CC_SHADOW_ON, const int& shadow_width = -1, bool force_paint = false); ///switch shadow off virtual void disableShadow(){enableShadow(CC_SHADOW_OFF);} From 1d61ab6fad0d75e1f688b922238cbca0aa5e976a Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Tue, 29 Dec 2015 23:23:45 +0100 Subject: [PATCH 22/38] CInfoViewer: refine arrangement of epg title this reduces some flicker or fade effects nearly of numberbox Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/c15731e6e79dcd4bf3a6f4f01ad87b5d2f41d8e5 Author: Thilo Graf Date: 2015-12-29 (Tue, 29 Dec 2015) --- src/gui/infoviewer.cpp | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/gui/infoviewer.cpp b/src/gui/infoviewer.cpp index c56d34cd4..cdcf3a356 100644 --- a/src/gui/infoviewer.cpp +++ b/src/gui/infoviewer.cpp @@ -400,9 +400,10 @@ void CInfoViewer::paintBackground(int col_NumBox) paintBody(); // number box - if (numbox == NULL) //TODO: move into an own member, paintNumBox() or so... - numbox = new CComponentsShapeSquare(BoxStartX, BoxStartY, ChanWidth, ChanHeight, NULL, CC_SHADOW_ON); - else + if (numbox == NULL){ //TODO: move into an own member, paintNumBox() or so... + numbox = new CComponentsShapeSquare(BoxStartX, BoxStartY, ChanWidth, ChanHeight); + numbox->enableShadow(CC_SHADOW_ON, 6, true); + }else numbox->setDimensionsAll(BoxStartX, BoxStartY, ChanWidth, ChanHeight); numbox->setColorBody(g_settings.theme.infobar_gradient_top ? COL_MENUHEAD_PLUS_0 : col_NumBox); @@ -413,11 +414,13 @@ void CInfoViewer::paintBackground(int col_NumBox) void CInfoViewer::paintHead() { + int head_x = BoxStartX+ChanWidth+5; + int head_w = BoxEndX-head_x; if (header == NULL){ - header = new CComponentsShapeSquare(ChanInfoX, ChanNameY, BoxEndX-ChanInfoX, time_height, NULL, CC_SHADOW_RIGHT); + header = new CComponentsShapeSquare(head_x, ChanNameY, head_w, time_height, NULL, CC_SHADOW_RIGHT); header->setCorner(RADIUS_LARGE, CORNER_TOP_RIGHT); }else - header->setDimensionsAll(ChanInfoX, ChanNameY, BoxEndX-ChanInfoX, time_height); + header->setDimensionsAll(head_x, ChanNameY, head_w, time_height); header->setColorBody(g_settings.theme.infobar_gradient_top ? COL_MENUHEAD_PLUS_0 : COL_INFOBAR_PLUS_0); header->enableColBodyGradient(g_settings.theme.infobar_gradient_top, COL_INFOBAR_PLUS_0, g_settings.theme.infobar_gradient_top_direction); From 018fb72949f7098c023b889944e9f6808c6717bd Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Wed, 30 Dec 2015 01:57:34 +0100 Subject: [PATCH 23/38] CInfoViewer: try to fix paint info text box after delayed painting of timescale Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/5d6e33ac9da93a1b3073932945318e3237f90e0c Author: Thilo Graf Date: 2015-12-30 (Wed, 30 Dec 2015) --- src/gui/infoviewer.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/gui/infoviewer.cpp b/src/gui/infoviewer.cpp index cdcf3a356..ec8573445 100644 --- a/src/gui/infoviewer.cpp +++ b/src/gui/infoviewer.cpp @@ -1932,6 +1932,10 @@ void CInfoViewer::showInfoFile() return; } + //check dimension, if changed then kill to force reinit + if (infobar_txt->getWidth() != width) + infobar_txt->kill(); + //set some properties for info object infobar_txt->setDimensionsAll(xStart, yStart, width, height); infobar_txt->setCorner(RADIUS_SMALL); From b82892a27f44d85acbdfd687e6502266faf6140f Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Wed, 30 Dec 2015 13:07:41 +0100 Subject: [PATCH 24/38] CInfoViewerBB: fix missing parameter Shadow was lost after repaint Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/f5fba42118ac5a7d38941c387b7b4a00a2818031 Author: Thilo Graf Date: 2015-12-30 (Wed, 30 Dec 2015) --- src/gui/infoviewer_bb.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/infoviewer_bb.cpp b/src/gui/infoviewer_bb.cpp index 691665b6d..33d1f669a 100644 --- a/src/gui/infoviewer_bb.cpp +++ b/src/gui/infoviewer_bb.cpp @@ -876,7 +876,7 @@ void CInfoViewerBB::paintCA_bar(int left, int right) if (cabar == NULL) cabar = new CComponentsShapeSquare(g_InfoViewer->ChanInfoX+11, g_InfoViewer->BoxEndY+1, ca_width-22 , bottom_bar_offset-11 , NULL, CC_SHADOW_ON, COL_INFOBAR_CASYSTEM_PLUS_2, COL_INFOBAR_CASYSTEM_PLUS_0); //cabar->setCorner(RADIUS_SMALL, CORNER_ALL); - cabar->enableShadow(CC_SHADOW_ON, 3); + cabar->enableShadow(CC_SHADOW_ON, 3, true); cabar->setFrameThickness(2); // cabar->paint(CC_SAVE_SCREEN_NO); From f484af573e34f6a5a694e95d34769ffa4269ee72 Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Wed, 30 Dec 2015 16:56:45 +0100 Subject: [PATCH 25/38] signalbars: add missing parameters for signal type names Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/06686334bf3a97aaf62d12970fb0e211e2e791ab Author: Thilo Graf Date: 2015-12-30 (Wed, 30 Dec 2015) --- src/gui/components/cc_frm_signalbars.cpp | 6 +++--- src/gui/components/cc_frm_signalbars.h | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/gui/components/cc_frm_signalbars.cpp b/src/gui/components/cc_frm_signalbars.cpp index d361216ac..0b5d0e0d6 100644 --- a/src/gui/components/cc_frm_signalbars.cpp +++ b/src/gui/components/cc_frm_signalbars.cpp @@ -252,7 +252,7 @@ void CSignalNoiseRatioBar::Refresh() //********************************************************************************************************************** -CSignalBox::CSignalBox(const int& xpos, const int& ypos, const int& w, const int& h, CFrontend *frontend_ref, const bool vert, CComponentsForm *parent) +CSignalBox::CSignalBox(const int& xpos, const int& ypos, const int& w, const int& h, CFrontend *frontend_ref, const bool vert, CComponentsForm *parent, const std::string& sig_name, const std::string& snr_name) { initVarSigBox(); vertical = vert; @@ -271,11 +271,11 @@ CSignalBox::CSignalBox(const int& xpos, const int& ypos, const int& w, const int sbx_bar_width = width/2-2*corner_rad; } - sbar = new CSignalBar(sbx_bar_x, 0, sbx_bar_width, sbx_bar_height, sbx_frontend); + sbar = new CSignalBar(sbx_bar_x, 0, sbx_bar_width, sbx_bar_height, sbx_frontend, sig_name); sbar->doPaintBg(false); addCCItem(sbar); - snrbar = new CSignalNoiseRatioBar(vertical ? sbx_bar_x : CC_APPEND, vertical ? CC_APPEND : 0, sbx_bar_width, sbx_bar_height, sbx_frontend); + snrbar = new CSignalNoiseRatioBar(vertical ? sbx_bar_x : CC_APPEND, vertical ? CC_APPEND : 0, sbx_bar_width, sbx_bar_height, sbx_frontend, snr_name); snrbar->doPaintBg(false); addCCItem(snrbar); diff --git a/src/gui/components/cc_frm_signalbars.h b/src/gui/components/cc_frm_signalbars.h index a5cb7dcd9..e78de5353 100644 --- a/src/gui/components/cc_frm_signalbars.h +++ b/src/gui/components/cc_frm_signalbars.h @@ -160,8 +160,8 @@ class CSignalNoiseRatioBar : public CSignalBar CSignalNoiseRatioBar(CComponentsForm *parent = NULL) : CSignalBar(parent){}; ///basic component class constructor for signal noise ratio. - CSignalNoiseRatioBar(const int& xpos, const int& ypos, const int& w, const int& h, CFrontend *frontend_ref, CComponentsForm *parent = NULL) - : CSignalBar(xpos, ypos, w, h, frontend_ref, "SNR", parent){}; + CSignalNoiseRatioBar(const int& xpos, const int& ypos, const int& w, const int& h, CFrontend *frontend_ref, const std::string& snr_name = "SNR", CComponentsForm *parent = NULL) + : CSignalBar(xpos, ypos, w, h, frontend_ref, snr_name, parent){}; }; /// Class CSignalBox() provides CSignalBar(), CSignalNoiseRatioBar() scales at once. @@ -269,7 +269,7 @@ class CSignalBox : public CComponentsForm public: ///class constructor for signal noise ratio. - CSignalBox(const int& xpos, const int& ypos, const int& w, const int& h, CFrontend *frontend_ref = NULL, const bool vertical = true, CComponentsForm *parent = NULL); + CSignalBox(const int& xpos, const int& ypos, const int& w, const int& h, CFrontend *frontend_ref = NULL, const bool vertical = true, CComponentsForm *parent = NULL, const std::string& sig_name = "SIG", const std::string& snr_name = "SNR" ); ///returns the signal object, type = CSignalBar* CSignalBar* getScaleObject(){return sbar;}; From ba06d1907d8008888345a983533dbe381944c7a1 Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Wed, 30 Dec 2015 16:57:32 +0100 Subject: [PATCH 26/38] CInfoViewer: use old names for signal type names Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/a1ae17abb34aecfb1f0e70c224d2711bcfc4d534 Author: Thilo Graf Date: 2015-12-30 (Wed, 30 Dec 2015) --- src/gui/infoviewer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/infoviewer.cpp b/src/gui/infoviewer.cpp index ec8573445..536e080a6 100644 --- a/src/gui/infoviewer.cpp +++ b/src/gui/infoviewer.cpp @@ -1503,7 +1503,7 @@ void CInfoViewer::showSNR () SDT_freq_update = false; } if (sigbox == NULL){ - sigbox = new CSignalBox(BoxStartX+4, BoxStartY+ChanHeight/2-4, ChanWidth-8, ChanHeight/2+2, CFEManager::getInstance()->getLiveFE()); + sigbox = new CSignalBox(BoxStartX+8, BoxStartY+ChanHeight/2-4, ChanWidth-12, ChanHeight/2+2, CFEManager::getInstance()->getLiveFE(), true, NULL, "S", "Q"); sigbox->setTextColor(COL_INFOBAR_TEXT); sigbox->doPaintBg(false); } From c88c4ac340190ed3b4306c2c02524ddf2ec73399 Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Wed, 30 Dec 2015 17:31:42 +0100 Subject: [PATCH 27/38] CSignalBar: unified reference percent text length Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/4dfb2a75aebcfc82853d5c848d195de3c671ac95 Author: Thilo Graf Date: 2015-12-30 (Wed, 30 Dec 2015) --- src/gui/components/cc_frm_signalbars.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/gui/components/cc_frm_signalbars.cpp b/src/gui/components/cc_frm_signalbars.cpp index 0b5d0e0d6..386037b62 100644 --- a/src/gui/components/cc_frm_signalbars.cpp +++ b/src/gui/components/cc_frm_signalbars.cpp @@ -34,6 +34,7 @@ #include #define SB_MIN_HEIGHT 12 +#define REF_PERCENT_TXT "00% " using namespace std; @@ -72,11 +73,12 @@ void CSignalBar::initDimensions() int dx = 0; int dy = min(sb_item_height, 100); - sb_font = *dy_font->getDynFont(dx, dy, "100% "+sb_name); + + sb_font = *dy_font->getDynFont(dx, dy, REF_PERCENT_TXT + sb_name); dx += dx/10; sb_scale_width = width - dx; - sb_vlbl_width = sb_font->getRenderWidth("100% ") + dx/20; + sb_vlbl_width = sb_font->getRenderWidth(REF_PERCENT_TXT) + dx/20; sb_lbl_width = dx - sb_vlbl_width; } @@ -145,7 +147,7 @@ void CSignalBar::initSBarValue() sb_vlbl->doPaintBg(false); sb_vlbl->doPaintTextBoxBg(false); sb_vlbl->enableTboxSaveScreen(true); - sb_vlbl->setText(" 0%", sb_val_mode, sb_font); + sb_vlbl->setText(REF_PERCENT_TXT, sb_val_mode, sb_font); } //move and set dimensions From 91e598174e63cd80c560d845c8adc8fa5ccbfcba Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Wed, 30 Dec 2015 22:22:44 +0100 Subject: [PATCH 28/38] CSignalBar: try to fix position and height of scale bars Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/648e01f401c459e5da990195b635013f4656b143 Author: Thilo Graf Date: 2015-12-30 (Wed, 30 Dec 2015) --- src/gui/components/cc_frm_signalbars.cpp | 25 +++++++++--------------- 1 file changed, 9 insertions(+), 16 deletions(-) diff --git a/src/gui/components/cc_frm_signalbars.cpp b/src/gui/components/cc_frm_signalbars.cpp index 386037b62..e961d98cd 100644 --- a/src/gui/components/cc_frm_signalbars.cpp +++ b/src/gui/components/cc_frm_signalbars.cpp @@ -153,8 +153,7 @@ void CSignalBar::initSBarValue() //move and set dimensions int vlbl_x = sb_scale->getXPos() + sb_scale_width + append_y_offset; int vlbl_h = sb_scale->getHeight(); - int vlbl_y = sb_item_height/2 + sb_item_top - vlbl_h/2 - append_x_offset; - sb_vlbl->setDimensionsAll(vlbl_x, vlbl_y, sb_vlbl_width - append_x_offset, vlbl_h); + sb_vlbl->setDimensionsAll(vlbl_x, 1, sb_vlbl_width - append_x_offset, vlbl_h); //set current text and body color color sb_vlbl->setTextColor(sb_caption_color); @@ -179,8 +178,7 @@ void CSignalBar::initSBarName() //move and set dimensions int lbl_x = sb_vlbl->getXPos()+ sb_vlbl->getWidth(); int lbl_h = sb_vlbl->getHeight(); - int lbl_y = sb_item_height/2 + sb_item_top - lbl_h/2 - append_x_offset; - sb_lbl->setDimensionsAll(lbl_x, lbl_y, sb_lbl_width- append_x_offset, lbl_h); + sb_lbl->setDimensionsAll(lbl_x, 1, sb_lbl_width- append_x_offset, lbl_h); //set current text and body color sb_lbl->setTextColor(sb_caption_color); @@ -273,11 +271,11 @@ CSignalBox::CSignalBox(const int& xpos, const int& ypos, const int& w, const int sbx_bar_width = width/2-2*corner_rad; } - sbar = new CSignalBar(sbx_bar_x, 0, sbx_bar_width, sbx_bar_height, sbx_frontend, sig_name); + sbar = new CSignalBar(sbx_bar_x, 1, sbx_bar_width, sbx_bar_height, sbx_frontend, sig_name); sbar->doPaintBg(false); addCCItem(sbar); - snrbar = new CSignalNoiseRatioBar(vertical ? sbx_bar_x : CC_APPEND, vertical ? CC_APPEND : 0, sbx_bar_width, sbx_bar_height, sbx_frontend, snr_name); + snrbar = new CSignalNoiseRatioBar(vertical ? sbx_bar_x : CC_APPEND, vertical ? CC_APPEND : 1, sbx_bar_width, sbx_bar_height, sbx_frontend, snr_name); snrbar->doPaintBg(false); addCCItem(snrbar); @@ -302,15 +300,10 @@ void CSignalBox::initVarSigBox() void CSignalBox::initSignalItems() { //set current properties for items -// int cor_rad = corner_rad/2-fr_thickness; - -// int corr_y = sbx_bar_height%2; -// int sb_h = sbx_bar_height - corr_y; - - int sbar_h = sbx_bar_height - fr_thickness - append_y_offset/2; - int sbar_w = sbx_bar_width - 2*fr_thickness; + int sbar_h = sbx_bar_height - 2*fr_thickness - 2*append_y_offset; + int sbar_w = sbx_bar_width - 2*fr_thickness - 2*append_x_offset; int sbar_x = sbx_bar_x + fr_thickness; - int scale_h = sbar_h * 76 / 100; + int scale_h = sbar_h * 64 / 100; int sbar_sw = sbar->getScaleWidth(); int snrbar_sw = snrbar->getScaleWidth(); @@ -319,12 +312,12 @@ void CSignalBox::initSignalItems() else if (snrbar_sw < sbar_sw) sbar->setScaleWidth(snrbar_sw); - sbar->setDimensionsAll(sbar_x, fr_thickness, sbar_w, sbar_h); + sbar->setDimensionsAll(sbar_x, 1, sbar_w, sbar_h); sbar->setFrontEnd(sbx_frontend); sbar->setCorner(0); sbar->setScaleHeight(scale_h); - snrbar->setDimensionsAll(vertical ? sbar_x : CC_APPEND, vertical ? CC_APPEND : fr_thickness, sbar_w, sbar_h); + snrbar->setDimensionsAll(vertical ? sbar_x : CC_APPEND, vertical ? CC_APPEND : 1, sbar_w, sbar_h); snrbar->setFrontEnd(sbx_frontend); snrbar->setCorner(0); snrbar->setScaleHeight(scale_h); From 70ea30e3e4e7aedfc119de0e14e586b735365d4c Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Wed, 30 Dec 2015 22:23:24 +0100 Subject: [PATCH 29/38] CInfoViewer: optimize signal bar arrangement Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/3acd04e8652389dc4b53bbee29b5e1e558a29177 Author: Thilo Graf Date: 2015-12-30 (Wed, 30 Dec 2015) --- src/gui/infoviewer.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/gui/infoviewer.cpp b/src/gui/infoviewer.cpp index 536e080a6..00642447e 100644 --- a/src/gui/infoviewer.cpp +++ b/src/gui/infoviewer.cpp @@ -1503,7 +1503,8 @@ void CInfoViewer::showSNR () SDT_freq_update = false; } if (sigbox == NULL){ - sigbox = new CSignalBox(BoxStartX+8, BoxStartY+ChanHeight/2-4, ChanWidth-12, ChanHeight/2+2, CFEManager::getInstance()->getLiveFE(), true, NULL, "S", "Q"); + int sb_x = ChanWidth *10/100; + sigbox = new CSignalBox(BoxStartX+sb_x, BoxStartY+ChanHeight/2, ChanWidth-2*sb_x, ChanHeight/2, CFEManager::getInstance()->getLiveFE(), true, NULL, "S", "Q"); sigbox->setTextColor(COL_INFOBAR_TEXT); sigbox->doPaintBg(false); } From bce1e79df2eac990693b83939799961d800337a1 Mon Sep 17 00:00:00 2001 From: Stefan Seyfried Date: Sun, 15 Nov 2015 11:43:18 +0100 Subject: [PATCH 30/38] acinclude: get rid of old nokia dvb API Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/9b337ee5305d10c7382747970f8e63e8bbf40a6c Author: Stefan Seyfried Date: 2015-11-15 (Sun, 15 Nov 2015) --- acinclude.m4 | 7 ------- 1 file changed, 7 deletions(-) diff --git a/acinclude.m4 b/acinclude.m4 index 04d9216e1..f8ffe9e7c 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -211,12 +211,6 @@ if test "$DVBINCLUDES"; then CXXFLAGS="-I$DVBINCLUDES $CXXFLAGS" fi -AC_CHECK_HEADERS(ost/dmx.h,[ - DVB_API_VERSION=1 - AC_MSG_NOTICE([found dvb version 1]) -]) - -if test -z "$DVB_API_VERSION"; then AC_CHECK_HEADERS(linux/dvb/version.h,[ AC_LANG_PREPROC_REQUIRE() AC_REQUIRE([AC_PROG_EGREP]) @@ -235,7 +229,6 @@ version DVB_API_VERSION_MINOR AC_MSG_NOTICE([found dvb version $DVB_API_VERSION.$DVB_API_VERSION_MINOR]) ]) -fi if test "$DVB_API_VERSION"; then AC_DEFINE(HAVE_DVB,1,[Define to 1 if you have the dvb includes]) From 57870348233bd96f2191e3705830f627322d3c3f Mon Sep 17 00:00:00 2001 From: Stefan Seyfried Date: Sun, 15 Nov 2015 11:45:12 +0100 Subject: [PATCH 31/38] acinclude: fix DVB_API_VERSION check for gcc5 Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/7f69a433adbe2fa1368f51ba715d360b511c43df Author: Stefan Seyfried Date: 2015-11-15 (Sun, 15 Nov 2015) --- acinclude.m4 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/acinclude.m4 b/acinclude.m4 index f8ffe9e7c..0e7958dfa 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -218,13 +218,13 @@ AC_CHECK_HEADERS(linux/dvb/version.h,[ #include version DVB_API_VERSION ]])]) - DVB_API_VERSION=`(eval "$ac_cpp conftest.$ac_ext") 2>&AS_MESSAGE_LOG_FD | $EGREP "^version" | sed "s,version\ ,,"` + DVB_API_VERSION=`(eval "$ac_cpp -traditional-cpp conftest.$ac_ext") 2>&AS_MESSAGE_LOG_FD | $EGREP "^version" | sed "s,version\ ,,"` AC_LANG_CONFTEST([AC_LANG_SOURCE([[ #include version DVB_API_VERSION_MINOR ]])]) - DVB_API_VERSION_MINOR=`(eval "$ac_cpp conftest.$ac_ext") 2>&AS_MESSAGE_LOG_FD | $EGREP "^version" | sed "s,version\ ,,"` + DVB_API_VERSION_MINOR=`(eval "$ac_cpp -traditional-cpp conftest.$ac_ext") 2>&AS_MESSAGE_LOG_FD | $EGREP "^version" | sed "s,version\ ,,"` rm -f conftest* AC_MSG_NOTICE([found dvb version $DVB_API_VERSION.$DVB_API_VERSION_MINOR]) From 4fad676f6d148eb81fde6281792d14fc6d7ac9e2 Mon Sep 17 00:00:00 2001 From: Stefan Seyfried Date: Sun, 13 Dec 2015 13:56:56 +0100 Subject: [PATCH 32/38] define LUA_COMPAT_5_2 to allow build with newer lua versions Signed-off-by: M. Liebmann Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/dbad3b069abf610272a19b99ce08bdf74b5c1b16 Author: Stefan Seyfried Date: 2015-12-13 (Sun, 13 Dec 2015) --- configure.ac | 2 ++ 1 file changed, 2 insertions(+) diff --git a/configure.ac b/configure.ac index 9a31c7511..01ce01d16 100644 --- a/configure.ac +++ b/configure.ac @@ -186,6 +186,8 @@ if test "$enable_lua" = "yes"; then AC_DEFINE(STATIC_LUAPOSIX,1,[Define to 1 for static lua build.]) ]) ]) +# hack... +AC_DEFINE(LUA_COMPAT_5_2,1,[does not really belong in config.h, but is needed for build with lua 5.3+]) fi AC_ARG_ENABLE(cleanup, From 27699ff590e8488724a90adaeab55e2f4f68be2b Mon Sep 17 00:00:00 2001 From: Stefan Seyfried Date: Sun, 13 Dec 2015 14:01:12 +0100 Subject: [PATCH 33/38] luainstance: fix build with newer GCC Signed-off-by: M. Liebmann Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/e85f64d7331b4903d2a0205740abaade5a8fd25b Author: Stefan Seyfried Date: 2015-12-13 (Sun, 13 Dec 2015) --- src/gui/lua/luainstance_helpers.cpp | 2 +- src/gui/lua/luainstance_helpers.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gui/lua/luainstance_helpers.cpp b/src/gui/lua/luainstance_helpers.cpp index 88277fdd7..0be6b3a50 100644 --- a/src/gui/lua/luainstance_helpers.cpp +++ b/src/gui/lua/luainstance_helpers.cpp @@ -84,7 +84,7 @@ void functionDeprecated(lua_State *L, const char* oldFunc, const char* newFunc) ar.short_src, ar.currentline); } -lua_Unsigned checkMagicMask(lua_Unsigned &col) +lua_Unsigned checkMagicMask(lua_Unsigned col) { if ((col & MAGIC_MASK) == MAGIC_COLOR) col = CFrameBuffer::getInstance()->realcolor[col & 0x000000ff]; diff --git a/src/gui/lua/luainstance_helpers.h b/src/gui/lua/luainstance_helpers.h index 99eaa8cce..6c636fd1d 100644 --- a/src/gui/lua/luainstance_helpers.h +++ b/src/gui/lua/luainstance_helpers.h @@ -85,7 +85,7 @@ bool _luaL_checkbool(lua_State *L, int numArg); void paramBoolDeprecated(lua_State *L, const char* val); void paramDeprecated(lua_State *L, const char* oldParam, const char* newParam); void functionDeprecated(lua_State *L, const char* oldFunc, const char* newFunc); -lua_Unsigned checkMagicMask(lua_Unsigned &col); +lua_Unsigned checkMagicMask(lua_Unsigned col); bool tableLookup(lua_State*, const char*, std::string&); bool tableLookup(lua_State*, const char*, lua_Integer&); From 901355e5b714b4e41c1f0d87516c4b9924d8357e Mon Sep 17 00:00:00 2001 From: Stefan Seyfried Date: Sun, 13 Dec 2015 18:45:02 +0100 Subject: [PATCH 34/38] luainstance: fix types to allow compilation with newer gcc Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/b62da2624eebd5e14cd5f160536b029c56256755 Author: Stefan Seyfried Date: 2015-12-13 (Sun, 13 Dec 2015) --- src/gui/lua/luainstance.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/gui/lua/luainstance.cpp b/src/gui/lua/luainstance.cpp index 4e53e40a7..1271db909 100644 --- a/src/gui/lua/luainstance.cpp +++ b/src/gui/lua/luainstance.cpp @@ -740,7 +740,7 @@ int CLuaInstance::PaintBox(lua_State *L) int count = lua_gettop(L); LUA_DEBUG("CLuaInstance::%s %d\n", __func__, count); int x, y, w, h, radius = 0, corner = CORNER_ALL; - unsigned int c; + lua_Unsigned c; CLuaData *W = CheckData(L, 1); if (!W || !W->fbwin) return 0; @@ -777,7 +777,7 @@ int CLuaInstance::PaintBox(lua_State *L) int CLuaInstance::paintHLineRel(lua_State *L) { int x, y, dx; - unsigned int c; + lua_Unsigned c; CLuaData *W = CheckData(L, 1); if (!W || !W->fbwin) return 0; @@ -805,7 +805,7 @@ int CLuaInstance::paintHLineRel(lua_State *L) int CLuaInstance::paintVLineRel(lua_State *L) { int x, y, dy; - unsigned int c; + lua_Unsigned c; CLuaData *W = CheckData(L, 1); if (!W || !W->fbwin) return 0; @@ -836,7 +836,7 @@ int CLuaInstance::RenderString(lua_State *L) { int x, y, w, boxh, center; Font* font = NULL; - unsigned int c; + lua_Unsigned c; const char *text; int numargs = lua_gettop(L); LUA_DEBUG("CLuaInstance::%s %d\n", __func__, numargs); @@ -1010,7 +1010,8 @@ int CLuaInstance::getDynFont(lua_State *L) return 2; } - lua_Integer dx = 0, dy = 0, style = CNeutrinoFonts::FONT_STYLE_REGULAR; + int dx = 0, dy = 0; + lua_Integer style = CNeutrinoFonts::FONT_STYLE_REGULAR; std::string text=""; dx = luaL_checkint(L, 2); From 88bd37ef2b0b2fa5ba4c53c42470745329576305 Mon Sep 17 00:00:00 2001 From: Stefan Seyfried Date: Sun, 13 Dec 2015 18:49:27 +0100 Subject: [PATCH 35/38] luainstance: remove unneeded hardware dependencies Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/85b03349e9cd2eeaf399134803f6f3cbca066f16 Author: Stefan Seyfried Date: 2015-12-13 (Sun, 13 Dec 2015) --- src/gui/lua/luainstance.cpp | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/src/gui/lua/luainstance.cpp b/src/gui/lua/luainstance.cpp index 1271db909..8c189dbdd 100644 --- a/src/gui/lua/luainstance.cpp +++ b/src/gui/lua/luainstance.cpp @@ -749,12 +749,7 @@ int CLuaInstance::PaintBox(lua_State *L) w = luaL_checkint(L, 4); h = luaL_checkint(L, 5); -#if HAVE_COOL_HARDWARE c = luaL_checkunsigned(L, 6); -#else - /* luaL_checkint does not like e.g. 0xffcc0000 on powerpc (returns INT_MAX) instead */ - c = (unsigned int)luaL_checknumber(L, 6); -#endif if (count > 6) radius = luaL_checkint(L, 7); @@ -785,12 +780,7 @@ int CLuaInstance::paintHLineRel(lua_State *L) dx = luaL_checkint(L, 3); y = luaL_checkint(L, 4); -#if HAVE_COOL_HARDWARE c = luaL_checkunsigned(L, 5); -#else - /* luaL_checkint does not like e.g. 0xffcc0000 on powerpc (returns INT_MAX) instead */ - c = (unsigned int)luaL_checknumber(L, 5); -#endif if (x < 0) x = 0; if (y < 0) @@ -813,12 +803,7 @@ int CLuaInstance::paintVLineRel(lua_State *L) y = luaL_checkint(L, 3); dy = luaL_checkint(L, 4); -#if HAVE_COOL_HARDWARE c = luaL_checkunsigned(L, 5); -#else - /* luaL_checkint does not like e.g. 0xffcc0000 on powerpc (returns INT_MAX) instead */ - c = (unsigned int)luaL_checknumber(L, 5); -#endif if (x < 0) x = 0; if (y < 0) @@ -880,11 +865,7 @@ int CLuaInstance::RenderString(lua_State *L) x = luaL_checkint(L, 4+step); y = luaL_checkint(L, 5+step); if (numargs > 5+step) -#if HAVE_COOL_HARDWARE c = luaL_checkunsigned(L, 6+step); -#else - c = luaL_checkint(L, 6+step); -#endif if (numargs > 6+step) w = luaL_checkint(L, 7+step); else From a69b0c518d9287307c0e3fb8ba1eaf16e00290e6 Mon Sep 17 00:00:00 2001 From: Stefan Seyfried Date: Mon, 14 Dec 2015 12:59:12 +0100 Subject: [PATCH 36/38] avoid continuous rebuilds from LUA_API* changes Signed-off-by: M. Liebmann Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/59f91b190ca64813cf05e095a8d4ba7452093b2c Author: Stefan Seyfried Date: 2015-12-14 (Mon, 14 Dec 2015) --- src/gui/lua/Makefile.am | 16 ++++++++++++++++ src/gui/lua/lua_misc.cpp | 3 +++ src/gui/lua/luainstance.cpp | 3 +++ src/gui/lua/luainstance.h | 2 ++ 4 files changed, 24 insertions(+) diff --git a/src/gui/lua/Makefile.am b/src/gui/lua/Makefile.am index f4052960f..5846d094c 100644 --- a/src/gui/lua/Makefile.am +++ b/src/gui/lua/Makefile.am @@ -45,3 +45,19 @@ libneutrino_gui_lua_a_SOURCES = \ lua_threads_copy.cpp \ lua_threads_functions.cpp \ lua_video.cpp + +# the continuous changes of LUA_API_VERSION_* in luainstance.h +# are not only of questionable usefulness, but they also cause +# rebuilds all over the place, even though it is only used in +# 2(!) source files. So split out those two definitions into an +# autogenerated separate file, they are #if 0'ed in luainstance.h +# already and the rest is dealt with via ccache... +BUILT_SOURCES = lua_api_version.h +lua_api_version.h: luainstance.h + @rm -f $@ + grep '^#define.*LUA_API' $(srcdir)/luainstance.h > $@ + +noinst_HEADERS = lua_api_version.h + +# so that lua_api_version.h can be found... +AM_CPPFLAGS += -I$(builddir) diff --git a/src/gui/lua/lua_misc.cpp b/src/gui/lua/lua_misc.cpp index a1e8be916..2c173fe0f 100644 --- a/src/gui/lua/lua_misc.cpp +++ b/src/gui/lua/lua_misc.cpp @@ -36,6 +36,9 @@ #include "luainstance.h" #include "lua_misc.h" +/* autogenerated from luainstance.h */ +#include "lua_api_version.h" + extern CVolume* g_volume; CLuaInstMisc* CLuaInstMisc::getInstance() diff --git a/src/gui/lua/luainstance.cpp b/src/gui/lua/luainstance.cpp index 8c189dbdd..177cca979 100644 --- a/src/gui/lua/luainstance.cpp +++ b/src/gui/lua/luainstance.cpp @@ -49,6 +49,9 @@ #include "lua_threads.h" #include "lua_video.h" +/* autogenerated from luainstance.h */ +#include "lua_api_version.h" + extern CPictureViewer * g_PicViewer; extern cVideo * videoDecoder; diff --git a/src/gui/lua/luainstance.h b/src/gui/lua/luainstance.h index 4d6ff9980..7f0510e05 100644 --- a/src/gui/lua/luainstance.h +++ b/src/gui/lua/luainstance.h @@ -31,8 +31,10 @@ extern "C" { #include "luainstance_helpers.h" +#if 0 #define LUA_API_VERSION_MAJOR 1 #define LUA_API_VERSION_MINOR 35 +#endif void LuaInstRegisterFunctions(lua_State *L, bool fromThreads=false); From 6aca71757a0ee0d670c452ad6d39135d83656aca Mon Sep 17 00:00:00 2001 From: Stefan Seyfried Date: Fri, 25 Dec 2015 17:56:33 +0100 Subject: [PATCH 37/38] luainstance: narrow scope of video_cs header Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/b346b7077f11ba3e0504ac51d0e42974b1f32244 Author: Stefan Seyfried Date: 2015-12-25 (Fri, 25 Dec 2015) --- src/gui/lua/luainstance.cpp | 1 + src/gui/lua/luainstance.h | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/lua/luainstance.cpp b/src/gui/lua/luainstance.cpp index 177cca979..fe3359c45 100644 --- a/src/gui/lua/luainstance.cpp +++ b/src/gui/lua/luainstance.cpp @@ -34,6 +34,7 @@ #include #include #include +#include #include "luainstance.h" #include "lua_cc_picture.h" diff --git a/src/gui/lua/luainstance.h b/src/gui/lua/luainstance.h index 7f0510e05..3a0a0ff71 100644 --- a/src/gui/lua/luainstance.h +++ b/src/gui/lua/luainstance.h @@ -26,7 +26,6 @@ extern "C" { #include } #include -#include #include #include "luainstance_helpers.h" From 7bc932fb4fca2a6c94329c6158b46c400b7c2748 Mon Sep 17 00:00:00 2001 From: vanhofen Date: Fri, 1 Jan 2016 00:18:28 +0100 Subject: [PATCH 38/38] Happy new year, neutrino. \o/ Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/6801bf215ea7b85c334394316920eb22c5c20cb4 Author: vanhofen Date: 2016-01-01 (Fri, 01 Jan 2016) Origin message was: ------------------ - Happy new year, neutrino. \o/ --- src/neutrino.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/neutrino.cpp b/src/neutrino.cpp index 32d574354..a973136dc 100644 --- a/src/neutrino.cpp +++ b/src/neutrino.cpp @@ -1,5 +1,5 @@ /* - Neutrino-GUI - DBoxII-Project + Neutrino-GUI - DBoxII-Project Copyright (C) 2001 Steffen Hehn 'McClean' and some other guys