diff --git a/configure.ac b/configure.ac index c15742e85..68f069c13 100644 --- a/configure.ac +++ b/configure.ac @@ -234,6 +234,25 @@ if test "$BOXTYPE" != coolstream; then HWLIB_CFLAGS="-I$STB_HAL_INC" fi +# Lua - embeddable scripting language +AC_ARG_ENABLE(lua, + AS_HELP_STRING(--enable-lua,include Lua support), + ,[enable_lua=no]) + +AM_CONDITIONAL(ENABLE_LUA,test "$enable_lua" = "yes") +if test "$enable_lua" = "yes"; then + AC_DEFINE(ENABLE_LUA,1,[include Lua support]) + PKG_CHECK_MODULES([LUA], [lua >= 5.2], echo "lua >= 5.2 found", [ + PKG_CHECK_MODULES([LUA], [lua5.2 >= 5.2], echo "lua5.2 found", [ + echo "=> lualib not found, assuming static lua in linker path..." + LUA_LIBS="-llua -ldl" + 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, [ --enable-cleanup enable cleanup on exit], [AC_DEFINE(EXIT_CLEANUP,1,[enable cleanup on exit])]) diff --git a/data/locale/deutsch.locale b/data/locale/deutsch.locale index 3fef02733..6d422991a 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 @@ -1196,7 +1197,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 +1349,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 @@ -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 465abf8c0..388be48ad 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 @@ -1196,7 +1197,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 +1349,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 +1434,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 @@ -1478,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/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 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}, 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);} diff --git a/src/gui/components/cc_frm.cpp b/src/gui/components/cc_frm.cpp index 6e96915db..1cce752d8 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 diff --git a/src/gui/components/cc_frm_signalbars.cpp b/src/gui/components/cc_frm_signalbars.cpp index d361216ac..e961d98cd 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,14 +147,13 @@ 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 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); @@ -177,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); @@ -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, 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); + 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); @@ -300,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(); @@ -317,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); 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;}; 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 diff --git a/src/gui/infoviewer.cpp b/src/gui/infoviewer.cpp index 2a520c530..4570023e7 100644 --- a/src/gui/infoviewer.cpp +++ b/src/gui/infoviewer.cpp @@ -403,9 +403,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); @@ -416,11 +417,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); @@ -1503,7 +1506,8 @@ 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()); + 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); } @@ -1936,6 +1940,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); diff --git a/src/gui/infoviewer_bb.cpp b/src/gui/infoviewer_bb.cpp index 4e33ace30..f776e815f 100644 --- a/src/gui/infoviewer_bb.cpp +++ b/src/gui/infoviewer_bb.cpp @@ -221,80 +221,75 @@ 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 || mode == NeutrinoMessages::mode_audio) { text = CKeybindSetup::getMoviePlayerButtonName(CRCInput::RC_red, active); 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; - if (text.empty()) - text = g_Locale->getText(LOCALE_INFOVIEWER_EVENTLIST); break; case CInfoViewerBB::BUTTON_GREEN: pers = SNeutrinoSettings::P_MAIN_GREEN_BUTTON; 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 || 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)) + text = CUserMenu::getUserMenuButtonName(1, active, g_settings.infobar_buttons_usertitle); + 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(); - } 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: pers = SNeutrinoSettings::P_MAIN_YELLOW_BUTTON; 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 || mode == NeutrinoMessages::mode_audio) { text = CKeybindSetup::getMoviePlayerButtonName(CRCInput::RC_yellow, active); 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; - 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; 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 || mode == NeutrinoMessages::mode_audio) { text = CKeybindSetup::getMoviePlayerButtonName(CRCInput::RC_blue, active); 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; - if (text.empty()) - text = g_Locale->getText(LOCALE_INFOVIEWER_STREAMINFO); break; 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) && !g_settings.infobar_buttons_usertitle) + { + 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; @@ -881,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); 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 6def9054f..70b69f4a1 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; } 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&); diff --git a/src/gui/opkg_manager.cpp b/src/gui/opkg_manager.cpp index e44ebf5df..c6a4d4caa 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; @@ -492,8 +500,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 +887,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 config_dest; diff --git a/src/gui/osd_setup.cpp b/src/gui/osd_setup.cpp index f9957c8a9..6712383cc 100644 --- a/src/gui/osd_setup.cpp +++ b/src/gui/osd_setup.cpp @@ -512,15 +512,15 @@ 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 + 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); @@ -658,10 +658,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; @@ -1063,6 +1061,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/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); diff --git a/src/gui/user_menue.cpp b/src/gui/user_menue.cpp index a61311a9f..bc03ebdc9 100644 --- a/src/gui/user_menue.cpp +++ b/src/gui/user_menue.cpp @@ -479,13 +479,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); }; diff --git a/src/gui/user_menue_setup.cpp b/src/gui/user_menue_setup.cpp index fd135186b..4b701a187 100644 --- a/src/gui/user_menue_setup.cpp +++ b/src/gui/user_menue_setup.cpp @@ -263,37 +263,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)); @@ -304,10 +298,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: diff --git a/src/neutrino.cpp b/src/neutrino.cpp index 1b30ecb3d..6aa130071 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 @@ -488,6 +488,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); g_settings.progressbar_timescale_red = configfile.getInt32("progressbar_timescale_red", 0); @@ -1042,6 +1043,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/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 diff --git a/src/system/locals.h b/src/system/locals.h index 9a9bcdb21..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, @@ -1223,7 +1224,7 @@ typedef enum LOCALE_MENU_HINT_NEXT_BRIEF, LOCALE_MENU_HINT_NUMERIC_ADJUST, LOCALE_MENU_HINT_OPKG, - LOCALE_MENU_HINT_OPKG_FEED_ADRESSES_EDIT, + LOCALE_MENU_HINT_OPKG_FEED_ADDRESSES_EDIT, LOCALE_MENU_HINT_OPKG_INSTALL_LOCAL_PACKAGE, LOCALE_MENU_HINT_OPKG_UPGRADE, LOCALE_MENU_HINT_OSD, @@ -1375,8 +1376,8 @@ typedef enum LOCALE_MENU_HINT_SCREENSAVER_DIR, LOCALE_MENU_HINT_SCREENSAVER_MODE, LOCALE_MENU_HINT_SCREENSAVER_RANDOM, - LOCALE_MENU_HINT_SCREENSAVER_TIMEOUT, LOCALE_MENU_HINT_SCREENSAVER_SETUP, + LOCALE_MENU_HINT_SCREENSAVER_TIMEOUT, LOCALE_MENU_HINT_SCREENSHOT_COUNT, LOCALE_MENU_HINT_SCREENSHOT_COVER, LOCALE_MENU_HINT_SCREENSHOT_DIR, @@ -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, @@ -1895,7 +1897,7 @@ typedef enum LOCALE_OPKG_FAILURE_INSTALL, LOCALE_OPKG_FAILURE_UPDATE, LOCALE_OPKG_FAILURE_UPGRADE, - LOCALE_OPKG_FEED_ADRESSES, + LOCALE_OPKG_FEED_ADDRESSES, LOCALE_OPKG_INSTALL_LOCAL_PACKAGE, LOCALE_OPKG_MESSAGEBOX_REINSTALL, LOCALE_OPKG_MESSAGEBOX_REMOVE, diff --git a/src/system/locals_intern.h b/src/system/locals_intern.h index a34fd0d00..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", @@ -1223,7 +1224,7 @@ const char * locale_real_names[] = "menu.hint_next_brief", "menu.hint_numeric_adjust", "menu.hint_opkg", - "menu.hint_opkg_feed_address_edit", + "menu.hint_opkg_feed_addresses_edit", "menu.hint_opkg_install_local_package", "menu.hint_opkg_upgrade", "menu.hint_osd", @@ -1375,8 +1376,8 @@ const char * locale_real_names[] = "menu.hint_screensaver_dir", "menu.hint_screensaver_mode", "menu.hint_screensaver_random", - "menu.hint_screensaver_timeout", "menu.hint_screensaver_setup", + "menu.hint_screensaver_timeout", "menu.hint_screenshot_count", "menu.hint_screenshot_cover", "menu.hint_screenshot_dir", @@ -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 c5d910f8d..94b43c66f 100644 --- a/src/system/settings.h +++ b/src/system/settings.h @@ -173,6 +173,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;