diff --git a/data/locale/deutsch.locale b/data/locale/deutsch.locale index 068825531..c2c8b4abe 100644 --- a/data/locale/deutsch.locale +++ b/data/locale/deutsch.locale @@ -1150,6 +1150,7 @@ menu.hint_epg_fonts Ändern Sie die Schriftgrößen der EPG-Details menu.hint_epg_max_events Maxiale Anzahl der Events im Zwischenspeicher menu.hint_epg_old_events Veraltete EPG-Daten werden nach dieser Zeit (in Stunden) verworfen menu.hint_epg_read Liest nach einem Neustart die EPG-Daten von einem externen Datenträger wieder ein +menu.hint_epg_read_frequently Liest die EPG-Daten in regelmäßigen Abständen von einem externen Datenträger menu.hint_epg_save Speichert die EPG-Daten beim Herunterfahren auf einem externen Datenträger menu.hint_epg_save_frequently Speichert die EPG-Daten in regelmäßigen Abständen auf einem externen Datenträger menu.hint_epg_save_mode Speichert die EPG-Daten nur für Sender, die in die Favoriten aufgenommen sind @@ -2639,6 +2640,7 @@ timing.infobar_movieplayer Infobar (Filmwiedergabe) timing.infobar_radio Infobar (Radiobetrieb) timing.menu Menü timing.numericzap Umschalten mit Zifferntasten +timing.popup_messages Popup 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 0c10baf3d..737f93aa7 100644 --- a/data/locale/english.locale +++ b/data/locale/english.locale @@ -1150,6 +1150,7 @@ menu.hint_epg_fonts Change EPG details window font sizes menu.hint_epg_max_events Maximum events to cache. After reaching limit\nEPG cache will remove future events menu.hint_epg_old_events Hours after event end time to consider\nevent old and remove it from cache menu.hint_epg_read Read saved EPG data after boot from an external device +menu.hint_epg_read_frequently Read cached EPG data in frequently intervals from an external device menu.hint_epg_save Save cached EPG data to an external device menu.hint_epg_save_frequently Save cached EPG data in frequently intervals to an external device menu.hint_epg_save_mode Cache EPG only for channels present in favorite bouquets @@ -2639,6 +2640,7 @@ timing.infobar_movieplayer Infobar (movie mode) timing.infobar_radio Infobar (radio mode) timing.menu Menu timing.numericzap Numeric Zap +timing.popup_messages Popup 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 2425f75e9..092ca0fb3 100644 --- a/data/locale/nederlands.locale +++ b/data/locale/nederlands.locale @@ -686,10 +686,10 @@ fontsize.infobar_info Info fontsize.infobar_number Nummer fontsize.infobar_small Klein fontsize.menu Menu tekst -fontsize.message_text Messag Text fontsize.menu_hint Menu hints fontsize.menu_info Menu Info fontsize.menu_title Menu Titel +fontsize.message_text Messag Text fontsize.subtitles Text ondertitels hdd_10min 10 min. hdd_1min 1 min. diff --git a/data/locale/slovak.locale b/data/locale/slovak.locale index c6c3b1e67..c3f774481 100644 --- a/data/locale/slovak.locale +++ b/data/locale/slovak.locale @@ -733,11 +733,11 @@ fontsize.infobar_info Informácia na informačnej lište fontsize.infobar_ng_ecminfo ECM Informácia fontsize.infobar_number Kanál na informačnej lište fontsize.menu Text menu -fontsize.message_text Messagwe Text fontsize.menu_foot Päta (vo všetkých grafických elementoch) fontsize.menu_hint Popis menu fontsize.menu_info Informačné menu fontsize.menu_title Titulok menu +fontsize.message_text Messagwe Text fontsize.moviebrowser_head Hlavičky fontsize.moviebrowser_info Informačné okno fontsize.moviebrowser_list Zoznam položiek @@ -1406,9 +1406,9 @@ menu.hint_selected_text Zmena farby textu označenej položky menu.hint_service Nastavenie tuneru, vyhľadanie služieb,\núprava buketov, aktualizácia software menu.hint_service_scan Automatické / manuálne vyhľadávanie staníc, FastScan, Test signálu menu.hint_settings Konfigurácia system, sieť, zvuk, obraz, OSD a iné -menu.hint_show_mute_icon Zobrazenie ikony umlčania, ak nastavenie hlasitosťi bude 0 menu.hint_shoutcast_dev_id Vložte vaše SHOUTcast údaje. Neuvedením údajov sa vypne podpora SHOUTcast. menu.hint_shoutcast_enabled Povoliť alebo zakázať podporu SHOUTcast +menu.hint_show_mute_icon Zobrazenie ikony umlčania, ak nastavenie hlasitosťi bude 0 menu.hint_shutdown Vypnutie prijímača - bez potvrdzovania menu.hint_shutdown_count Čas prepnutia prijímača z pohotovostného režimu do stavu vypnutia menu.hint_shutdown_menu Prepne prijímač do pohotovostného režimu alebo ho vypne, nastaví časovač vypnutia diff --git a/src/gui/components/cc_frm_clock.cpp b/src/gui/components/cc_frm_clock.cpp index 82c048943..5adcd7b45 100644 --- a/src/gui/components/cc_frm_clock.cpp +++ b/src/gui/components/cc_frm_clock.cpp @@ -190,8 +190,8 @@ void CComponentsFrmClock::initCCLockItems() //background paint of item is not required lbl->doPaintBg(false); - //set corner properties of label item - lbl->setCorner(corner_rad-fr_thickness, corner_type); + //preset corner properties of label item + lbl->setCorner(max(0, corner_rad-fr_thickness), corner_type); //set text border to 0 lbl->setTextBorderWidth(0,0); @@ -234,7 +234,7 @@ void CComponentsFrmClock::initCCLockItems() else if (i == v_cc_items.size()-1) lbl->setCornerType(corner_type & CORNER_RIGHT);// last label item else - lbl->setCornerType(0);// inner items + lbl->setCorner(0,CORNER_NONE);// inner items don't need round corners } //extract timestring segment (char) diff --git a/src/gui/components/cc_item_infobox.h b/src/gui/components/cc_item_infobox.h index d8f2345c5..f82eab80e 100644 --- a/src/gui/components/cc_item_infobox.h +++ b/src/gui/components/cc_item_infobox.h @@ -83,6 +83,8 @@ class CComponentsInfoBox : public CComponentsText void setPicture(const std::string& picture_name); ///set property: path or name of displayed image, parameter as const char* void setPicture(const char* picture_name); + ///retur internal picture object + CComponentsPicture * getPictureObject(){return pic;} ///paint item void paint(bool do_save_bg = CC_SAVE_SCREEN_YES); }; diff --git a/src/gui/widget/hintbox.cpp b/src/gui/widget/hintbox.cpp index 5cc9085b5..6d64e7fc1 100644 --- a/src/gui/widget/hintbox.cpp +++ b/src/gui/widget/hintbox.cpp @@ -135,7 +135,7 @@ void CHintBox::init(const std::string& Text, const int& Width, const std::string hb_font = MSG_FONT; //enable shadow - shadow = true; + shadow = CC_SHADOW_ON; //disable disable header if no title has been defined if (ccw_caption.empty()) @@ -196,6 +196,10 @@ int CHintBox::exec() neutrino_msg_t msg; neutrino_msg_data_t data; int res = messages_return::none; + + if (timeout == NO_TIMEOUT || timeout == 0) + timeout = HINTBOX_DEFAULT_TIMEOUT; + uint64_t timeoutEnd = CRCInput::calcTimeoutEnd( timeout ); if (timeout > 0) @@ -305,8 +309,8 @@ void CHintBox::addHintItem(const std::string& Text, const int& text_mode, const ReSize(); /* set hint box position general to center and refresh window */ - setCenterPos(); - + setCenterPos(CC_ALONG_X); + y = frameBuffer->getScreenY() + ((frameBuffer->getScreenHeight() - height) >> 2), Refresh(); } diff --git a/src/gui/widget/hintbox.h b/src/gui/widget/hintbox.h index 641bb6411..310aeb8b2 100644 --- a/src/gui/widget/hintbox.h +++ b/src/gui/widget/hintbox.h @@ -35,7 +35,8 @@ #define HINTBOX_MIN_WIDTH 420 #define HINTBOX_MIN_HEIGHT 125 #define HINTBOX_MAX_HEIGHT 520 -#define HINTBOX_DEFAULT_TIMEOUT 5 +#define HINTBOX_DEFAULT_TIMEOUT g_settings.timing[SNeutrinoSettings::TIMING_POPUP_MESSAGES] +#define NO_TIMEOUT -1 //frame around hint container as indent #define W_FRAME std::max(HINTBOX_MIN_WIDTH, HINTBOX_MIN_HEIGHT) * 2/100 //frame color around hint/message box @@ -328,7 +329,7 @@ class CHint : public CHintBox * Simplified methodes to show hintboxes without titlebar and footer * Text is UTF-8 encoded * @param[in] timeout -* @li optional: exepts type int as seconds, default = HINTBOX_DEFAULT_TIMEOUT (5 sec) +* @li optional: exepts type int as seconds, default = HINTBOX_DEFAULT_TIMEOUT (get from settings) * @param[in] show_background * @li optional: exepts type bool, enable/disable backround paint, default = true * @see for possible text parameters take a look to CHintBox() diff --git a/src/gui/widget/msgbox.cpp b/src/gui/widget/msgbox.cpp index 567780794..e2edcdeed 100644 --- a/src/gui/widget/msgbox.cpp +++ b/src/gui/widget/msgbox.cpp @@ -204,7 +204,8 @@ void CMsgBox::initButtons() ccw_footer->enableButtonShadow(CC_SHADOW_ON, OFFSET_SHADOW/2, true); //set position of meassage window and refresh window properties - setCenterPos(); + setCenterPos(CC_ALONG_X); + y = frameBuffer->getScreenY() + ((frameBuffer->getScreenHeight() - height) >> 2), Refresh(); //set the 1st button as default selected button @@ -236,6 +237,9 @@ int CMsgBox::exec() ccw_footer->getSelectedButtonObject()->setButtonAlias(mb_show_button); int selected = ccw_footer->getSelectedButton(); + if (timeout == NO_TIMEOUT) + timeout = 0; + uint64_t timeoutEnd = CRCInput::calcTimeoutEnd(timeout); if (timeout > 0) @@ -432,7 +436,7 @@ int ShowMsg2UTF( const neutrino_locale_t Title, const int& Text_mode, fb_pixel_t color_frame) { - int result = ShowMsg( g_Locale->getText(Title), Text, Default, ShowButtons, Icon, Width, Timeout, returnDefaultOnTimeout, Text_mode, color_frame); + int result = ShowMsg2UTF(g_Locale->getText(Title), Text, Default, ShowButtons, Icon, Width, Timeout, returnDefaultOnTimeout, Text_mode, color_frame); return (result); } diff --git a/src/gui/widget/msgbox.h b/src/gui/widget/msgbox.h index 028bba5d5..cd0fd2a44 100644 --- a/src/gui/widget/msgbox.h +++ b/src/gui/widget/msgbox.h @@ -321,7 +321,7 @@ int ShowMsg2UTF( const neutrino_locale_t Title, const uint32_t ShowButtons, const char * const Icon = NULL, const int Width = MSGBOX_MIN_WIDTH, - const int Timeout = -1, + const int Timeout = NO_TIMEOUT, bool returnDefaultOnTimeout = false, const int& Text_mode = DEFAULT_MSGBOX_TEXT_MODE, fb_pixel_t color_frame = HINTBOX_DEFAULT_FRAME_COLOR); // UTF-8 @@ -332,7 +332,7 @@ int ShowMsg2UTF( const char * const Title, const uint32_t ShowButtons, const char * const Icon = NULL, const int Width = MSGBOX_MIN_WIDTH, - const int Timeout = -1, + const int Timeout = NO_TIMEOUT, bool returnDefaultOnTimeout = false, const int& Text_mode = DEFAULT_MSGBOX_TEXT_MODE, fb_pixel_t color_frame = HINTBOX_DEFAULT_FRAME_COLOR); // UTF-8 @@ -343,7 +343,7 @@ int ShowMsg( const neutrino_locale_t Title, const uint32_t ShowButtons, const char * const Icon = NULL, const int Width = MSGBOX_MIN_WIDTH, - const int Timeout = -1, + const int Timeout = NO_TIMEOUT, bool returnDefaultOnTimeout = false, const int& Text_mode = DEFAULT_MSGBOX_TEXT_MODE, fb_pixel_t color_frame = HINTBOX_DEFAULT_FRAME_COLOR); // UTF-8 @@ -354,7 +354,7 @@ int ShowMsg( const char * const Title, const uint32_t ShowButtons, const char * const Icon = NULL, const int Width = MSGBOX_MIN_WIDTH, - const int Timeout = -1, + const int Timeout = NO_TIMEOUT, bool returnDefaultOnTimeout = false, const int& Text_mode = DEFAULT_MSGBOX_TEXT_MODE, fb_pixel_t color_frame = HINTBOX_DEFAULT_FRAME_COLOR); // UTF-8 @@ -365,7 +365,7 @@ int ShowMsg( const neutrino_locale_t Title, const uint32_t ShowButtons, const char * const Icon = NULL, const int Width = MSGBOX_MIN_WIDTH, - const int Timeout = -1, + const int Timeout = NO_TIMEOUT, bool returnDefaultOnTimeout = false, const int& Text_mode = DEFAULT_MSGBOX_TEXT_MODE, fb_pixel_t color_frame = HINTBOX_DEFAULT_FRAME_COLOR); // UTF-8 @@ -376,7 +376,7 @@ int ShowMsg( const neutrino_locale_t Title, const uint32_t ShowButtons, const char * const Icon = NULL, const int Width = MSGBOX_MIN_WIDTH, - const int Timeout = -1, + const int Timeout = NO_TIMEOUT, bool returnDefaultOnTimeout = false, const int& Text_mode = DEFAULT_MSGBOX_TEXT_MODE, fb_pixel_t color_frame = HINTBOX_DEFAULT_FRAME_COLOR); // UTF-8 @@ -387,7 +387,7 @@ int ShowMsg( const std::string & Title, const uint32_t ShowButtons, const char * const Icon = NULL, const int Width = MSGBOX_MIN_WIDTH, - const int Timeout = -1, + const int Timeout = NO_TIMEOUT, bool returnDefaultOnTimeout = false, const int& Text_mode = DEFAULT_MSGBOX_TEXT_MODE, fb_pixel_t color_frame = HINTBOX_DEFAULT_FRAME_COLOR); // UTF-8 diff --git a/src/gui/widget/textbox.cpp b/src/gui/widget/textbox.cpp index bbf678e33..41ca9e7dc 100644 --- a/src/gui/widget/textbox.cpp +++ b/src/gui/widget/textbox.cpp @@ -588,7 +588,7 @@ void CTextBox::refreshText(void) //bg variables int ax = m_cFrameTextRel.iX+m_cFrame.iX; int ay = m_cFrameTextRel.iY+m_cFrame.iY; - int dx = m_old_cText != m_cText || m_nNrOfPages>1 ? m_cFrameTextRel.iWidth : m_nMaxTextWidth - m_nBgRadius; + int dx = m_old_cText != m_cText || m_nNrOfPages>1 ? m_cFrameTextRel.iWidth : m_nMaxTextWidth - (m_nMode & SCROLL ? m_nBgRadius : 0); int dy = m_cFrameTextRel.iHeight; //avoid artefacts in transparent cornes diff --git a/src/neutrino.cpp b/src/neutrino.cpp index d0634f179..353830464 100644 --- a/src/neutrino.cpp +++ b/src/neutrino.cpp @@ -3560,7 +3560,7 @@ int CNeutrinoApp::handleMsg(const neutrino_msg_t _msg, neutrino_msg_data_t data) } else if (msg == NeutrinoMessages::EVT_POPUP || msg == NeutrinoMessages::EVT_EXTMSG) { if (mode != mode_scart && mode != mode_standby) { - int timeout = HINTBOX_DEFAULT_TIMEOUT; + int timeout = NO_TIMEOUT; std::string text = (char*)data; std::string::size_type pos; diff --git a/src/system/locals.h b/src/system/locals.h index d683d966c..f4be7f24c 100644 --- a/src/system/locals.h +++ b/src/system/locals.h @@ -2667,6 +2667,7 @@ typedef enum LOCALE_TIMING_INFOBAR_RADIO, LOCALE_TIMING_MENU, LOCALE_TIMING_NUMERICZAP, + LOCALE_TIMING_POPUP_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 ebd126d70..405928695 100644 --- a/src/system/locals_intern.h +++ b/src/system/locals_intern.h @@ -2667,6 +2667,7 @@ const char * locale_real_names[] = "timing.infobar_radio", "timing.menu", "timing.numericzap", + "timing.popup_messages", "timing.volumebar", "tmdb.api_key", "tmdb.enabled", diff --git a/src/system/settings.h b/src/system/settings.h index 615462c7e..e3430adc0 100644 --- a/src/system/settings.h +++ b/src/system/settings.h @@ -413,6 +413,7 @@ struct SNeutrinoSettings TIMING_VOLUMEBAR = 6, TIMING_FILEBROWSER = 7, TIMING_NUMERICZAP = 8, + TIMING_POPUP_MESSAGES = 9, TIMING_SETTING_COUNT }; @@ -929,7 +930,8 @@ const time_settings_struct_t timing_setting[SNeutrinoSettings::TIMING_SETTING_CO { 6, LOCALE_TIMING_INFOBAR_MOVIEPLAYER}, { 3, LOCALE_TIMING_VOLUMEBAR }, { 180, LOCALE_TIMING_FILEBROWSER }, //NI - { 3, LOCALE_TIMING_NUMERICZAP } + { 3, LOCALE_TIMING_NUMERICZAP }, + { 6, LOCALE_TIMING_POPUP_MESSAGES} }; // lcdd