diff --git a/data/locale/deutsch.locale b/data/locale/deutsch.locale index 2d503f0d4..cf1eaf9c9 100644 --- a/data/locale/deutsch.locale +++ b/data/locale/deutsch.locale @@ -1591,7 +1591,8 @@ menu.hint_streaminfo Aktuelle Sender-Informationen über PIDs, SNR-Verhältnis, menu.hint_subchannel_pos Wählen Sie die Anzeigeposition der Unterkanäle aus menu.hint_sw_update System aktualisieren, Image sichern und wiederherstellen menu.hint_theme Wählen Sie ein vordefiniertes Farbschema, speichern oder laden Sie ihre eigenen Farbschemata -menu.hint_timeouts Gibt an, nach welcher Zeit in Sekunden die Menüs oder Infofenster sich automatisch schließen (0 deaktiviert) +menu.hint_timeouts Anzeigedauer für Menüs oder Infofenster, die sich automatisch schließen (0 deaktiviert) +menu.hint_timeouts_static_messages Anzeigedauer für bestimmte Meldungen mit Benutzerinteraktion menu.hint_timer_followscreenings Zeige Terminauswahl mit Folge-Events zur Timerprogrammierung. "Immer" zeigt die Auswahl auch dann, wenn nur ein Event gefunden wurde. menu.hint_timers Hinzufügen, entfernen und bearbeiten geplanter Aufnahmen oder anderer Timer menu.hint_timezone Wählen Sie ihre Zeitzone aus @@ -2642,6 +2643,7 @@ timing.infobar_radio Infobar (Radiobetrieb) timing.menu Menü timing.numericzap Umschalten mit Zifferntasten timing.popup_messages Popup Meldungen +timing.static_messages Interaktive Meldungen timing.volumebar Lautstärkeanzeige tmdb.api_key TMDb API Schlüssel tmdb.enabled TMDb-Unterstützung diff --git a/data/locale/english.locale b/data/locale/english.locale index 737f93aa7..a60518467 100644 --- a/data/locale/english.locale +++ b/data/locale/english.locale @@ -1592,6 +1592,7 @@ menu.hint_subchannel_pos Select subchannels menu position menu.hint_sw_update Update software menu.hint_theme Select pre-defined color theme\nSave or load theme from files menu.hint_timeouts Configure time to hide GUI windows\nin seconds +menu.hint_timeouts_static_messages Timeout for specific messages with user interaction menu.hint_timer_followscreenings Show selection with followscreenings for timer programming. "Always" shows selection even if just one event is found. menu.hint_timers Add/Remove/Edit scheduled\nrecording, reminders etc. menu.hint_timezone Select your timezone @@ -2641,6 +2642,7 @@ timing.infobar_radio Infobar (radio mode) timing.menu Menu timing.numericzap Numeric Zap timing.popup_messages Popup messages +timing.static_messages Interactive messages timing.volumebar Volume bar tmdb.api_key TMDb API key tmdb.enabled TMDb support diff --git a/data/locale/nederlands.locale b/data/locale/nederlands.locale index 092ca0fb3..6450a1866 100644 --- a/data/locale/nederlands.locale +++ b/data/locale/nederlands.locale @@ -1326,6 +1326,7 @@ menu.hint_subchannel_pos Selecteer menu positie van subkanalen menu.hint_sw_update Update software menu.hint_theme Select voorgedefinieerde thema\n Opslaan of laad thema van bestand menu.hint_timeouts Verberg gebruikers interface na bepaald aantal seconden. +menu.hint_timeouts_static_messages Timeout for specific messages with user interaction menu.hint_timers Toevoegen/Verplaats/Bewerk \ngeplande opnames of timers etc. menu.hint_timezone Selecteer uw tijdzone menu.hint_tools Start tools @@ -2201,6 +2202,8 @@ timing.infobar_radio Infobalk (radio modus) timing.menu Menu timing.numericzap Numeriek Zap timing.volumebar Volume balk +timing.popup_messages Popup messages +timing.static_messages Interactive messages tmdb.read_data Zoeken TMDB data... unicable.lnb Invoer Unicable unicable.qrg Unicable Frequentie diff --git a/data/locale/slovak.locale b/data/locale/slovak.locale index c3f774481..194fb3a84 100644 --- a/data/locale/slovak.locale +++ b/data/locale/slovak.locale @@ -1433,6 +1433,7 @@ menu.hint_subchannel_pos Pozícia menu výberu sub-kanálov menu.hint_sw_update Aktualizácia software menu.hint_theme Výber prednastavených farebných vzhľadov\nUloženie alebo nahranie vzhľadu zo súborov menu.hint_timeouts Konfigurácia času zmiznutia GUI okien\nv sekundách +menu.hint_timeouts_static_messages Timeout for specific messages with user interaction menu.hint_timers Pridanie/Odstránenie/Upravenie plánovaného\nnahrávania, pripomienky atď. menu.hint_timezone Výber časového pásma menu.hint_tmdb_api_key Vložte váš TMDb API kľúč. Neuvedením údajov sa vypne podpora TMDb @@ -2402,6 +2403,8 @@ timing.infobar_radio Stavový riadok (rádio mód) timing.menu Ponuka timing.numericzap Prepínanie číslami timing.volumebar Ukazateľ hlasitosti +timing.popup_messages Popup messages +timing.static_messages Interactive messages tmdb.api_key TMDb API kľúč tmdb.enabled TMDb podpora tmdb.read_data Vyhľadávanie údajov TMDB... diff --git a/src/driver/record.h b/src/driver/record.h index da7d26898..34c3378e2 100644 --- a/src/driver/record.h +++ b/src/driver/record.h @@ -214,6 +214,7 @@ class CRecordManager : public CMenuTarget /*, public CChangeObserver*/ bool StopAutoRecord(bool lock = true); void StopAutoTimer(); bool CheckRecordingId_if_Timeshift(int recid); + recmap_t GetRecordMap()const{return recmap;} MI_MOVIE_INFO * GetMovieInfo(const t_channel_id channel_id, bool timeshift = true); const std::string GetFileName(const t_channel_id channel_id, bool timeshift = true); diff --git a/src/gui/audioplayer.cpp b/src/gui/audioplayer.cpp index 4bc3df8a6..09630bf86 100644 --- a/src/gui/audioplayer.cpp +++ b/src/gui/audioplayer.cpp @@ -296,9 +296,6 @@ int CAudioPlayerGui::exec(CMenuTarget* parent, const std::string &actionKey) m_LastMode = CNeutrinoApp::getInstance()->getMode(); CNeutrinoApp::getInstance()->handleMsg( NeutrinoMessages::CHANGEMODE , NeutrinoMessages::mode_audio ); - // Stop sectionsd - //NI g_Sectionsd->setPauseScanning(true); - //NI printf("[audioplayer.cpp] wakeup_hdd(%s)\n", g_settings.network_nfs_audioplayerdir.c_str()); wakeup_hdd(g_settings.network_nfs_audioplayerdir.c_str(),true); @@ -321,8 +318,7 @@ int CAudioPlayerGui::exec(CMenuTarget* parent, const std::string &actionKey) //g_Zapit->unlockPlayBack(); CZapit::getInstance()->EnablePlayback(true); - // Start Sectionsd - //NI g_Sectionsd->setPauseScanning(false); + m_frameBuffer->stopFrame(); CNeutrinoApp::getInstance()->handleMsg( NeutrinoMessages::CHANGEMODE , m_LastMode ); g_RCInput->postMsg( NeutrinoMessages::SHOW_INFOBAR, 0 ); diff --git a/src/gui/bedit/bouqueteditor_bouquets.cpp b/src/gui/bedit/bouqueteditor_bouquets.cpp index f09ad4a66..9c7017a46 100644 --- a/src/gui/bedit/bouqueteditor_bouquets.cpp +++ b/src/gui/bedit/bouqueteditor_bouquets.cpp @@ -97,22 +97,22 @@ void CBEBouquetWidget::paintItem(int pos) if (current < Bouquets->size()) { if ((i_selected) && (state == beMoving)) - frameBuffer->paintIcon(NEUTRINO_ICON_BUTTON_YELLOW, x + 5, ypos, iheight); + frameBuffer->paintIcon(NEUTRINO_ICON_BUTTON_YELLOW, x + OFFSET_INNER_MID, ypos, iheight); if ((*Bouquets)[current]->bHidden) - frameBuffer->paintIcon(NEUTRINO_ICON_HIDDEN, x + 26, ypos, iheight); + frameBuffer->paintIcon(NEUTRINO_ICON_HIDDEN, x + OFFSET_INNER_MID + iconoffset, ypos, iheight); if ((*Bouquets)[current]->bLocked != g_settings.parentallock_defaultlocked) - frameBuffer->paintIcon(NEUTRINO_ICON_LOCK, x + 18 + iconoffset, ypos, iheight); + frameBuffer->paintIcon(NEUTRINO_ICON_LOCK, x + OFFSET_INNER_MID + 2*iconoffset, ypos, iheight); if (!(*Bouquets)[current]->tvChannels.empty() ) { - frameBuffer->paintIcon(NEUTRINO_ICON_VIDEO, x + 20 + 2*iconoffset - 2, ypos, iheight); + frameBuffer->paintIcon(NEUTRINO_ICON_VIDEO, x + OFFSET_INNER_MID + 3*iconoffset, ypos, iheight); } if (!(*Bouquets)[current]->radioChannels.empty()) { - frameBuffer->paintIcon(NEUTRINO_ICON_AUDIO, x + 20+ 3*iconoffset - 4, ypos, iheight); + frameBuffer->paintIcon(NEUTRINO_ICON_AUDIO, x + OFFSET_INNER_MID + 4*iconoffset, ypos, iheight); } - g_Font[SNeutrinoSettings::FONT_TYPE_CHANNELLIST]->RenderString(x +20 + 4*iconoffset, ypos + iheight - (iheight-fheight)/2, width-iconoffset-20, (*Bouquets)[current]->bFav ? g_Locale->getText(LOCALE_FAVORITES_BOUQUETNAME) : (*Bouquets)[current]->Name, color); + g_Font[SNeutrinoSettings::FONT_TYPE_CHANNELLIST]->RenderString(x + 2*OFFSET_INNER_MID + 5*iconoffset, ypos + iheight - (iheight-fheight)/2, width - 3*OFFSET_INNER_MID - 5*iconoffset, (*Bouquets)[current]->bFav ? g_Locale->getText(LOCALE_FAVORITES_BOUQUETNAME) : (*Bouquets)[current]->Name, color); } } @@ -203,21 +203,31 @@ int CBEBouquetWidget::exec(CMenuTarget* parent, const std::string & /*actionKey* int icol_w, icol_h; frameBuffer->getIconSize(NEUTRINO_ICON_BUTTON_YELLOW, &icol_w, &icol_h); - iheight = std::max(fheight, icol_h+2); + iheight = std::max(fheight, icol_h + OFFSET_INNER_MIN); iconoffset = std::max(iconoffset, icol_w); frameBuffer->getIconSize(NEUTRINO_ICON_LOCK, &icol_w, &icol_h); - iheight = std::max(iheight, icol_h+2); + iheight = std::max(fheight, icol_h + OFFSET_INNER_MIN); iconoffset = std::max(iconoffset, icol_w); frameBuffer->getIconSize(NEUTRINO_ICON_HIDDEN, &icol_w, &icol_h); - iheight = std::max(iheight, icol_h+2); + iheight = std::max(fheight, icol_h + OFFSET_INNER_MIN); + iconoffset = std::max(iconoffset, icol_w); + + frameBuffer->getIconSize(NEUTRINO_ICON_VIDEO, &icol_w, &icol_h); + iheight = std::max(fheight, icol_h + OFFSET_INNER_MIN); + iconoffset = std::max(iconoffset, icol_w); + + frameBuffer->getIconSize(NEUTRINO_ICON_AUDIO, &icol_w, &icol_h); + iheight = std::max(fheight, icol_h + OFFSET_INNER_MIN); iconoffset = std::max(iconoffset, icol_w); width = frameBuffer->getScreenWidthRel(); height = frameBuffer->getScreenHeightRel() - ButtonHeight; - listmaxshow = (height-theight-0)/iheight; - height = theight+0+listmaxshow*iheight; // recalc height + + listmaxshow = (height-theight)/iheight; + height = theight+listmaxshow*iheight; // recalc height + x = getScreenStartX(width); y = getScreenStartY(height + ButtonHeight); diff --git a/src/gui/bedit/bouqueteditor_channels.cpp b/src/gui/bedit/bouqueteditor_channels.cpp index bf77a0e40..2acaabbac 100644 --- a/src/gui/bedit/bouqueteditor_channels.cpp +++ b/src/gui/bedit/bouqueteditor_channels.cpp @@ -125,19 +125,19 @@ void CBEChannelWidget::paintItem(int pos) frameBuffer->paintBoxRel(x, ypos, width- 15, iheight, bgcolor, i_radius); if ((current == selected) && (state == beMoving)) { - frameBuffer->paintIcon(NEUTRINO_ICON_BUTTON_YELLOW, x + 5, ypos, iheight); + frameBuffer->paintIcon(NEUTRINO_ICON_BUTTON_YELLOW, x + OFFSET_INNER_MID, ypos, iheight); } if (current < Channels->size()) { if ((*Channels)[current]->bLocked) { - frameBuffer->paintIcon(NEUTRINO_ICON_LOCK, x + 22, ypos, iheight); + frameBuffer->paintIcon(NEUTRINO_ICON_LOCK, x + OFFSET_INNER_MID + iconoffset, ypos, iheight); } //g_Font[SNeutrinoSettings::FONT_TYPE_CHANNELLIST]->RenderString(x+ 5+ numwidth+ 10, ypos+ fheight, width- numwidth- 20- 15, (*Channels)[current]->getName(), color); //FIXME numwidth ? we not show chan numbers - g_Font[SNeutrinoSettings::FONT_TYPE_CHANNELLIST]->RenderString(x+ 22 + iconoffset, ypos + iheight - (iheight-fheight)/2, width- iconoffset- 20, (*Channels)[current]->getName(), color); + g_Font[SNeutrinoSettings::FONT_TYPE_CHANNELLIST]->RenderString(x + 2*OFFSET_INNER_MID + 2*iconoffset, ypos + iheight - (iheight-fheight)/2, width - 3*OFFSET_INNER_MID - 2*iconoffset, (*Channels)[current]->getName(), color); if((*Channels)[current]->scrambled) - frameBuffer->paintIcon(NEUTRINO_ICON_SCRAMBLED, x+width- 15 - 28, ypos, fheight); + frameBuffer->paintIcon(NEUTRINO_ICON_SCRAMBLED, x + width - 15 - OFFSET_INNER_MID - iconoffset, ypos, fheight); else if (!(*Channels)[current]->getUrl().empty()) - frameBuffer->paintIcon(NEUTRINO_ICON_STREAMING, x+width- 15 - 28, ypos, fheight); + frameBuffer->paintIcon(NEUTRINO_ICON_STREAMING, x + width - 15 - OFFSET_INNER_MID - iconoffset, ypos, fheight); } } diff --git a/src/gui/bedit/bouqueteditor_chanselect.cpp b/src/gui/bedit/bouqueteditor_chanselect.cpp index 79896b0b1..c60372450 100644 --- a/src/gui/bedit/bouqueteditor_chanselect.cpp +++ b/src/gui/bedit/bouqueteditor_chanselect.cpp @@ -135,15 +135,15 @@ void CBEChannelSelectWidget::paintItem(uint32_t itemNr, int paintNr, bool pselec if(itemNr < getItemCount()) { if( isChannelInBouquet(itemNr)) - frameBuffer->paintIcon(NEUTRINO_ICON_BUTTON_GREEN, x+10, ypos, iheight); + frameBuffer->paintIcon(NEUTRINO_ICON_BUTTON_GREEN, x + OFFSET_INNER_MID, ypos, iheight); else - frameBuffer->paintBoxRel(x+10, ypos, iconoffset, iheight, bgcolor); + frameBuffer->paintBoxRel(x + OFFSET_INNER_MID, ypos, iconoffset, iheight, bgcolor); - g_Font[SNeutrinoSettings::FONT_TYPE_CHANNELLIST]->RenderString(x + 20 + iconoffset, ypos + iheight - (iheight-fheight)/2, width - 20 - iconoffset, Channels[itemNr]->getName(), color); + g_Font[SNeutrinoSettings::FONT_TYPE_CHANNELLIST]->RenderString(x + 2*OFFSET_INNER_MID + 2*iconoffset, ypos + iheight - (iheight-fheight)/2, width - 3*OFFSET_INNER_MID - 2*iconoffset, Channels[itemNr]->getName(), color); if(Channels[itemNr]->scrambled) - frameBuffer->paintIcon(NEUTRINO_ICON_SCRAMBLED, x+width- 15 - 28, ypos, fheight); + frameBuffer->paintIcon(NEUTRINO_ICON_SCRAMBLED, x + width - 15 - OFFSET_INNER_MID - iconoffset, ypos, fheight); else if (!Channels[itemNr]->getUrl().empty()) - frameBuffer->paintIcon(NEUTRINO_ICON_STREAMING, x+width- 15 - 28, ypos, fheight); + frameBuffer->paintIcon(NEUTRINO_ICON_STREAMING, x + width - 15 - OFFSET_INNER_MID - iconoffset, ypos, fheight); } } diff --git a/src/gui/buildinfo.cpp b/src/gui/buildinfo.cpp index c7b1c4e21..448bd0077 100644 --- a/src/gui/buildinfo.cpp +++ b/src/gui/buildinfo.cpp @@ -47,7 +47,7 @@ void CBuildInfo::initVarBuildInfo() { setCenterPos(); - font = NULL; + font = g_Font[SNeutrinoSettings::FONT_TYPE_MENU_HINT]; setWindowHeaderButtons(CComponentsHeader::CC_BTN_MENU | CComponentsHeader::CC_BTN_EXIT); InitInfoItems(); diff --git a/src/gui/components/cc_frm_ext_text.cpp b/src/gui/components/cc_frm_ext_text.cpp index 81354cc6c..645410ead 100644 --- a/src/gui/components/cc_frm_ext_text.cpp +++ b/src/gui/components/cc_frm_ext_text.cpp @@ -34,6 +34,13 @@ using namespace std; +CComponentsExtTextForm::CComponentsExtTextForm(CComponentsForm* parent) +{ + Font* t_font = g_Font[SNeutrinoSettings::FONT_TYPE_MENU_INFO]; + initVarExtTextForm(0, 0, 300, t_font->getHeight(), "", "", t_font, parent, CC_SHADOW_OFF, COL_MENUCONTENTINACTIVE_TEXT, COL_MENUCONTENT_TEXT, COL_FRAME_PLUS_0, COL_MENUCONTENT_PLUS_0, COL_SHADOW_PLUS_0); + initCCTextItems(); +} + CComponentsExtTextForm::CComponentsExtTextForm( const int& x_pos, const int& y_pos, const int& w, const int& h, const std::string& label_text, const std::string& text, Font* font_text, @@ -47,20 +54,19 @@ CComponentsExtTextForm::CComponentsExtTextForm( const int& x_pos, const int& y_p initCCTextItems(); } -CComponentsExtTextFormLocalized::CComponentsExtTextFormLocalized(const int& x_pos, const int& y_pos, const int& w, const int& h, - const neutrino_locale_t& locale_label_text, const neutrino_locale_t& locale_text, - Font* font_text, - CComponentsForm* parent, - int shadow_mode, - fb_pixel_t label_color, - fb_pixel_t text_color, - fb_pixel_t color_frame, fb_pixel_t color_body, fb_pixel_t color_shadow) - : CComponentsExtTextForm( x_pos, y_pos, w, h, - g_Locale->getText(locale_label_text), g_Locale->getText(locale_text), - font_text, - parent, - shadow_mode, - label_color, text_color, color_frame, color_body, color_shadow){}; +CComponentsExtTextForm::CComponentsExtTextForm( const int& x_pos, const int& y_pos, const int& w, const int& h, + neutrino_locale_t l_text, const std::string& text, + Font* font_text, + CComponentsForm* parent, + int shadow_mode, + fb_pixel_t label_color, + fb_pixel_t text_color, + fb_pixel_t color_frame, fb_pixel_t color_body, fb_pixel_t color_shadow) +{ + initVarExtTextForm(x_pos, y_pos, w, h, (string)g_Locale->getText(l_text), text, font_text, parent, shadow_mode, label_color, text_color, color_frame, color_body, color_shadow); + initCCTextItems(); +} + void CComponentsExtTextForm::initVarExtTextForm(const int& x_pos, const int& y_pos, const int& w, const int& h, const std::string& label_text, const std::string& text, @@ -81,9 +87,13 @@ void CComponentsExtTextForm::initVarExtTextForm(const int& x_pos, const int& y_p ccx_percent_label_w = DEF_LABEL_WIDTH_PERCENT; ccx_label_width = ccx_percent_label_w * width/100; ccx_text_width = width-ccx_label_width; - + height = h; - + if (height == 0) + height = DEF_HEIGHT; + + y_text = 0; + ccx_label_text = label_text; ccx_text = text; shadow = shadow_mode; @@ -95,8 +105,11 @@ void CComponentsExtTextForm::initVarExtTextForm(const int& x_pos, const int& y_p ccx_label_obj = NULL; ccx_text_obj = NULL; corner_type = 0; - int dx = 0, dy = DEF_HEIGHT; - ccx_font = font_text == NULL ? *(CNeutrinoFonts::getInstance()->getDynFont(dx, dy)) : g_Font[SNeutrinoSettings::FONT_TYPE_MENU_INFO]; + ccx_font = font_text; + if (ccx_font == NULL){ + int dx = 0, dy = height; + ccx_font = *(CNeutrinoFonts::getInstance()->getDynFont(dx, dy)); + } ccx_label_align = ccx_text_align = CTextBox::NO_AUTO_LINEBREAK; initParent(parent); @@ -120,9 +133,10 @@ void CComponentsExtTextForm::initLabel() //set properties if (ccx_label_obj){ ccx_label_width = (ccx_percent_label_w * width/100); + y_text = height/2 - height-2*fr_thickness; ccx_label_obj->setText(ccx_label_text, ccx_label_align, ccx_font); ccx_label_obj->setTextColor(ccx_label_color); - ccx_label_obj->setDimensionsAll(0, 0, ccx_label_width-2*fr_thickness, height-2*fr_thickness); + ccx_label_obj->setDimensionsAll(0, y_text, ccx_label_width-2*fr_thickness, height-2*fr_thickness); ccx_label_obj->setCorner(this->corner_rad, CORNER_LEFT); } } @@ -146,7 +160,7 @@ void CComponentsExtTextForm::initText() ccx_text_width = width-ccx_label_obj->getWidth(); ccx_text_obj->setText(ccx_text, ccx_text_align, ccx_font); ccx_text_obj->setTextColor(ccx_text_color); - ccx_text_obj->setDimensionsAll(CC_APPEND, 0, ccx_text_width-2*fr_thickness, height-2*fr_thickness); + ccx_text_obj->setDimensionsAll(ccx_label_obj->getWidth(), y_text, ccx_text_width-2*fr_thickness, height-2*fr_thickness); ccx_text_obj->setCorner(this->corner_rad, CORNER_RIGHT); } } diff --git a/src/gui/components/cc_frm_ext_text.h b/src/gui/components/cc_frm_ext_text.h index aa148599f..837eb8c18 100644 --- a/src/gui/components/cc_frm_ext_text.h +++ b/src/gui/components/cc_frm_ext_text.h @@ -51,6 +51,8 @@ class CComponentsExtTextForm : public CComponentsForm, public CCTextScreen Font* ccx_font; ///property: percentage val of label width related to full width, causes fit of text automatically into the available remaining size of item, see also setLabelWidthPercent() uint8_t ccx_percent_label_w; + ///centered y position of label and text + int y_text; ///object: label object CComponentsLabel *ccx_label_obj; @@ -79,7 +81,9 @@ class CComponentsExtTextForm : public CComponentsForm, public CCTextScreen public: ///advanced constructor for CComponentsExtTextForm, provides parameters for the most required properties, and caption as string - CComponentsExtTextForm( const int& x_pos = 1, const int& y_pos = 1, const int& w = 300, const int& h = 48, + CComponentsExtTextForm(CComponentsForm* parent = NULL); + + CComponentsExtTextForm( const int& x_pos, const int& y_pos, const int& w, const int& h, const std::string& label_text = "", const std::string& text = "", Font* font_text = NULL, CComponentsForm *parent = NULL, @@ -89,6 +93,17 @@ class CComponentsExtTextForm : public CComponentsForm, public CCTextScreen fb_pixel_t color_frame = COL_FRAME_PLUS_0, fb_pixel_t color_body = COL_MENUCONTENT_PLUS_0, fb_pixel_t color_shadow = COL_SHADOW_PLUS_0); + + CComponentsExtTextForm( const int& x_pos, const int& y_pos, const int& w, const int& h, + neutrino_locale_t l_text = NONEXISTANT_LOCALE, const std::string& text = "", + Font* font_text = NULL, + CComponentsForm *parent = NULL, + int shadow_mode = CC_SHADOW_OFF, + fb_pixel_t label_color = COL_MENUCONTENTINACTIVE_TEXT, + fb_pixel_t text_color = COL_MENUCONTENT_TEXT, + fb_pixel_t color_frame = COL_FRAME_PLUS_0, + fb_pixel_t color_body = COL_MENUCONTENT_PLUS_0, + fb_pixel_t color_shadow = COL_SHADOW_PLUS_0); // ~CComponentsExtTextForm(); //inherited from CComponentsForm ///assigns texts for label and text, parameter as string, parameter Font is optional for required font type, default font is dependently from defined item height @@ -142,20 +157,4 @@ class CComponentsExtTextForm : public CComponentsForm, public CCTextScreen void paint(bool do_save_bg = CC_SAVE_SCREEN_YES); }; -class CComponentsExtTextFormLocalized : public CComponentsExtTextForm -{ - public: - ///advanced constructor for CComponentsExtTextForm, provides parameters for the most required properties, and caption as locales - CComponentsExtTextFormLocalized(const int& x_pos = 1, const int& y_pos = 1, const int& w = 300, const int& h = 48, - const neutrino_locale_t& locale_label_text = NONEXISTANT_LOCALE, const neutrino_locale_t& locale_text = NONEXISTANT_LOCALE, - Font* font_text = NULL, - CComponentsForm *parent = NULL, - int shadow_mode = CC_SHADOW_OFF, - fb_pixel_t label_color = COL_MENUCONTENTINACTIVE_TEXT, - fb_pixel_t text_color = COL_MENUCONTENT_TEXT, - fb_pixel_t color_frame = COL_FRAME_PLUS_0, - fb_pixel_t color_body = COL_MENUCONTENT_PLUS_0, - fb_pixel_t color_shadow = COL_SHADOW_PLUS_0); -}; - #endif diff --git a/src/gui/components/cc_frm_footer.cpp b/src/gui/components/cc_frm_footer.cpp index f74709045..bb10d3608 100644 --- a/src/gui/components/cc_frm_footer.cpp +++ b/src/gui/components/cc_frm_footer.cpp @@ -79,7 +79,7 @@ void CComponentsFooter::initVarFooter( const int& x_pos, const int& y_pos, const col_frame = color_frame; col_body = color_body; col_shadow = color_shadow; - cc_body_gradient_enable = cc_body_gradient_enable_old = g_settings.theme.menu_ButtonBar_gradient; //TODO: not complete implemented at the moment + cc_body_gradient_enable = cc_body_gradient_enable_old = CC_COLGRAD_OFF/*g_settings.theme.menu_ButtonBar_gradient*/; //TODO: not complete implemented at the moment cc_body_gradient_direction = CFrameBuffer::gradientVertical; cc_body_gradient_mode = CColorGradient::gradientDark2Light; btn_auto_frame_col = false; @@ -362,8 +362,7 @@ void CComponentsFooter::setSelectedButton(size_t item_id, sel_col = sel_fr_col; //TODO: make it configurable chain->setSelectedItem(item_id, sel_col, fr_col, sel_bg_col, bg_col, frame_width, sel_frame_width); - if (chain->size() > 1) - getSelectedButtonObject()->setButtonTextColor(sel_text_col); + getSelectedButtonObject()->setButtonTextColor(sel_text_col); } } diff --git a/src/gui/components/cc_frm_footer.h b/src/gui/components/cc_frm_footer.h index 4c5239d56..8f56a1003 100644 --- a/src/gui/components/cc_frm_footer.h +++ b/src/gui/components/cc_frm_footer.h @@ -158,8 +158,8 @@ class CComponentsFooter : public CComponentsHeader * @li optional: exepts type int, default = 2 */ void setSelectedButton(size_t item_id, - const fb_pixel_t& fr_col = COL_MENUCONTENTSELECTED_PLUS_2, - const fb_pixel_t& sel_fr_col = COL_MENUCONTENTSELECTED_PLUS_0, + const fb_pixel_t& fr_col = COL_SHADOW_PLUS_0, //NI + const fb_pixel_t& sel_fr_col = COL_SHADOW_PLUS_0, //NI const fb_pixel_t& bg_col = COL_MENUCONTENT_PLUS_0, const fb_pixel_t& sel_bg_col = COL_MENUCONTENTSELECTED_PLUS_0, const fb_pixel_t& text_col = COL_MENUCONTENT_TEXT, diff --git a/src/gui/components/cc_frm_window.cpp b/src/gui/components/cc_frm_window.cpp index 982219e1b..451d74be3 100644 --- a/src/gui/components/cc_frm_window.cpp +++ b/src/gui/components/cc_frm_window.cpp @@ -59,7 +59,7 @@ using namespace std; //sub class CComponentsWindow inherit from CComponentsForm CComponentsWindow::CComponentsWindow(CComponentsForm *parent) { - initVarWindow(0, 0, 800, 600, "", "", parent); + initVarWindow(0, 0, 800, 600, "", "", parent, CC_SHADOW_OFF, COL_FRAME_PLUS_0, COL_MENUCONTENT_PLUS_0, COL_SHADOW_PLUS_0); } CComponentsWindow::CComponentsWindow( const int& x_pos, const int& y_pos, const int& w, const int& h, @@ -297,6 +297,7 @@ void CComponentsWindow::initBody() ccw_body->setDimensionsAll(x_body, h_header, w_body, h_body); ccw_body->doPaintBg(true); + ccw_body->setColorBody(col_body); //handle corner behavior if (!ccw_show_header) diff --git a/src/gui/components/cc_frm_window.h b/src/gui/components/cc_frm_window.h index ca2fb296e..7b2f71796 100644 --- a/src/gui/components/cc_frm_window.h +++ b/src/gui/components/cc_frm_window.h @@ -107,14 +107,14 @@ class CComponentsWindow : public CComponentsForm ///initialze all window objects at once void initCCWItems(); ///initialize all attributes - void initVarWindow( const int& x_pos = CC_CENTERED, const int& y_pos = CC_CENTERED, const int& w = 0, const int& h = 0, - const std::string& caption = "", - const std::string& iconname = "", - CComponentsForm *parent = NULL, - int shadow_mode = CC_SHADOW_OFF, - fb_pixel_t color_frame = COL_FRAME_PLUS_0, - fb_pixel_t color_body = COL_MENUCONTENT_PLUS_0, - fb_pixel_t color_shadow = COL_SHADOW_PLUS_0); + void initVarWindow( const int& x_pos, const int& y_pos, const int& w, const int& h, + const std::string& caption, + const std::string& iconname, + CComponentsForm *parent, + int shadow_mode, + fb_pixel_t color_frame, + fb_pixel_t color_body, + fb_pixel_t color_shadow); ///initialize width and height void initWindowSize(); ///initialize position diff --git a/src/gui/components/cc_item.cpp b/src/gui/components/cc_item.cpp index 10147f6cf..d695cbdf1 100644 --- a/src/gui/components/cc_item.cpp +++ b/src/gui/components/cc_item.cpp @@ -86,7 +86,7 @@ void CComponentsItem::paintInit(bool do_save_bg) sw = max(0, sw); //set current needed corner main box radius - int box_rad = corner_rad; + int box_rad = corner_type ? corner_rad : 0; //and ensure max main box radius < dimensions if (2*box_rad > dy) @@ -186,7 +186,7 @@ void CComponentsItem::paintInit(bool do_save_bg) {sh_ctr, CC_FBDATA_TYPE_SHADOW_BOX, sh_ctr_x-sw, sh_ctr_y-sw+th, sh_cdx, sh_cdy-sh_cdy_size_offset+sw, col_shadow_clean, box_rad, corner_type & CORNER_TOP_RIGHT, 0, NULL, NULL, NULL, false}, //main box - {true, CC_FBDATA_TYPE_BOX, ix+th, iy+th, dx-2*th, dy-2*th, col_body, box_rad-th, corner_type, 0, NULL, NULL, NULL, false}, + {true, CC_FBDATA_TYPE_BOX, ix+th, iy+th, dx-2*th, dy-2*th, col_body, max(0,box_rad-th), corner_type, 0, NULL, NULL, NULL, false}, //frame {true, CC_FBDATA_TYPE_FRAME, ix, iy, dx, dy, col_frame_cur, box_rad, corner_type, th, NULL, NULL, NULL, false} diff --git a/src/gui/components/cc_item_text.cpp b/src/gui/components/cc_item_text.cpp index c851a49fa..bf52a4f33 100644 --- a/src/gui/components/cc_item_text.cpp +++ b/src/gui/components/cc_item_text.cpp @@ -86,10 +86,11 @@ void CComponentsText::initVarText( const int x_pos, const int y_pos, const int w ct_text_mode = mode; ct_text_style = font_style; - iX = x = x_old = x_pos; //TODO: equalize inhertited member names - iY = y = y_old = y_pos; - iWidth = width_old = width = w; - iHeight = height_old = height = h; + fr_thickness = 0; + x = x_old = x_pos; + y = y_old = y_pos; + width = width_old = w; + height = height_old = h; /* we need a minimal borderwith of 1px because the edge-smoothing (or fontrenderer?) otherwise will paint single pixels outside the @@ -103,7 +104,7 @@ void CComponentsText::initVarText( const int x_pos, const int y_pos, const int w col_frame = color_frame; col_body = color_body; col_shadow = color_shadow; - fr_thickness = 0; + ct_text_sent = false; ct_paint_textbg = false; ct_force_text_paint = false; @@ -114,6 +115,27 @@ void CComponentsText::initVarText( const int x_pos, const int y_pos, const int w } +void CComponentsText::initCBox() +{ + x = max(0, x); + y = max(0, y); + + int x_box = x + fr_thickness; + int y_box = y + fr_thickness; + + if (cc_parent){ + ct_box.iX = cc_xr; + ct_box.iY = cc_yr; + }else{ + ct_box.iX = x_box; + ct_box.iY = y_box; + } + + ct_box.iWidth = width - 2*fr_thickness; + ct_box.iHeight = height - 2*fr_thickness; +} + + void CComponentsText::initCCText() { //set default font, if is no font definied @@ -121,41 +143,32 @@ void CComponentsText::initCCText() ct_font = g_Font[SNeutrinoSettings::FONT_TYPE_MENU_INFO]; //define height from font size - height = max(height, ct_font->getHeight()); - - //init CBox dimensions - iWidth = width-2*fr_thickness; - iHeight = height-2*fr_thickness; - - //using of real x/y values to paint textbox if this text object is bound in a parent form - if (cc_parent){ - int th_parent_fr = cc_parent->getFrameThickness(); - iX = cc_xr + (x <= th_parent_fr ? th_parent_fr : 0); - iY = cc_yr - (y <= th_parent_fr ? th_parent_fr : 0); - }else{ - iX = x; - iY = y; - } - iX += fr_thickness; - iY += fr_thickness; + int h_tmp = ct_font->getHeight(); + height = max(height, h_tmp-2*fr_thickness); + if (width == 0) + width = max(width, CTextBox::getMaxLineWidth(ct_text, ct_font)-2*fr_thickness); //init textbox + initCBox(); + if (ct_textbox == NULL) ct_textbox = new CTextBox(); - //set text box properties + //set text properties ct_textbox->setTextFont(ct_font); ct_textbox->setTextMode(ct_text_mode); - ct_textbox->setWindowPos(this); + ct_textbox->setTextColor(ct_col_text); + ct_textbox->enableUTF8(ct_utf8_encoded); + + //set text box properties + ct_textbox->setWindowPos(&ct_box); + ct_textbox->setWindowMaxDimensions(ct_box.iWidth, ct_box.iHeight); + ct_textbox->setWindowMinDimensions(ct_box.iWidth, ct_box.iHeight); ct_textbox->setTextBorderWidth(ct_text_Hborder, ct_text_Vborder); ct_textbox->enableBackgroundPaint(ct_paint_textbg && !cc_txt_save_screen); ct_textbox->setBackGroundColor(col_body); - ct_textbox->setBackGroundRadius(corner_rad-fr_thickness, corner_type); - ct_textbox->setTextColor(ct_col_text); - ct_textbox->setWindowMaxDimensions(iWidth, iHeight); - ct_textbox->setWindowMinDimensions(iWidth, iHeight); + ct_textbox->setBackGroundRadius(0/*(corner_type ? corner_rad-fr_thickness : 0), corner_type*/); ct_textbox->enableSaveScreen(cc_txt_save_screen && !ct_paint_textbg); - ct_textbox->enableUTF8(ct_utf8_encoded); //observe behavior of parent form if available bool force_text_paint = ct_force_text_paint; @@ -169,7 +182,7 @@ void CComponentsText::initCCText() #endif //send text to CTextBox object, but force text paint text if force_text_paint option is enabled //this is managed by CTextBox object itself - ct_text_sent = ct_textbox->setText(&ct_text, this->iWidth, force_text_paint); + ct_text_sent = ct_textbox->setText(&ct_text, ct_box.iWidth, force_text_paint); //set current text status, needed by textChanged() if (ct_text_sent){ @@ -180,7 +193,7 @@ void CComponentsText::initCCText() //ensure clean font rendering on transparency background ct_textbox->setTextRenderModeFullBG(!paint_bg); -// dprintf(DEBUG_NORMAL, "[CComponentsText] [%s - %d] init text: %s [x %d x_old %d, y %d y_old %d, w %d, h %d]\n", __func__, __LINE__, ct_text.c_str(), this->x, x_old, this->y, y_old, this->iWidth, this->iHeight); +// dprintf(DEBUG_NORMAL, "[CComponentsText] [%s - %d] ct_text = %s, x = %d , x_old = %d , y = %d , y_old = %d , \nct_box.iWidth = %d , ct_box.iHeight = %d , width = %d , height = %d, corner_rad = %d\n", __func__, __LINE__, ct_text.c_str(), x, x_old, y, y_old, ct_box.iWidth, ct_box.iHeight, width, height, corner_rad); } void CComponentsText::clearCCText() @@ -287,25 +300,25 @@ void CComponentsText::hide() void CComponentsText::setXPos(const int& xpos) { CCDraw::setXPos(xpos); - iX = x; + initCBox(); } void CComponentsText::setYPos(const int& ypos) { CCDraw::setYPos(ypos); - iY = y; + initCBox(); } void CComponentsText::setHeight(const int& h) { CCDraw::setHeight(h); - iHeight = height; + initCBox(); } void CComponentsText::setWidth(const int& w) { CCDraw::setWidth(w); - iWidth = width; + initCBox(); } //small helper to remove excessiv linbreaks diff --git a/src/gui/components/cc_item_text.h b/src/gui/components/cc_item_text.h index dd26f02ad..7bd5f6372 100644 --- a/src/gui/components/cc_item_text.h +++ b/src/gui/components/cc_item_text.h @@ -40,11 +40,12 @@ Handling of text parts based up CTextBox attributes and methodes. CComponentsText provides a interface to the embedded CTextBox object. */ -class CComponentsText : public CCTextScreen, public CComponentsItem, public CBox +class CComponentsText : public CCTextScreen, public CComponentsItem { protected: ///object: CTextBox object CTextBox * ct_textbox; + CBox ct_box; ///object: Fontrenderer object Font * ct_font; ///property: font style @@ -96,6 +97,9 @@ class CComponentsText : public CCTextScreen, public CComponentsItem, public CBox ///initialize all required attributes for text and send to the CTextBox object void initCCText(); + ///init internal CBox object required by CTextBox object + void initCBox(); + ///paint CCItem backckrond (if paint_bg=true), apply initCCText() and send paint() to the CTextBox object void paintText(bool do_save_bg = CC_SAVE_SCREEN_YES); public: @@ -105,7 +109,7 @@ class CComponentsText : public CCTextScreen, public CComponentsItem, public CBox FONT_STYLE_ITALIC = 2 }; - CComponentsText( const int x_pos = 10, const int y_pos = 10, const int w = 150, const int h = 50, + CComponentsText( const int x_pos = 10, const int y_pos = 10, const int w = 0, const int h = 0, std::string text = "", const int mode = CTextBox::AUTO_WIDTH, Font* font_text = NULL, diff --git a/src/gui/imageinfo.cpp b/src/gui/imageinfo.cpp index feda1034f..6f946a3ab 100644 --- a/src/gui/imageinfo.cpp +++ b/src/gui/imageinfo.cpp @@ -72,7 +72,7 @@ void CImageInfo::Init(void) item_offset = 10; item_font = NULL; item_height = 0; - + y_tmp = 0; license_txt = ""; v_info.clear(); config.loadConfig(VERSION_FILE); @@ -351,8 +351,9 @@ void CImageInfo::InitInfos() cc_info->setWidth(cc_win->getWidth() - cc_tv->getWidth() - 2*item_offset); //create label and text items + y_tmp = 0; for (size_t i=0; igetWidth(), 0, g_Locale->getText(v_info[i].caption), v_info[i].info_text); + CComponentsExtTextForm *item = new CComponentsExtTextForm(1, y_tmp, cc_info->getWidth(), 0, g_Locale->getText(v_info[i].caption), v_info[i].info_text); item->setLabelWidthPercent(20); if (!item_font){ @@ -363,16 +364,13 @@ void CImageInfo::InitInfos() item->setHeight(item_height); cc_info->setHeight(v_info.size()*item_height); - if ((i == 0) && (item->getYPos() == CC_APPEND)) - item->setYPos(1); - //add ext-text object to window body if (!item->isAdded()) cc_info->addCCItem(item); //add an offset before homepage and license and at the end if (v_info[i].caption == LOCALE_IMAGEINFO_CREATOR || v_info[i].caption == LOCALE_IMAGEINFO_FORUM){ - CComponentsShapeSquare *spacer = new CComponentsShapeSquare(1, CC_APPEND, 1, item_offset); + CComponentsShapeSquare *spacer = new CComponentsShapeSquare(1, y_tmp+=item_offset, 1, item_offset); //spacer ist not visible! spacer->allowPaint(false); cc_info->addCCItem(spacer); @@ -380,6 +378,7 @@ void CImageInfo::InitInfos() int tmp_h = cc_info->getHeight(); cc_info->setHeight(tmp_h + item_offset); } + y_tmp += item->getHeight(); } } @@ -414,7 +413,7 @@ void CImageInfo::InitInfoText(const std::string& text) Font * caption_font = g_Font[SNeutrinoSettings::FONT_TYPE_MENU]; int caption_height = caption_font->getHeight(); if (cc_sub_caption == NULL) - cc_sub_caption = new CComponentsLabel(cc_info->getXPos(), CC_APPEND, cc_info->getWidth(), caption_height, + cc_sub_caption = new CComponentsLabel(cc_info->getXPos(), y_tmp, cc_info->getWidth(), caption_height, g_Locale->getText(LOCALE_IMAGEINFO_LICENSE), CTextBox::AUTO_WIDTH, item_font); if (!cc_sub_caption->isAdded()) cc_win->addWindowItem(cc_sub_caption); @@ -423,9 +422,9 @@ void CImageInfo::InitInfoText(const std::string& text) int h_txt = h_body - item_offset - cc_info->getHeight() - cc_sub_caption->getHeight() - item_offset; if (cc_lic == NULL) - cc_lic = new CComponentsInfoBox(CC_CENTERED, CC_APPEND, w_body-2*item_offset, h_txt); + cc_lic = new CComponentsInfoBox(CC_CENTERED, y_tmp+=cc_sub_caption->getHeight(), w_body-2*item_offset, h_txt); cc_lic->setSpaceOffset(1); - cc_lic->setText(text, CTextBox::TOP | CTextBox::AUTO_WIDTH | CTextBox::SCROLL, g_Font[SNeutrinoSettings::FONT_TYPE_MENU_HINT]); + cc_lic->setText(text, CTextBox::TOP | CTextBox::AUTO_WIDTH | CTextBox::SCROLL, item_font); cc_lic->doPaintTextBoxBg(true); //add text to container diff --git a/src/gui/imageinfo.h b/src/gui/imageinfo.h index a243866b4..9d6e399f8 100644 --- a/src/gui/imageinfo.h +++ b/src/gui/imageinfo.h @@ -50,7 +50,7 @@ class CImageInfo : public CMenuTarget std::string license_txt; Font* item_font; int item_height; - + int y_tmp; std::vector v_info; void Clean(); diff --git a/src/gui/infoviewer_bb.h b/src/gui/infoviewer_bb.h index c65d8226e..d7645291f 100644 --- a/src/gui/infoviewer_bb.h +++ b/src/gui/infoviewer_bb.h @@ -69,8 +69,8 @@ class CInfoViewerBB ICON_DD = 3, ICON_16_9 = 4, ICON_RES = 5, - ICON_CA = 6, - ICON_TUNER = 7, + ICON_TUNER = 6, //NI + ICON_CA = 7, //NI; ICON_CA should always be the last in this enum ICON_MAX = 8 }; diff --git a/src/gui/lua/lua_api_version.h b/src/gui/lua/lua_api_version.h index 9c36a6594..54fa105fa 100644 --- a/src/gui/lua/lua_api_version.h +++ b/src/gui/lua/lua_api_version.h @@ -4,4 +4,4 @@ * to luainstance.h changes */ #define LUA_API_VERSION_MAJOR 1 -#define LUA_API_VERSION_MINOR 65 +#define LUA_API_VERSION_MINOR 68 diff --git a/src/gui/lua/lua_cc_text.cpp b/src/gui/lua/lua_cc_text.cpp index 7e1ea5d36..461164e1a 100644 --- a/src/gui/lua/lua_cc_text.cpp +++ b/src/gui/lua/lua_cc_text.cpp @@ -54,14 +54,16 @@ CLuaCCText *CLuaInstCCText::CCTextCheck(lua_State *L, int n) void CLuaInstCCText::CCTextRegister(lua_State *L) { luaL_Reg meth[] = { - { "new", CLuaInstCCText::CCTextNew }, - { "paint", CLuaInstCCText::CCTextPaint }, - { "hide", CLuaInstCCText::CCTextHide }, - { "setText", CLuaInstCCText::CCTextSetText }, - { "scroll", CLuaInstCCText::CCTextScroll }, - { "setCenterPos", CLuaInstCCText::CCTextSetCenterPos }, - { "enableUTF8", CLuaInstCCText::CCTextEnableUTF8 }, - { "__gc", CLuaInstCCText::CCTextDelete }, + { "new", CLuaInstCCText::CCTextNew }, + { "paint", CLuaInstCCText::CCTextPaint }, + { "hide", CLuaInstCCText::CCTextHide }, + { "setText", CLuaInstCCText::CCTextSetText }, + { "getLines", CLuaInstCCText::CCTextGetLines }, + { "scroll", CLuaInstCCText::CCTextScroll }, + { "setCenterPos", CLuaInstCCText::CCTextSetCenterPos }, + { "enableUTF8", CLuaInstCCText::CCTextEnableUTF8 }, + { "setDimensionsAll", CLuaInstCCText::CCTextSetDimensionsAll }, + { "__gc", CLuaInstCCText::CCTextDelete }, { NULL, NULL } }; @@ -214,6 +216,26 @@ int CLuaInstCCText::CCTextSetText(lua_State *L) return 0; } +int CLuaInstCCText::CCTextGetLines(lua_State *L) +{ + CLuaCCText *D = CCTextCheck(L, 1); + if (!D) return 0; + + lua_Integer lines = 0; + if (lua_gettop(L) == 2) { + const char* Text = luaL_checkstring(L, 2); + lines = (lua_Integer)CTextBox::getLines(Text); + } + else { + CTextBox* ctb = D->ct->getCTextBoxObject(); + if (ctb) + lines = (lua_Integer)ctb->getLines(); + } + + lua_pushinteger(L, lines); + return 1; +} + int CLuaInstCCText::CCTextScroll(lua_State *L) { lua_assert(lua_istable(L,1)); @@ -273,6 +295,28 @@ int CLuaInstCCText::CCTextEnableUTF8(lua_State *L) return 0; } +int CLuaInstCCText::CCTextSetDimensionsAll(lua_State *L) +{ + CLuaCCText *D = CCTextCheck(L, 1); + if (!D) return 0; + lua_Integer x = luaL_checkint(L, 2); + lua_Integer y = luaL_checkint(L, 3); + lua_Integer w = luaL_checkint(L, 4); + lua_Integer h = luaL_checkint(L, 5); + if(x>-1 && y > -1 && w > 1 && h > 1){ + if (h > (lua_Integer)CFrameBuffer::getInstance()->getScreenHeight()) + h = (lua_Integer)CFrameBuffer::getInstance()->getScreenHeight(); + if (w > (lua_Integer)CFrameBuffer::getInstance()->getScreenWidth()) + w = (lua_Integer)CFrameBuffer::getInstance()->getScreenWidth(); + if(x > w) + x = 0; + if(y > h) + y = 0; + D->ct->setDimensionsAll(x,y,w,h); + } + return 0; +} + int CLuaInstCCText::CCTextDelete(lua_State *L) { LUA_DEBUG("CLuaInstCCText::%s %d\n", __func__, lua_gettop(L)); diff --git a/src/gui/lua/lua_cc_text.h b/src/gui/lua/lua_cc_text.h index 67728e533..c0f31d639 100644 --- a/src/gui/lua/lua_cc_text.h +++ b/src/gui/lua/lua_cc_text.h @@ -47,9 +47,11 @@ class CLuaInstCCText static int CCTextPaint(lua_State *L); static int CCTextHide(lua_State *L); static int CCTextSetText(lua_State *L); + static int CCTextGetLines(lua_State *L); static int CCTextScroll(lua_State *L); static int CCTextSetCenterPos(lua_State *L); static int CCTextEnableUTF8(lua_State *L); + static int CCTextSetDimensionsAll(lua_State *L); static int CCTextDelete(lua_State *L); }; diff --git a/src/gui/movieplayer.cpp b/src/gui/movieplayer.cpp index d68b6d30a..5361252e4 100644 --- a/src/gui/movieplayer.cpp +++ b/src/gui/movieplayer.cpp @@ -244,8 +244,6 @@ void CMoviePlayerGui::cutNeutrino() CZapit::getInstance()->setMoviePlayer(true);// let CCamManager::SetMode know, the call is from MoviePlayer g_Zapit->lockPlayBack(); - //NI if (!isWebTV) - //NI g_Sectionsd->setPauseScanning(true); #ifdef HAVE_AZBOX_HARDWARE /* we need sectionsd to get idle and zapit to release the demuxes @@ -280,7 +278,6 @@ void CMoviePlayerGui::restoreNeutrino() //g_Zapit->unlockPlayBack(); CZapit::getInstance()->EnablePlayback(true); - //NI g_Sectionsd->setPauseScanning(false); printf("%s: restore mode %x\n", __func__, m_LastMode);fflush(stdout); #if 0 @@ -1595,10 +1592,37 @@ void CMoviePlayerGui::PlayFileLoop(void) SetPosition(1000 * (hh * 3600 + mm * 60 + ss), true); } else if (msg == CRCInput::RC_help || msg == CRCInput::RC_info) { - if (fromInfoviewer) - { - g_EpgData->show_mp(p_movie_info,GetPosition(),GetDuration()); + if (fromInfoviewer) { + CTimeOSD::mode m_mode = FileTime.getMode(); + bool restore = FileTime.IsVisible(); + if (restore) + FileTime.kill(); + CInfoClock::getInstance()->enableInfoClock(false); + InfoIcons->enableInfoIcons(false); //NI InfoIcons +#ifdef ENABLE_LUA + if (isLuaPlay && haveLuaInfoFunc) { + int xres = 0, yres = 0, aspectRatio = 0, framerate = -1; + if (!videoDecoder->getBlank()) { + videoDecoder->getPictureInfo(xres, yres, framerate); + if (yres == 1088) + yres = 1080; + aspectRatio = videoDecoder->getAspectRatio(); + } + CLuaInstVideo::getInstance()->execLuaInfoFunc(luaState, xres, yres, aspectRatio, framerate); + } + else { +#endif + g_EpgData->show_mp(p_movie_info,GetPosition(),GetDuration()); +#ifdef ENABLE_LUA + } +#endif fromInfoviewer = false; + CInfoClock::getInstance()->enableInfoClock(true); + InfoIcons->enableInfoIcons(true); //NI InfoIcons + if (restore) { + FileTime.setMode(m_mode); + FileTime.update(position, duration); + } } else callInfoViewer(); @@ -2211,7 +2235,7 @@ void CMoviePlayerGui::handleMovieBrowser(neutrino_msg_t msg, int /*position*/) cMovieInfo.saveMovieInfo(*p_movie_info); /* save immediately in xml file */ } } - } else if (msg == NeutrinoMessages::SHOW_EPG && (p_movie_info || (isLuaPlay && haveLuaInfoFunc))) { + } else if (msg == NeutrinoMessages::SHOW_EPG && p_movie_info) { CTimeOSD::mode m_mode = FileTime.getMode(); bool restore = FileTime.IsVisible(); if (restore) @@ -2219,20 +2243,7 @@ void CMoviePlayerGui::handleMovieBrowser(neutrino_msg_t msg, int /*position*/) CInfoClock::getInstance()->enableInfoClock(false); InfoIcons->enableInfoIcons(false); //NI InfoIcons - if (isLuaPlay && haveLuaInfoFunc) { - int xres = 0, yres = 0, aspectRatio = 0, framerate = -1; - if (!videoDecoder->getBlank()) { - videoDecoder->getPictureInfo(xres, yres, framerate); - if (yres == 1088) - yres = 1080; - aspectRatio = videoDecoder->getAspectRatio(); - } -#ifdef ENABLE_LUA - CLuaInstVideo::getInstance()->execLuaInfoFunc(luaState, xres, yres, aspectRatio, framerate); -#endif - } - else if (p_movie_info) - g_EpgData->show_mp(p_movie_info, position, duration); + g_EpgData->show_mp(p_movie_info, position, duration); CInfoClock::getInstance()->enableInfoClock(true); InfoIcons->enableInfoIcons(true); //NI InfoIcons diff --git a/src/gui/osd_setup.cpp b/src/gui/osd_setup.cpp index a6c8db432..efd35ccf8 100644 --- a/src/gui/osd_setup.cpp +++ b/src/gui/osd_setup.cpp @@ -1077,7 +1077,7 @@ void COsdSetup::showOsdTimeoutSetup(CMenuWidget* menu_timeout) { CMenuOptionNumberChooser *ch = new CMenuOptionNumberChooser(timing_setting[i].name, &g_settings.timing[i], true, 0, 180); ch->setNumberFormat(nf); - ch->setHint("", LOCALE_MENU_HINT_OSD_TIMING); + ch->setHint("", timing_setting[i].hint); menu_timeout->addItem(ch); } diff --git a/src/gui/pictureviewer.cpp b/src/gui/pictureviewer.cpp index de617ca29..258853731 100644 --- a/src/gui/pictureviewer.cpp +++ b/src/gui/pictureviewer.cpp @@ -203,9 +203,6 @@ int CPictureViewerGui::exec(CMenuTarget* parent, const std::string & actionKey) // blank background screen videoDecoder->setBlank(true); - - // Stop Sectionsd - //NI g_Sectionsd->setPauseScanning(true); } // Save and Clear background @@ -227,9 +224,6 @@ int CPictureViewerGui::exec(CMenuTarget* parent, const std::string & actionKey) if (!audioplayer) { // !!! why? !!! //g_Zapit->unlockPlayBack(); CZapit::getInstance()->EnablePlayback(true); - - // Start Sectionsd - //NI g_Sectionsd->setPauseScanning(false); } // Restore previous background diff --git a/src/gui/test_menu.cpp b/src/gui/test_menu.cpp index fb2f1de39..1679f187c 100644 --- a/src/gui/test_menu.cpp +++ b/src/gui/test_menu.cpp @@ -564,7 +564,7 @@ int CTestMenu::exec(CMenuTarget* parent, const std::string &actionKey) else if (actionKey == "text_ext"){ if (text_ext == NULL) text_ext = new CComponentsExtTextForm(); - text_ext->setDimensionsAll(10, 20, 300, 48); + text_ext->setDimensionsAll(10, 20, 300, g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->getHeight()); text_ext->setLabelAndText("Label", "Text for demo", g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]); text_ext->setFrameThickness(2); // text_ext->setLabelWidthPercent(15/*%*/); diff --git a/src/gui/upnpbrowser.cpp b/src/gui/upnpbrowser.cpp index 7c0575fde..d3c9a1921 100644 --- a/src/gui/upnpbrowser.cpp +++ b/src/gui/upnpbrowser.cpp @@ -187,9 +187,6 @@ int CUpnpBrowserGui::exec(CMenuTarget* parent, const std::string & /*actionKey*/ // remember last mode m_LastMode=(CNeutrinoApp::getInstance()->getLastMode()); - // Stop sectionsd - //NI g_Sectionsd->setPauseScanning(true); - m_deviceliststart=0; m_selecteddevice=0; timeout = 0; @@ -198,8 +195,6 @@ int CUpnpBrowserGui::exec(CMenuTarget* parent, const std::string & /*actionKey*/ stopAudio(); - // Start Sectionsd - //NI g_Sectionsd->setPauseScanning(false); m_frameBuffer->stopFrame(); m_frameBuffer->Clear(); diff --git a/src/gui/widget/hintbox.h b/src/gui/widget/hintbox.h index 310aeb8b2..4afacb82a 100644 --- a/src/gui/widget/hintbox.h +++ b/src/gui/widget/hintbox.h @@ -44,6 +44,7 @@ #define TIMEOUT_BAR_HEIGHT OFFSET_SHADOW/2 #define DEFAULT_HINTBOX_TEXT_MODE (CTextBox::CENTER) +#define DEFAULT_HEADER_ICON NEUTRINO_ICON_INFO //! Sub class of CComponentsWindow. Shows a window as a hintbox with text and optional icon beside of text. /*! @@ -92,11 +93,11 @@ class CHintBox : public CComponentsWindow * @param[in] Width * @li optional: exepts type int, defines box width, default value = HINTBOX_MIN_WIDTH * @param[in] Icon - * @li optional: exepts type const char*, defines the icon name on the left side of titlebar, default = NULL (non Icon) + * @li optional: exepts type const char*, defines the icon name on the left side of titlebar, default = DEFAULT_HEADER_ICON * @param[in] Picon * @li optional: exepts type const char*, defines the picon name on the left side of message text, default = NULL (non Icon) * @param[in] header_buttons - * @li optional: exepts type int, defines the icon name on the left side of titlebar, default = 0 (non Icon) + * @li optional: exepts type int, defines the icon name on the right side of titlebar, default = 0 (non Icon) * @see class CComponentsWindow() * @param[in] text_mode * @li optional: exepts type int, defines the text modes for embedded text lines @@ -118,7 +119,7 @@ class CHintBox : public CComponentsWindow CHintBox( const neutrino_locale_t Caption, const char * const Text, const int Width = HINTBOX_MIN_WIDTH, - const char * const Icon = NULL, + const char * const Icon = DEFAULT_HEADER_ICON, const char * const Picon = NULL, const int& header_buttons = 0, const int& text_mode = DEFAULT_HINTBOX_TEXT_MODE, @@ -132,7 +133,7 @@ class CHintBox : public CComponentsWindow CHintBox( const char * const Caption, const char * const Text, const int Width = HINTBOX_MIN_WIDTH, - const char * const Icon = NULL, + const char * const Icon = DEFAULT_HEADER_ICON, const char * const Picon = NULL, const int& header_buttons = 0, const int& text_mode = DEFAULT_HINTBOX_TEXT_MODE, @@ -148,7 +149,7 @@ class CHintBox : public CComponentsWindow CHintBox( const neutrino_locale_t Caption, const neutrino_locale_t Text, const int Width = HINTBOX_MIN_WIDTH, - const char * const Icon = NULL, + const char * const Icon = DEFAULT_HEADER_ICON, const char * const Picon = NULL, const int& header_buttons = 0, const int& text_mode = DEFAULT_HINTBOX_TEXT_MODE, @@ -164,7 +165,7 @@ class CHintBox : public CComponentsWindow CHintBox( const char * const Caption, const neutrino_locale_t Text, const int Width = HINTBOX_MIN_WIDTH, - const char * const Icon = NULL, + const char * const Icon = DEFAULT_HEADER_ICON, const char * const Picon = NULL, const int& header_buttons = 0, const int& text_mode = DEFAULT_HINTBOX_TEXT_MODE, diff --git a/src/gui/widget/keyboard_input.cpp b/src/gui/widget/keyboard_input.cpp index b654bd8bd..a984069e0 100644 --- a/src/gui/widget/keyboard_input.cpp +++ b/src/gui/widget/keyboard_input.cpp @@ -502,6 +502,22 @@ void CKeyboardInput::keyBackspacePressed(void) } } +void CKeyboardInput::keyDigiPressed(const neutrino_msg_t key) +{ + int old_col = scol; + int old_srow = srow; + int digi = CRCInput::getNumericValue(key); + digi = (digi == 0) ? 10 : digi; + srow = 0; + scol = digi; + if (focus == FOCUS_KEY) + paintKey(old_srow, old_col); + + focus = FOCUS_KEY; + paintKey(srow, scol); + NormalKeyPressed(); +} + void CKeyboardInput::insertChar() { int item = inputSize -1; @@ -614,6 +630,10 @@ int CKeyboardInput::exec(CMenuTarget* parent, const std::string &) { switchLayout(); } + else if (CRCInput::isNumeric(msg)) + { + keyDigiPressed(msg); + } else if ((msg == CRCInput::RC_home) || (msg == CRCInput::RC_timeout)) { if ((inputString->getValue() != oldval) && diff --git a/src/gui/widget/keyboard_input.h b/src/gui/widget/keyboard_input.h index 1003e7f39..7af5c1c17 100644 --- a/src/gui/widget/keyboard_input.h +++ b/src/gui/widget/keyboard_input.h @@ -104,6 +104,8 @@ class CKeyboardInput : public CMenuTarget bool force_saveScreen; fb_pixel_t *pixBuf; + void keyDigiPressed(const neutrino_msg_t key); + virtual void init(); virtual void paint(); diff --git a/src/gui/widget/menue.cpp b/src/gui/widget/menue.cpp index bddae6865..655f3a4fc 100644 --- a/src/gui/widget/menue.cpp +++ b/src/gui/widget/menue.cpp @@ -637,6 +637,8 @@ void CMenuWidget::Init(const std::string &Icon, const int mwidth, const mn_widge fbutton_width = 0; fbutton_height = 0; nextShortcut = 1; + saveScreen_width = 0; + saveScreen_height = 0; } void CMenuWidget::move(int xoff, int yoff) @@ -1408,17 +1410,20 @@ void CMenuWidget::saveScreen() return; delete[] background; - - background = new fb_pixel_t [full_width * (full_height+fbutton_height)]; + saveScreen_height = full_height+fbutton_height; + saveScreen_width = full_width; + saveScreen_y = y; + saveScreen_x = x; + background = new fb_pixel_t [saveScreen_height * saveScreen_width]; if(background) - frameBuffer->SaveScreen(x /*-ConnectLineBox_Width*/, y, full_width, full_height + fbutton_height, background); + frameBuffer->SaveScreen(saveScreen_x /*-ConnectLineBox_Width*/, saveScreen_y, saveScreen_width, saveScreen_height, background); } void CMenuWidget::restoreScreen() { if(background) { if(savescreen) - frameBuffer->RestoreScreen(x /*-ConnectLineBox_Width*/, y, full_width, full_height + fbutton_height, background); + frameBuffer->RestoreScreen(saveScreen_x /*-ConnectLineBox_Width*/, saveScreen_y, saveScreen_width, saveScreen_height, background); } } @@ -1428,6 +1433,10 @@ void CMenuWidget::enableSaveScreen(bool enable) if (!enable && background) { delete[] background; background = NULL; + saveScreen_width = 0; + saveScreen_height = 0; + saveScreen_y = 0; + saveScreen_x = 0; } } diff --git a/src/gui/widget/menue.h b/src/gui/widget/menue.h index bc527ed68..5da3cc3f5 100644 --- a/src/gui/widget/menue.h +++ b/src/gui/widget/menue.h @@ -494,6 +494,10 @@ class CMenuWidget : public CMenuTarget, public CComponentsSignals CComponentsInfoBox *info_box; int hint_height; CComponentsHeader *header; + unsigned int saveScreen_width ; + unsigned int saveScreen_height; + unsigned int saveScreen_y; + unsigned int saveScreen_x; protected: std::string nameString; neutrino_locale_t name; diff --git a/src/gui/widget/msgbox.cpp b/src/gui/widget/msgbox.cpp index e2edcdeed..151a0cc73 100644 --- a/src/gui/widget/msgbox.cpp +++ b/src/gui/widget/msgbox.cpp @@ -238,7 +238,7 @@ int CMsgBox::exec() ccw_footer->getSelectedButtonObject()->setButtonAlias(mb_show_button); int selected = ccw_footer->getSelectedButton(); if (timeout == NO_TIMEOUT) - timeout = 0; + timeout = MSGBOX_DEFAULT_TIMEOUT; uint64_t timeoutEnd = CRCInput::calcTimeoutEnd(timeout); @@ -288,15 +288,19 @@ int CMsgBox::exec() mb_show_button = ccw_footer->getSelectedButtonObject()->getButtonAlias(); } selected = ccw_footer->getSelectedButton(); - refreshFoot(); - //refresh timeout on any pressed navi key! This resets current timeout end to the initial value + //***refresh buttons only if we have more than one button, this avoids unnecessary repaints with possible flicker effects*** + if (ccw_footer->getButtonChainObject()->size()>1) + refreshFoot(); + + //***refresh timeout on any pressed navi key! This resets current timeout end to initial value*** if (timeout > 0){ timeout_pb->setValues(0, timeout); timeoutEnd = CRCInput::calcTimeoutEnd(timeout); } dprintf(DEBUG_INFO, "\033[32m[CMsgBox] [%s - %d] result = %d, mb_show_button = %d\033[0m\n", __func__, __LINE__, result, mb_show_button); } + //***action buttons without preselection*** for (size_t i = 0; i< ccw_footer->getButtonChainObject()->size(); i++){ CComponentsButton* btn_action = static_cast(ccw_footer->getButtonChainObject()->getCCItem(i)); diff --git a/src/gui/widget/msgbox.h b/src/gui/widget/msgbox.h index cd0fd2a44..5c81dfb33 100644 --- a/src/gui/widget/msgbox.h +++ b/src/gui/widget/msgbox.h @@ -38,6 +38,7 @@ #define MSGBOX_MIN_WIDTH HINTBOX_MIN_WIDTH #define MSGBOX_MIN_HEIGHT HINTBOX_MIN_HEIGHT + 75 +#define MSGBOX_DEFAULT_TIMEOUT g_settings.timing[SNeutrinoSettings::TIMING_STATIC_MESSAGES] #define DEFAULT_MSGBOX_TEXT_MODE (CMsgBox::CENTER | CMsgBox::AUTO_WIDTH | CMsgBox::AUTO_HIGH) //! Sub class of CHintBox. Shows a window as a messagebox @@ -125,7 +126,7 @@ class CMsgBox : public CHintBox * @param[in] Title * @li optional: exepts type const char*, default = NULL, this causes default title "Information" * @param[in] Icon - * @li optional: exepts type const char*, defines the icon name on the left side of titlebar, default = NULL (non Icon) + * @li optional: exepts type const char*, defines the icon name on the left side of titlebar, default = DEFAULT_HEADER_ICON * @param[in] Picon * @li optional: exepts type const char*, defines the picon name on the left side of message text, default = NULL (non Icon) * @param[in] Width @@ -165,7 +166,7 @@ class CMsgBox : public CHintBox */ CMsgBox(const char* Text, const char* Title = NULL, - const char* Icon = NULL, + const char* Icon = DEFAULT_HEADER_ICON, const char* Picon = NULL, const int& Width = MSGBOX_MIN_WIDTH, const int& Height = MSGBOX_MIN_HEIGHT, @@ -179,7 +180,7 @@ class CMsgBox : public CHintBox * @param[in] Title * @li optional: exepts type neutrino_locale_t with locale entry from /system/locals.h default = NONEXISTANT_LOCALE, this causes default title "Information" * @param[in] Icon - * @li optional: exepts type const char*, defines the icon name on the left side of titlebar, default = NULL (non Icon) + * @li optional: exepts type const char*, defines the icon name on the left side of titlebar, default = DEFAULT_HEADER_ICON * @param[in] Picon * @li optional: exepts type const char*, defines the picon name on the left side of message text, default = NULL (non Icon) * @param[in] Width @@ -219,7 +220,7 @@ class CMsgBox : public CHintBox */ CMsgBox(const char* Text, const neutrino_locale_t locale_Title = NONEXISTANT_LOCALE, - const char* Icon = NULL, + const char* Icon = DEFAULT_HEADER_ICON, const char* Picon = NULL, const int& Width = MSGBOX_MIN_WIDTH, const int& Height = MSGBOX_MIN_HEIGHT, diff --git a/src/gui/widget/textbox.cpp b/src/gui/widget/textbox.cpp index 41ca9e7dc..c1c17ce60 100644 --- a/src/gui/widget/textbox.cpp +++ b/src/gui/widget/textbox.cpp @@ -186,7 +186,7 @@ void CTextBox::initVar(void) m_nPaintBackground = true; m_SaveScreen = false; m_nBgRadius = m_old_nBgRadius = 0; - m_nBgRadiusType = m_old_nBgRadiusType = CORNER_ALL; + m_nBgRadiusType = m_old_nBgRadiusType = CORNER_NONE; m_cLineArray.clear(); @@ -292,7 +292,7 @@ void CTextBox::initFramesRel(void) m_cFrameTextRel.iX = 0; m_cFrameTextRel.iY = 0; - m_cFrameTextRel.iHeight = m_cFrame.iHeight ; + m_cFrameTextRel.iHeight = m_cFrame.iHeight ; if(m_nMode & SCROLL) { @@ -583,7 +583,7 @@ void CTextBox::refreshText(void) if( frameBuffer == NULL) return; - //TRACE("[CTextBox] m_nCurrentLine: %d, m_nNrOfLines %d, m_cLineArray[m_nCurrentLine]: %s\r\n",m_nCurrentLine, m_nNrOfLines, m_cLineArray[m_nCurrentLine].c_str()); + //TRACE("[CTextBox] m_nCurrentLine: %d, m_nNrOfLines %d, m_cLineArray[m_nCurrentLine]: %s m_nBgRadius: %d\r\n",m_nCurrentLine, m_nNrOfLines, m_cLineArray[m_nCurrentLine].c_str(), m_nBgRadius, m_nBgRadiusType); //bg variables int ax = m_cFrameTextRel.iX+m_cFrame.iX; @@ -688,7 +688,7 @@ void CTextBox::refreshText(void) y += m_nFontTextHeight + ((m_cFrameTextRel.iHeight - m_nFontTextHeight * lines) >> 1); #ifdef VISUAL_DEBUG - frameBuffer->paintBoxRel(m_cFrame.iX, m_cFrame.iY, m_cFrame.iWidth, m_cFrame.iHeight, COL_GREEN); + frameBuffer->paintBoxRel(m_cFrame.iX, m_cFrame.iY, m_cFrame.iWidth, m_cFrame.iHeight, COL_GREEN, m_nBgRadius, m_nBgRadiusType); #endif for(i = m_nCurrentLine; i < m_nNrOfLines && i < m_nCurrentLine + m_nLinesPerPage; i++) @@ -710,7 +710,7 @@ void CTextBox::refreshText(void) #ifdef VISUAL_DEBUG int th = m_nFontTextHeight; - frameBuffer->paintBoxRel(tx, ty-th, tw, th, COL_RED); + frameBuffer->paintBoxRel(tx, ty-th, tw, th, COL_RED, m_nBgRadius, m_nBgRadiusType); #endif //TRACE("[CTextBox] %s Line %d m_cFrame.iX %d m_cFrameTextRel.iX %d\r\n", __FUNCTION__, __LINE__, m_cFrame.iX, m_cFrameTextRel.iX); m_pcFontText->RenderString(tx, ty, tw, m_cLineArray[i].c_str(), m_textColor, 0, m_renderMode | (m_utf8_encoded) ? Font::IS_UTF8 : 0); diff --git a/src/system/locals.h b/src/system/locals.h index f4be7f24c..1398e685a 100644 --- a/src/system/locals.h +++ b/src/system/locals.h @@ -1619,6 +1619,7 @@ typedef enum LOCALE_MENU_HINT_SW_UPDATE, LOCALE_MENU_HINT_THEME, LOCALE_MENU_HINT_TIMEOUTS, + LOCALE_MENU_HINT_TIMEOUTS_STATIC_MESSAGES, LOCALE_MENU_HINT_TIMER_FOLLOWSCREENINGS, LOCALE_MENU_HINT_TIMERS, LOCALE_MENU_HINT_TIMEZONE, @@ -2668,6 +2669,7 @@ typedef enum LOCALE_TIMING_MENU, LOCALE_TIMING_NUMERICZAP, LOCALE_TIMING_POPUP_MESSAGES, + LOCALE_TIMING_STATIC_MESSAGES, LOCALE_TIMING_VOLUMEBAR, LOCALE_TMDB_API_KEY, LOCALE_TMDB_ENABLED, diff --git a/src/system/locals_intern.h b/src/system/locals_intern.h index 405928695..5684b10fa 100644 --- a/src/system/locals_intern.h +++ b/src/system/locals_intern.h @@ -1619,6 +1619,7 @@ const char * locale_real_names[] = "menu.hint_sw_update", "menu.hint_theme", "menu.hint_timeouts", + "menu.hint_timeouts_static_messages", "menu.hint_timer_followscreenings", "menu.hint_timers", "menu.hint_timezone", @@ -2668,6 +2669,7 @@ const char * locale_real_names[] = "timing.menu", "timing.numericzap", "timing.popup_messages", + "timing.static_messages", "timing.volumebar", "tmdb.api_key", "tmdb.enabled", diff --git a/src/system/settings.h b/src/system/settings.h index 05f6b8eff..6927e5900 100644 --- a/src/system/settings.h +++ b/src/system/settings.h @@ -418,6 +418,7 @@ struct SNeutrinoSettings TIMING_FILEBROWSER = 7, TIMING_NUMERICZAP = 8, TIMING_POPUP_MESSAGES = 9, + TIMING_STATIC_MESSAGES = 10, TIMING_SETTING_COUNT }; @@ -922,20 +923,22 @@ typedef struct time_settings_t { const int default_timing; const neutrino_locale_t name; + const neutrino_locale_t hint; } time_settings_struct_t; const time_settings_struct_t timing_setting[SNeutrinoSettings::TIMING_SETTING_COUNT] = { - { 180, LOCALE_TIMING_MENU }, //NI - { 180, LOCALE_TIMING_CHANLIST }, //NI - { 180, LOCALE_TIMING_EPG }, //NI - { 6, LOCALE_TIMING_INFOBAR }, - { 0, LOCALE_TIMING_INFOBAR_RADIO }, - { 6, LOCALE_TIMING_INFOBAR_MOVIEPLAYER}, - { 3, LOCALE_TIMING_VOLUMEBAR }, - { 180, LOCALE_TIMING_FILEBROWSER }, //NI - { 3, LOCALE_TIMING_NUMERICZAP }, - { 6, LOCALE_TIMING_POPUP_MESSAGES} + { 180, LOCALE_TIMING_MENU, LOCALE_MENU_HINT_OSD_TIMING}, //NI //TODO: add hint locales + { 180, LOCALE_TIMING_CHANLIST, LOCALE_MENU_HINT_OSD_TIMING}, //NI + { 180, LOCALE_TIMING_EPG, LOCALE_MENU_HINT_OSD_TIMING}, //NI + { 6, LOCALE_TIMING_INFOBAR, LOCALE_MENU_HINT_OSD_TIMING}, + { 0, LOCALE_TIMING_INFOBAR_RADIO, LOCALE_MENU_HINT_OSD_TIMING}, + { 6, LOCALE_TIMING_INFOBAR_MOVIEPLAYER, LOCALE_MENU_HINT_OSD_TIMING}, + { 3, LOCALE_TIMING_VOLUMEBAR, LOCALE_MENU_HINT_OSD_TIMING}, + { 180, LOCALE_TIMING_FILEBROWSER, LOCALE_MENU_HINT_OSD_TIMING}, //NI + { 3, LOCALE_TIMING_NUMERICZAP, LOCALE_MENU_HINT_OSD_TIMING}, + { 6, LOCALE_TIMING_POPUP_MESSAGES, LOCALE_MENU_HINT_OSD_TIMING}, + { 180, LOCALE_TIMING_STATIC_MESSAGES, LOCALE_MENU_HINT_TIMEOUTS_STATIC_MESSAGES} //NI }; // lcdd