From b27ce1c707871bae1d57394f1f7a1ce6692ce82e Mon Sep 17 00:00:00 2001 From: Jacek Jendrzej Date: Tue, 3 Jan 2017 15:38:04 +0100 Subject: [PATCH 01/14] src/eitd/edvbstring.cpp init array Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/80728520f6218cf550a3a5325a7606fd43b68034 Author: Jacek Jendrzej Date: 2017-01-03 (Tue, 03 Jan 2017) ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- src/eitd/edvbstring.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/eitd/edvbstring.cpp b/src/eitd/edvbstring.cpp index 0e29d0456..cb495b1cc 100644 --- a/src/eitd/edvbstring.cpp +++ b/src/eitd/edvbstring.cpp @@ -7,6 +7,7 @@ #include #include #include +#include #include "SIutils.hpp" #include "debug.h" @@ -2105,6 +2106,7 @@ std::string convertDVBUTF8(const char *data, int len, int table, int tsidonid) //dprintf("recode:::: tsidonid %X table %d two-char %d len %d\n", tsidonid, table, twochar, len); unsigned char res[2048]; + memset(res,0,sizeof(res)); while (i < len) { unsigned long code=0; @@ -2267,6 +2269,7 @@ const std::string convertLatin1UTF8(const std::string &string) unsigned int t=0, i=0, len=string.size(); unsigned char res[2048]; + memset(res,0,sizeof(res)); while (i < len) { From e6234a06267fd5df49e04bb1afc5e52ed546d420 Mon Sep 17 00:00:00 2001 From: Jacek Jendrzej Date: Tue, 3 Jan 2017 15:56:58 +0100 Subject: [PATCH 02/14] src/timerd/timermanager.cpp dont unlock on other errors Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/950963146a9b8589837a3f32e6ba37757be42415 Author: Jacek Jendrzej Date: 2017-01-03 (Tue, 03 Jan 2017) ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- src/timerd/timermanager.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/timerd/timermanager.cpp b/src/timerd/timermanager.cpp index e18e1612f..fec447b79 100644 --- a/src/timerd/timermanager.cpp +++ b/src/timerd/timermanager.cpp @@ -723,7 +723,6 @@ bool CTimerManager::shutdown() time_t nextAnnounceTime=0; bool status=false; timer_is_rec = false; - dprintf("stopping timermanager thread ...\n"); dprintf("Waiting for timermanager thread to terminate ...\n"); @@ -737,7 +736,8 @@ bool CTimerManager::shutdown() saveEventsToConfig(); dprintf("shutdown: saved config\n"); } - if (pthread_mutex_trylock(&tm_eventsMutex) == EBUSY) + int rc = pthread_mutex_trylock(&tm_eventsMutex); + if (rc == EBUSY) { dprintf("error: mutex is still LOCKED\n"); return false; @@ -771,8 +771,8 @@ bool CTimerManager::shutdown() timer_minutes = (nextAnnounceTime - 3*60)/60; } dprintf("shutdown: timeset: %d timer_minutes %ld\n", timeset, timer_minutes); - - pthread_mutex_unlock(&tm_eventsMutex); + if(rc == 0) + pthread_mutex_unlock(&tm_eventsMutex); return status; } //------------------------------------------------------------ From a86f0a75e9fd11e5943f0dea67af855193aead18 Mon Sep 17 00:00:00 2001 From: Michael Liebmann Date: Tue, 3 Jan 2017 04:48:34 +0100 Subject: [PATCH 03/14] src/driver/pictureviewer/png.cpp: Fix -Wclobbered compiler warning Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/617075c30ea54374e80a353a4c3b68a8ffc5602c Author: Michael Liebmann Date: 2017-01-03 (Tue, 03 Jan 2017) ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- src/driver/pictureviewer/png.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/driver/pictureviewer/png.cpp b/src/driver/pictureviewer/png.cpp index c684eecf3..83b01976b 100644 --- a/src/driver/pictureviewer/png.cpp +++ b/src/driver/pictureviewer/png.cpp @@ -35,7 +35,7 @@ int int_png_load(const char *name, unsigned char **buffer, int* xp, int* yp, int int bit_depth, color_type, interlace_type, number_passes, pass, int_bpp; png_byte * fbptr; FILE * fh; - bool updateInfo_alreadyRead = false; + bool updateInfo_alreadyRead; if(!(fh=fopen(name,"rb"))) return(FH_ERROR_FILE); @@ -64,6 +64,7 @@ int int_png_load(const char *name, unsigned char **buffer, int* xp, int* yp, int png_init_io(png_ptr,fh); png_read_info(png_ptr, info_ptr); png_get_IHDR(png_ptr, info_ptr, &width, &height, &bit_depth, &color_type, &interlace_type, NULL, NULL); + updateInfo_alreadyRead = false; if (alpha) // 24bit or gray scale PNGs with alpha-channel { *bpp = png_get_channels(png_ptr, info_ptr); From aa9c114201211142f2e5c2bfa25db67b777ce362 Mon Sep 17 00:00:00 2001 From: vanhofen Date: Thu, 5 Jan 2017 08:42:14 +0100 Subject: [PATCH 04/14] locale: update slovak; thx to Pr0metheus Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/98ab8a083ec38725e83a066a28b818b796cfb257 Author: vanhofen Date: 2017-01-05 (Thu, 05 Jan 2017) Origin message was: ------------------ - locale: update slovak; thx to Pr0metheus ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- data/locale/slovak.locale | 72 ++++++++++++++++++++++----------------- 1 file changed, 40 insertions(+), 32 deletions(-) diff --git a/data/locale/slovak.locale b/data/locale/slovak.locale index 22ca09a52..153c31359 100644 --- a/data/locale/slovak.locale +++ b/data/locale/slovak.locale @@ -461,7 +461,7 @@ extra.key_timeshift Časový posun extra.key_unlock Odblokovanie extra.ladirection Umiestnenie zem.šírky extra.latitude Zem.šírka [N/S] -extra.loadconfig Obnoviť nastavenia z... +extra.loadconfig Obnoviť nastavenia z ... extra.loadkeys Obnoviť nastavenia kláves z ... extra.lodirection Umiestnenie zem.dľžky extra.longitude Zem.dľžka [E/W] @@ -473,7 +473,7 @@ extra.rotor_swap Vymeniť východ/západ motoru extra.rounded_corners Vzhľad rohov extra.rounded_corners_off hranatý extra.rounded_corners_on zaoblený -extra.saveconfig Uložiť nastavenia do... +extra.saveconfig Uložiť nastavenia do ... extra.savekeys Uložiť nastavenia kláves do ... extra.scrambled_message Správa o kódovaní extra.show_mute_icon Ikona umlčania pri hlasitosti 0 @@ -703,7 +703,7 @@ fontmenu.eventlist Programový sprievodca fontmenu.head Nastavenie písma fontmenu.infobar Informačná lišta fontmenu.menu Menu -fontmenu.messages Messages +fontmenu.messages Správy fontmenu.moviebrowser Prehliadač filmov fontmenu.other Iné fontmenu.scaling Faktor zoomu globálneho fontu @@ -712,7 +712,6 @@ fontmenu.scaling_x_hint2 Vodorovne (v %) min 50 / max 200 fontmenu.scaling_y Zvislo (v %) fontmenu.scaling_y_hint2 Zvislo (v %) min 50 / max 200 fontmenu.sizes Veľkosti písma -fontsize.button_text Button text fontsize.channel_num_zap Priamy výber fontsize.channellist Zoznam kanálov fontsize.channellist_descr Popis @@ -738,7 +737,7 @@ 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.message_text Text správy fontsize.moviebrowser_head Hlavičky fontsize.moviebrowser_info Informačné okno fontsize.moviebrowser_list Zoznam položiek @@ -787,7 +786,7 @@ hdd_statfs_recording len pri nahrávaní hdd_umount Odpojenie hdd_umount_warn Chyba odpájania disku! hdd_umounted Zariadenie odstránené -help_box_title Help +help_box_title Pomoc imageinfo.api API: imageinfo.creator Vytvoril: imageinfo.date Dátum: @@ -1040,7 +1039,8 @@ menu.hint_epg_extendedcache Maximálny čas ukladania\npopisov doplňujúcich ud menu.hint_epg_fonts Zmena veľkosti písma okna EPG podrobností menu.hint_epg_max_events Maximálny počet uložených udalostí. Po dosiahnutí hranice\nEPG cache odstráni nasledujúce udalosti menu.hint_epg_old_events Hodiny po skončení udalosti, kedy sa označí\nako staré a odstráni sa z uložených -menu.hint_epg_read Načíta uložené EPG údaje po zavedení z externého zariadenia +menu.hint_epg_read Po reštarte načíta uložené EPG údaje z externého zariadenia +menu.hint_epg_read_frequently Načíta uložené EPG údaje v častejších intervaloch z externého zariadenia menu.hint_epg_save Uloženie EPG na disk alebo usb\pre načítanie po spustení menu.hint_epg_save_frequently Ukladanie EPG v pravidelných intervaloch na externé zariadenie menu.hint_epg_save_mode Ukladať EPG iba pre kanály uložené v obľúbených buketoch @@ -1186,7 +1186,7 @@ menu.hint_menu_fonts Zmena veľkosti písma menu menu.hint_menu_hints Zobrazí túto nápovedu. Taktiež môžno kedykoľvek zmeniť použitím tlačidla ´HELP´. menu.hint_menu_pos Výber umiestnenia menu menu.hint_menus Konfigurácia volieb ponuky -menu.hint_message_fonts Change message text font sizes +menu.hint_message_fonts Zmena veľkosti písma správy menu.hint_misc_cec HDMI-CEC voľby menu.hint_misc_channellist HD/Nové/Odstránené zoznamy kanálov, cyklické prepnutie menu.hint_misc_energy Použitie pohotovostného režimu, oneskorené vypnutie\nčasovače neaktivity @@ -1407,14 +1407,14 @@ 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_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_shoutcast_dev_id Vložte vaše SHOUTcast ID. Prázdne pole vypne podporu pre SHOUTcast. +menu.hint_shoutcast_enabled Povolí alebo zakáže podporu pre 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 -menu.hint_shutdown_rcdelay Aktivuje vypnutie prijímača, ak je tlačidlo zapnutia\nstlačené viac ako 1 sekundu -menu.hint_shutdown_real Aktivuje pohotovostný režim\nAk je zakázané, tlačidlo zapnutia vypne prístroj +menu.hint_shutdown Vypne prijímač do hlbokého spánku.\nBez potvrdzovania +menu.hint_shutdown_count Čas prepnutia prijímača z pohotovostného režimu do hlbokého spánku +menu.hint_shutdown_menu Uvedie prijímač do pohotovostného režimu alebo hlbokého spánku, nastavte časovač spánku +menu.hint_shutdown_rcdelay Povolí hlboký spánok v prípade stlačenia\ntlačidla napájania dlhšie ako 1 sekunda +menu.hint_shutdown_real Povolí pohotovostný režim\nAk je zakázané, tlačidlo napájania uvedie prijímač do hlbokého spánku menu.hint_sleeptimer Nastavenie časovača pre prechod prijímača do pohotovostného režimu menu.hint_sleeptimer_min Prednastavené nastavenia pre časovač vypnutia menu.hint_sms_channel Ak povolené, číselné klávesy v zozname kanálov budú použité pre vyhľadávanie kanálu v štýle SMS @@ -1434,7 +1434,8 @@ 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_timeouts_static_messages Čas pre špecifické správy so zásahom užívateľa +menu.hint_timer_followscreenings Pre nastavenie časovača zobraziť výber s nasledujúcim vysielaním 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 @@ -1515,6 +1516,7 @@ miscsettings.epg_old_events Odstrániť neaktuálne EPG (hod.) miscsettings.epg_old_events_hint1 Ako dlho zapisovať EPG údaje po skončení? miscsettings.epg_old_events_hint2 Nastavenie v hodinách. miscsettings.epg_read Obnoviť EPG po reštarte +miscsettings.epg_read_frequently Časté obnovovanie EPG miscsettings.epg_save Uložiť EPG pred vypnutím miscsettings.epg_save_frequently Periodické ukladanie EPG miscsettings.epg_save_mode Iba obľúbené @@ -1669,6 +1671,7 @@ moviebrowser.edit_book_type_info1 Zadanie novej dĺžky skoku moviebrowser.edit_book_type_info2 <0 vzad , >0 vpred, 0: nikde moviebrowser.edit_serie Zadanie názvu série moviebrowser.error_no_movies Nenájdené filmy +moviebrowser.filter_off Filter vyp moviebrowser.foot_filter Filter: moviebrowser.foot_focus Prepnúť okno moviebrowser.foot_options Voľby @@ -1753,7 +1756,7 @@ moviebrowser.menu_truncate Skrátiť film moviebrowser.option_browser Možnosti prehliadača moviebrowser.reload_at_start Načítanie informácie o filme pri štarte moviebrowser.remount_at_start Pripojiť pri štarte -moviebrowser.scan_for_movies Hľadať filmy ... +moviebrowser.scan_for_movies Prehľadávanie nahrávok ... moviebrowser.serie_auto_create Automaticky doplniť seriály moviebrowser.serie_head Seriály moviebrowser.serie_name Zmena názvu @@ -1825,24 +1828,27 @@ movieplayer.bookmarkname_hint2 movieplayer.chapters Kapitoly movieplayer.fileplayback Prehliadač súborov movieplayer.head Prehrávač filmov +movieplayer.help_additional Ak chcete nájsť viac definovateľných kláves, vojdite do\n"Hlavné menuu" > "Nastavenia" > "Nastavenie kláves" > "Upraviť..." > "Prehrávač filmov".\n\nPočas prehrávania filmu sú niektoré položky hlavného menu deaktivované. +movieplayer.help_button_1 1 minúta späť +movieplayer.help_button_2 Skok na začiatok filmu +movieplayer.help_button_3 1 minúta vpred +movieplayer.help_button_4 3 minúty späť +movieplayer.help_button_5 Skok na stred filmu +movieplayer.help_button_6 3 minúty vpred +movieplayer.help_button_7 10 minút späť +movieplayer.help_button_8 Skok na koniec filmu +movieplayer.help_button_9 10 minút vpred +movieplayer.help_button_backward Zrýchlene späť +movieplayer.help_button_forward Zrýchlene vpred +movieplayer.help_button_menu Otvoriť hlavné menu +movieplayer.help_button_pause Pozastaviť / Pokračovať +movieplayer.help_button_stop Zastaviť movieplayer.plugin Doplnky Prhrávača filmov movieplayer.starting Spúšťa sa prehrávanie... movieplayer.titles Tituly movieplayer.toomanybookmarks Veľa záložiek.\nJe potrebné vymazať jednu najprv. -movieplayer.tshelp1 Zastavenie -movieplayer.tshelp10 asi 10 min dozadu -movieplayer.tshelp11 asi 10 min dopredu -movieplayer.tshelp12 Nápoveda: http://www.giggo.de/dbox2/movieplayer.html\n -movieplayer.tshelp2 Výbrer zvukovej stopy -movieplayer.tshelp3 Prerušenie/Pokračovanie -movieplayer.tshelp4 Vytvoriť záložku -movieplayer.tshelp5 Zobraziť čas -movieplayer.tshelp6 asi 1 min dozadu -movieplayer.tshelp7 asi 1 min dopredu -movieplayer.tshelp8 asi 5 min dozadu -movieplayer.tshelp9 asi 5 min dopredu movieplayer.tsplayback Prehrať TS -movieplayer.ytplayback YouTube prehrávač +movieplayer.ytplayback YouTube video prehrávač mpkey.audio Zvuková stopa mpkey.bookmark Uložiť záložku mpkey.forward Dopredu @@ -2386,6 +2392,7 @@ timerlist.type.zapto Prepnutie timerlist.weekdays V dňoch týždňa timerlist.weekdays.hint_1 Po Ut St Št Pi So Ne timerlist.weekdays.hint_2 'X'=plánované '-' neplánované +timersettings.followscreenings Ukázať výber vysielania timersettings.record_safety_time_after Korekcia času ukončenia nahrávania timersettings.record_safety_time_after.hint_1 Čas v min. (00=vypnuté), ktorý bude pripočítaný timersettings.record_safety_time_after.hint_2 po ukončení daného plánu @@ -2403,8 +2410,8 @@ timing.infobar_movieplayer Stavový riadok (filmový mód) timing.infobar_radio Stavový riadok (rádio mód) timing.menu Ponuka timing.numericzap Prepínanie číslami -timing.popup_messages Popup messages -timing.static_messages Interactive messages +timing.popup_messages Vyskakovacie správy +timing.static_messages Interaktívne správy timing.volumebar Ukazateľ hlasitosti tmdb.api_key TMDb API kľúč tmdb.enabled TMDb podpora @@ -2444,6 +2451,7 @@ usermenu.title_blue Možnosti usermenu.title_green Zvuk usermenu.title_red Udalosti usermenu.title_yellow Obraz +usermenus.head Užívateľské menu video_mode_ok Pracuje tento video režim správne? videomenu.43mode Zobrazenie formátu 4:3 videomenu.analog_auto AUTO From e106e1b2de8b18adc5693697db895e461a130fa0 Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Thu, 5 Jan 2017 22:16:23 +0100 Subject: [PATCH 05/14] CNeutrinoApp: try to fix display intro settings message Message was not really visible on startup. Contents of InitZapper() seems to have prevented this. Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/5014a272e547e8d1aff58d513d6bd95127c2a682 Author: Thilo Graf Date: 2017-01-05 (Thu, 05 Jan 2017) ------------------ This commit was generated by Migit --- src/neutrino.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/neutrino.cpp b/src/neutrino.cpp index 24cb19c2f..19593cbdd 100644 --- a/src/neutrino.cpp +++ b/src/neutrino.cpp @@ -2205,7 +2205,6 @@ TIMER_START(); startwizard.exec(NULL, ""); } - InitZapper(); if(loadSettingsErg) { hintBox->hide(); dprintf(DEBUG_INFO, "config file or options missing\n"); @@ -2215,6 +2214,8 @@ TIMER_START(); saveSetup(NEUTRINO_SETTINGS_FILE); } + InitZapper(); + CHDDDestExec * hdd = new CHDDDestExec(); hdd->exec(NULL, ""); delete hdd; From f22390f80d418f6d5c4fd1a25ac2cc1c9dbb17e2 Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Thu, 5 Jan 2017 22:18:35 +0100 Subject: [PATCH 06/14] CMovieBrowser: fix possible compiler warning -misleading-indentatio Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/64b2f94dd797cced9f9f6e7e6267a7e5af7a904f Author: Thilo Graf Date: 2017-01-05 (Thu, 05 Jan 2017) ------------------ This commit was generated by Migit --- src/gui/moviebrowser/mb.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/moviebrowser/mb.cpp b/src/gui/moviebrowser/mb.cpp index 99ebf9023..b0b669518 100644 --- a/src/gui/moviebrowser/mb.cpp +++ b/src/gui/moviebrowser/mb.cpp @@ -265,7 +265,7 @@ CMovieBrowser::~CMovieBrowser() delete m_movieCover; if (m_header) - delete m_header; m_header = NULL; + delete m_header; } void CMovieBrowser::clearListLines() From 8266920a1bf6fbe6cbb90daf2f8c0a93c1a78f93 Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Sun, 1 Jan 2017 16:46:49 +0100 Subject: [PATCH 07/14] fontrenderer.cpp: Use additional percentage height offset. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Different font types could have different glyph heights, Therfore static values seems not really senseful. eg. chars like ÄÁÂÅÈÉÊËÌÍÎÏÑÒÓÕÖÙÛÜÝ could paint over defined height, Note: However, depending of implementations, the font image may change. Most likely this must be adapted to some parts. Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/3ecb94fc21ab968d44eecbc76a12216ce7da685f Author: Thilo Graf Date: 2017-01-01 (Sun, 01 Jan 2017) ------------------ This commit was generated by Migit --- src/driver/fontrenderer.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/driver/fontrenderer.cpp b/src/driver/fontrenderer.cpp index 29a42be01..d43684626 100644 --- a/src/driver/fontrenderer.cpp +++ b/src/driver/fontrenderer.cpp @@ -287,10 +287,14 @@ return 0; ascender=tM; descender=tg-hg; //this is a negative value! int halflinegap= -(descender>>1); // |descender/2| - we use descender as linegap, half at top, half at bottom - upper = halflinegap+ascender+3; // we add 3 at top - lower = -descender+halflinegap+1; // we add 1 at bottom + + //hack: Use additional percentage height offset, font types could have different heights, static values seems not really senseful. + upper = halflinegap+ascender+hg/7; // we add 1/7 of glyph height at top + lower = -descender+halflinegap-hg/10; // we add 1/10 of glyph height at bottom + height=upper+lower; // this is total height == distance of lines - DigitHeight = ascender+2; + + DigitHeight = ascender+2; //Is this static value really ok? DigitOffset = -descender+halflinegap; // hack end From 0a460b06681a905110ca3fb4a63eebfecc48a768 Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Thu, 5 Jan 2017 10:22:49 +0100 Subject: [PATCH 08/14] CComponentsButton: fix height comparsion comparsion with itself Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/4a03eb69805f72e837e74a07eb3d1ff82ba0aa09 Author: Thilo Graf Date: 2017-01-05 (Thu, 05 Jan 2017) ------------------ This commit was generated by Migit --- src/gui/components/cc_frm_button.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/components/cc_frm_button.cpp b/src/gui/components/cc_frm_button.cpp index 18b3d31ea..96a0957fb 100644 --- a/src/gui/components/cc_frm_button.cpp +++ b/src/gui/components/cc_frm_button.cpp @@ -215,7 +215,7 @@ void CComponentsButton::initCaption() * Otherwise definied font will be used. Button dimensions are calculated from parent container (e.g. footer...). * These dimensions must be enough to display complete content like possible icon and without truncated text. */ - if ((cc_btn_font->getHeight()- 2*w_frame) > h_cap && (cc_btn_font->getRenderWidth(cc_btn_text)- 2*w_frame) > w_cap) + if ((cc_btn_font->getHeight()- 2*w_frame) > (height - 2*w_frame) && (cc_btn_font->getRenderWidth(cc_btn_text)- 2*w_frame) > w_cap) cc_btn_font = def_font; cc_btn_text_obj->setText(cc_btn_text, CTextBox::NO_AUTO_LINEBREAK, cc_btn_font); From 883085e577422ca9540c04d04e00b7580b052ee3 Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Thu, 5 Jan 2017 10:31:51 +0100 Subject: [PATCH 09/14] CBEChannelWidget/CBEBouquetWidget: use explicit footer font Default button font type in footer is button text type and not footer font. Faces of buttons are still disabled and not visible here, therefore this should be ok at the moment. Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/753cfda24357ae138765ff606c0fb8452faa49ae Author: Thilo Graf Date: 2017-01-05 (Thu, 05 Jan 2017) ------------------ This commit was generated by Migit --- src/gui/bedit/bouqueteditor_bouquets.cpp | 2 +- src/gui/bedit/bouqueteditor_channels.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gui/bedit/bouqueteditor_bouquets.cpp b/src/gui/bedit/bouqueteditor_bouquets.cpp index 9c7017a46..5e2e348c8 100644 --- a/src/gui/bedit/bouqueteditor_bouquets.cpp +++ b/src/gui/bedit/bouqueteditor_bouquets.cpp @@ -157,7 +157,7 @@ const struct button_label CBEBouquetWidgetButtons[6] = void CBEBouquetWidget::paintFoot() { size_t numbuttons = sizeof(CBEBouquetWidgetButtons)/sizeof(CBEBouquetWidgetButtons[0]); - footer.paintButtons(x, y+height, width, ButtonHeight, numbuttons, CBEBouquetWidgetButtons, width/numbuttons-20); + footer.paintButtons(x, y+height, width, ButtonHeight, numbuttons, CBEBouquetWidgetButtons, width/numbuttons-2*OFFSET_INNER_MID, 0, g_Font[SNeutrinoSettings::FONT_TYPE_MENU_FOOT]); } void CBEBouquetWidget::hide() diff --git a/src/gui/bedit/bouqueteditor_channels.cpp b/src/gui/bedit/bouqueteditor_channels.cpp index 03f3776d8..8fea35409 100644 --- a/src/gui/bedit/bouqueteditor_channels.cpp +++ b/src/gui/bedit/bouqueteditor_channels.cpp @@ -194,7 +194,7 @@ const struct button_label CBEChannelWidgetButtons[6] = void CBEChannelWidget::paintFoot() { size_t numbuttons = sizeof(CBEChannelWidgetButtons)/sizeof(CBEChannelWidgetButtons[0]); - footer.paintButtons(x, y + (height-footerHeight), width, footerHeight, numbuttons, CBEChannelWidgetButtons, width/numbuttons-20); + footer.paintButtons(x, y + (height-footerHeight), width, footerHeight, numbuttons, CBEChannelWidgetButtons, width/numbuttons-2*OFFSET_INNER_MID, 0, g_Font[SNeutrinoSettings::FONT_TYPE_MENU_FOOT]); } std::string CBEChannelWidget::getInfoText(int index) From 93c032a476d7c20c96f3adb5d7df582716ed602b Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Tue, 3 Jan 2017 11:25:43 +0100 Subject: [PATCH 10/14] CComponentsButton: try to fix fallback for font size Some conditions were not catched. Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/a5d2c2cb1d3f4509894b9746dfe6ec7bebdfb846 Author: Thilo Graf Date: 2017-01-03 (Tue, 03 Jan 2017) ------------------ This commit was generated by Migit --- src/gui/components/cc_frm_button.cpp | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/src/gui/components/cc_frm_button.cpp b/src/gui/components/cc_frm_button.cpp index 96a0957fb..3ec7ce20b 100644 --- a/src/gui/components/cc_frm_button.cpp +++ b/src/gui/components/cc_frm_button.cpp @@ -120,7 +120,7 @@ void CComponentsButton::initVarButton( const int& x_pos, const int& y_pos, const cc_btn_icon_obj = NULL; cc_btn_text_obj = NULL; cc_btn_dy_font = CNeutrinoFonts::getInstance(); - cc_btn_font = g_Font[SNeutrinoSettings::FONT_TYPE_BUTTON_TEXT]; + cc_btn_font = NULL; cc_btn_icon = icon_name; cc_btn_text = caption; cc_directKey = CRCInput::RC_nokey; @@ -188,6 +188,7 @@ void CComponentsButton::initCaption() //set basic properties int w_frame = fr_thickness; + int reduce = 2*w_frame; if (cc_btn_text_obj){ //position and size int x_cap = w_frame; @@ -197,8 +198,8 @@ void CComponentsButton::initCaption() if (cc_btn_font == NULL) cc_btn_font = g_Font[SNeutrinoSettings::FONT_TYPE_BUTTON_TEXT]; - int w_cap = width - w_frame - append_x_offset - x_cap - w_frame; - int h_cap = min(height - 2*w_frame, cc_btn_font->getHeight()); + int w_cap = min(width - append_x_offset - x_cap - reduce, cc_btn_font->getRenderWidth(cc_btn_text)); + int h_cap = min(height - reduce, cc_btn_font->getHeight()); /*NOTE: paint of centered text in y direction without y_offset looks unlovely displaced in y direction especially besides small icons and inside small areas, @@ -210,13 +211,17 @@ void CComponentsButton::initCaption() cc_btn_text_obj->setDimensionsAll(x_cap, y_cap, w_cap, h_cap); //text and font - Font* def_font = *cc_btn_dy_font->getDynFont(w_cap, h_cap, cc_btn_text); /* If button dimension too small, use dynamic font, this ignores possible defined font * Otherwise definied font will be used. Button dimensions are calculated from parent container (e.g. footer...). * These dimensions must be enough to display complete content like possible icon and without truncated text. */ - if ((cc_btn_font->getHeight()- 2*w_frame) > (height - 2*w_frame) && (cc_btn_font->getRenderWidth(cc_btn_text)- 2*w_frame) > w_cap) - cc_btn_font = def_font; + Font *tmp_font = cc_btn_font; + if ((tmp_font->getHeight()-reduce) > (height-reduce) && (tmp_font->getRenderWidth(cc_btn_text)-reduce) > width-reduce) + tmp_font = *cc_btn_dy_font->getDynFont(w_cap, h_cap, cc_btn_text); + if ((cc_btn_font->getHeight()-reduce) > (height-reduce)) + tmp_font = *cc_btn_dy_font->getDynFont(w_cap, h_cap, cc_btn_text); + + cc_btn_font = tmp_font; cc_btn_text_obj->setText(cc_btn_text, CTextBox::NO_AUTO_LINEBREAK, cc_btn_font); cc_btn_text_obj->forceTextPaint(); //here required; From 8f57e2739dd7e16299e3a02ca56e8ba6544f1bbd Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Tue, 3 Jan 2017 11:27:52 +0100 Subject: [PATCH 11/14] CComponentsFooter: fix default button font type Deafult buttonfont is FONT_TYPE_BUTTON_TEXT not FONT_TYPE_MENU_FOOT Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/60a77d38b324f6907b4a726fa975906c4056e514 Author: Thilo Graf Date: 2017-01-03 (Tue, 03 Jan 2017) ------------------ This commit was generated by Migit --- src/gui/components/cc_frm_footer.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/components/cc_frm_footer.h b/src/gui/components/cc_frm_footer.h index b70292765..59a90e8f5 100644 --- a/src/gui/components/cc_frm_footer.h +++ b/src/gui/components/cc_frm_footer.h @@ -204,7 +204,7 @@ class CComponentsFooter : public CComponentsHeader const struct button_label * const content, const int& label_width = 0, const int& context_buttons = 0, - Font* font = g_Font[SNeutrinoSettings::FONT_TYPE_MENU_FOOT], + Font* font = g_Font[SNeutrinoSettings::FONT_TYPE_BUTTON_TEXT], bool do_save_bg = CC_SAVE_SCREEN_NO ); From 361f6eea01648c5adc37f0844f83e882324e9b72 Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Thu, 5 Jan 2017 22:53:31 +0100 Subject: [PATCH 12/14] CComponentsFooter: optimize button position and size Buttons are now smaller so it should be enough, to center only, if not please report. Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/a9b8b2233932ca8fd0e11e8efbee4291dd643df7 Author: Thilo Graf Date: 2017-01-05 (Thu, 05 Jan 2017) ------------------ This commit was generated by Migit --- src/gui/components/cc_frm_footer.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/gui/components/cc_frm_footer.cpp b/src/gui/components/cc_frm_footer.cpp index befc333e8..6653d6616 100644 --- a/src/gui/components/cc_frm_footer.cpp +++ b/src/gui/components/cc_frm_footer.cpp @@ -137,11 +137,14 @@ void CComponentsFooter::setButtonLabels(const struct button_label_s * const cont * With this container we can work inside footer as primary container (in this context '=this') and the parent for the button label container (chain object). * Button label container (chain object) itself is concurrent to the parent object for button objects. */ + int dist = height/2-cch_offset; + int h_chain = ccf_btn_font->getHeight() > height+dist ? height-dist : ccf_btn_font->getHeight()+dist; int x_chain = width/2 - w_chain/2; + int y_chain = height/2 - h_chain/2; if (cch_icon_obj) x_chain = cch_offset+cch_icon_obj->getWidth()+cch_offset; if (chain == NULL){ - chain = new CComponentsFrmChain(x_chain, 0, w_chain, height, 0, CC_DIR_X, this, CC_SHADOW_OFF, COL_MENUCONTENT_PLUS_6, col_body); + chain = new CComponentsFrmChain(x_chain, y_chain, w_chain, h_chain, 0, CC_DIR_X, this, CC_SHADOW_OFF, COL_MENUCONTENT_PLUS_6, col_body); chain->setAppendOffset(0, 0); chain->setCorner(this->corner_rad, this->corner_type); chain->doPaintBg(false); @@ -172,7 +175,7 @@ void CComponentsFooter::setButtonLabels(const struct button_label_s * const cont * with default width to chain object. */ vector v_btns; - int h_btn = /*(ccf_enable_button_bg ? */(height*85/100)-2*fr_thickness-OFFSET_INNER_SMALL/* : height)*/-ccf_button_shadow_width; + int h_btn = /*(ccf_enable_button_bg ? */chain->getHeight()-2*fr_thickness/*-OFFSET_INNER_SMALL*//* : height)*/-ccf_button_shadow_width; for (size_t i= 0; i< label_count; i++){ string txt = content[i].text; string icon_name = string(content[i].button); @@ -426,7 +429,8 @@ void CComponentsFooter::enableButtonShadow(int mode, const int& shadow_width, bo if (chain){ for(size_t i=0; isize(); i++){ chain->getCCItem(i)->enableShadow(ccf_enable_button_shadow, ccf_button_shadow_width, ccf_button_shadow_force_paint); - int y_btn = ccf_enable_button_shadow == CC_SHADOW_OFF ? CC_CENTERED : chain->getHeight()/2 - chain->getCCItem(i)->getHeight()/2 - ccf_button_shadow_width; + //int y_btn = ccf_enable_button_shadow == CC_SHADOW_OFF ? CC_CENTERED : chain->getHeight()/2 - chain->getCCItem(i)->getHeight()/2 - ccf_button_shadow_width; + int y_btn = chain->getHeight()/2 - chain->getCCItem(i)->getHeight()/2; chain->getCCItem(i)->setYPos(y_btn); } } From 3fb520c62cfc2a0158e1b7ca3d5c28dde2add02c Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Wed, 4 Jan 2017 10:25:35 +0100 Subject: [PATCH 13/14] CHintBox/CMsgBox: reduce minimal dimensions Better display for smaller texts. Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/10523d8ad4fb2d75ba742f2c0b4b616fe5e7bfaa Author: Thilo Graf Date: 2017-01-04 (Wed, 04 Jan 2017) ------------------ This commit was generated by Migit --- src/gui/widget/hintbox.h | 2 +- src/gui/widget/msgbox.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gui/widget/hintbox.h b/src/gui/widget/hintbox.h index c005feb26..728edc73c 100644 --- a/src/gui/widget/hintbox.h +++ b/src/gui/widget/hintbox.h @@ -32,7 +32,7 @@ #include -#define HINTBOX_MIN_WIDTH 420 +#define HINTBOX_MIN_WIDTH 320 #define HINTBOX_MIN_HEIGHT 125 #define HINTBOX_MAX_HEIGHT 520 #define HINTBOX_DEFAULT_TIMEOUT g_settings.timing[SNeutrinoSettings::TIMING_POPUP_MESSAGES] diff --git a/src/gui/widget/msgbox.h b/src/gui/widget/msgbox.h index f20083296..f15060973 100644 --- a/src/gui/widget/msgbox.h +++ b/src/gui/widget/msgbox.h @@ -35,7 +35,7 @@ #include "hintbox.h" #define MSGBOX_MIN_WIDTH HINTBOX_MIN_WIDTH -#define MSGBOX_MIN_HEIGHT HINTBOX_MIN_HEIGHT + 75 +#define MSGBOX_MIN_HEIGHT HINTBOX_MIN_HEIGHT #define MSGBOX_DEFAULT_TIMEOUT g_settings.timing[SNeutrinoSettings::TIMING_STATIC_MESSAGES] #define DEFAULT_MSGBOX_TEXT_MODE (CMsgBox::CENTER | CMsgBox::AUTO_WIDTH | CMsgBox::AUTO_HIGH) From 51710a33b442669ff5a19b8e70fe55c0f9372281 Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Wed, 4 Jan 2017 11:57:04 +0100 Subject: [PATCH 14/14] CHintBox: add overloaded version of setMsgText() with locale parameter Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/c60accaeae87bed84011eeb84fe4820f8741e383 Author: Thilo Graf Date: 2017-01-04 (Wed, 04 Jan 2017) ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- src/gui/widget/hintbox.cpp | 5 +++++ src/gui/widget/hintbox.h | 6 ++++++ 2 files changed, 11 insertions(+) diff --git a/src/gui/widget/hintbox.cpp b/src/gui/widget/hintbox.cpp index 45883cc22..45ec42223 100644 --- a/src/gui/widget/hintbox.cpp +++ b/src/gui/widget/hintbox.cpp @@ -330,6 +330,11 @@ void CHintBox::setMsgText(const std::string& Text, const uint& hint_id, const in obj_text->setText(Text, mode, font, color_text, style); } +void CHintBox::setMsgText(const neutrino_locale_t& locale, const uint& hint_id, const int& mode, Font* font_text, const fb_pixel_t& color_text, const int& style) +{ + setMsgText(g_Locale->getText(locale), hint_id, mode, font_text, color_text, style); +} + void CHintBox::ReSize() { int h = (ccw_head ? ccw_head->getHeight() : 0); diff --git a/src/gui/widget/hintbox.h b/src/gui/widget/hintbox.h index 728edc73c..0bd123c45 100644 --- a/src/gui/widget/hintbox.h +++ b/src/gui/widget/hintbox.h @@ -290,6 +290,12 @@ class CHintBox : public CComponentsWindow Font* font_text = NULL, const fb_pixel_t& color_text = COL_MENUCONTENT_TEXT, const int& style = CComponentsText::FONT_STYLE_REGULAR); + void setMsgText(const neutrino_locale_t& locale, + const uint& hint_id = 0, + const int& mode = CTextBox::AUTO_WIDTH | CTextBox::AUTO_HIGH | CTextBox::CENTER, + Font* font_text = NULL, + const fb_pixel_t& color_text = COL_MENUCONTENT_TEXT, + const int& style = CComponentsText::FONT_STYLE_REGULAR); }; /**