From 0f76ed5daf04af4b745b4cbb105f032de7c20bd1 Mon Sep 17 00:00:00 2001 From: Jacek Jendrzej Date: Fri, 1 Jan 2016 19:07:04 +0100 Subject: [PATCH 01/44] src/gui/timeosd.cpp init m_mode Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/fc8cf590c357f906a3c02cf5bd8354c69caa0c72 Author: Jacek Jendrzej Date: 2016-01-01 (Fri, 01 Jan 2016) ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- src/gui/timeosd.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/gui/timeosd.cpp b/src/gui/timeosd.cpp index 5660a483a..7c46ff79e 100644 --- a/src/gui/timeosd.cpp +++ b/src/gui/timeosd.cpp @@ -45,6 +45,7 @@ void CTimeOSD::Init() { paint_bg = g_settings.infoClockBackground; m_time_show = time(0); + m_mode = MODE_ASC; //use current theme colors setColorAll(COL_MENUCONTENT_PLUS_6, COL_MENUCONTENT_PLUS_0, COL_MENUCONTENTDARK_PLUS_0); From d9d2adfc05bdf6ae379447c2e72b5509fb729880 Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Fri, 1 Jan 2016 19:19:53 +0100 Subject: [PATCH 02/44] CTimeOSD: decouple timeosd from general clock format settings Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/e50d205574e5490f50f78ad38f77c28ce225d249 Author: Thilo Graf Date: 2016-01-01 (Fri, 01 Jan 2016) ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- src/gui/timeosd.cpp | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/gui/timeosd.cpp b/src/gui/timeosd.cpp index 7c46ff79e..fdc97b3a7 100644 --- a/src/gui/timeosd.cpp +++ b/src/gui/timeosd.cpp @@ -59,11 +59,6 @@ void CTimeOSD::Init() setColorBody(COL_BACKGROUND_PLUS_0); } - if (g_settings.infoClockSeconds) - setClockFormat("%H:%M:%S"); - else - setClockFormat("%H:%M", "%H %M"); - //set height, NOTE: height is strictly bound to settings if (g_settings.infoClockFontSize != height){ height = g_settings.infoClockFontSize; From 78413e483646fbcff5cee0bc6dbf444a994d9e7f Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Fri, 1 Jan 2016 21:20:45 +0100 Subject: [PATCH 03/44] CInfoViewer: fix assign corner and shadow modes, depends of virtual zap mode Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/74bb998c402b84fcb128448e1750952efa793fe0 Author: Thilo Graf Date: 2016-01-01 (Fri, 01 Jan 2016) ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- src/gui/infoviewer.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/gui/infoviewer.cpp b/src/gui/infoviewer.cpp index 00642447e..a10312dd0 100644 --- a/src/gui/infoviewer.cpp +++ b/src/gui/infoviewer.cpp @@ -434,10 +434,14 @@ void CInfoViewer::paintBody() { int h_body = InfoHeightY - header_height + (g_settings.infobar_casystem_display < 2 ? infoViewerBB->bottom_bar_offset : 0); if (body == NULL) - body = new CComponentsShapeSquare(ChanInfoX, ChanNameY + header_height, BoxEndX-ChanInfoX, h_body, NULL, CC_SHADOW_RIGHT); + body = new CComponentsShapeSquare(ChanInfoX, ChanNameY + header_height, BoxEndX-ChanInfoX, h_body); else body->setDimensionsAll(ChanInfoX, ChanNameY + header_height, BoxEndX-ChanInfoX, h_body); + //set corner and shadow modes, consider virtual zap mode + body->setCorner(RADIUS_LARGE, virtual_zap_mode ? CORNER_BOTTOM : CORNER_NONE); + body->enableShadow(virtual_zap_mode ? CC_SHADOW_ON : CC_SHADOW_RIGHT); + body->setColorBody(g_settings.theme.infobar_gradient_body ? COL_MENUHEAD_PLUS_0 : COL_INFOBAR_PLUS_0); body->enableColBodyGradient(g_settings.theme.infobar_gradient_body, COL_INFOBAR_PLUS_0, g_settings.theme.infobar_gradient_body_direction); From 70fa034418bdea4b412c0a338315c623d71c9ea9 Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Sat, 2 Jan 2016 00:10:20 +0100 Subject: [PATCH 04/44] CPlugins: try to fix possible segfault while open shellwindow scripts Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/f54f1d0805a52075b381a62557483253fce2198b Author: Thilo Graf Date: 2016-01-02 (Sat, 02 Jan 2016) ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- src/gui/plugins.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/gui/plugins.cpp b/src/gui/plugins.cpp index e6e3560e4..99466f548 100644 --- a/src/gui/plugins.cpp +++ b/src/gui/plugins.cpp @@ -409,7 +409,8 @@ void CPlugins::startScriptPlugin(int number) chmod(script, 0755); if (plugin_list[number].shellwindow) { - CShellWindow(script, CShellWindow::VERBOSE | CShellWindow::ACKNOWLEDGE); + int res = 0; + CShellWindow (script, CShellWindow::VERBOSE | CShellWindow::ACKNOWLEDGE, &res); scriptOutput = ""; } else From d8269b9be555dc88f6e5f45cf962b32d5dbab8cd Mon Sep 17 00:00:00 2001 From: vanhofen Date: Sat, 2 Jan 2016 12:18:06 +0100 Subject: [PATCH 05/44] locale: add usermenu title locales ... some small reworks; cleanup from #if 0'ed code Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/5860045999c0a9d7c156ab56fc30a55e8e7e68d7 Author: vanhofen Date: 2016-01-02 (Sat, 02 Jan 2016) Origin message was: ------------------ - locale: add usermenu title locales ... some small reworks; cleanup from #if 0'ed code ------------------ This commit was generated by Migit --- data/locale/deutsch.locale | 11 ++++++----- data/locale/english.locale | 17 +++++++++-------- src/gui/channellist.cpp | 2 +- src/gui/user_menue.cpp | 7 ++++--- src/gui/user_menue.h | 6 +++--- src/gui/user_menue_setup.cpp | 2 +- src/gui/user_menue_setup.h | 8 ++++---- src/neutrino.cpp | 22 +++++----------------- src/system/locals.h | 9 +++++---- src/system/locals_intern.h | 9 +++++---- 10 files changed, 43 insertions(+), 50 deletions(-) diff --git a/data/locale/deutsch.locale b/data/locale/deutsch.locale index 4eb12d295..ca2b70c07 100644 --- a/data/locale/deutsch.locale +++ b/data/locale/deutsch.locale @@ -779,8 +779,6 @@ imageinfo.version Version: inetradio.name Internetradio infoviewer.epgnotload Informationen noch nicht geladen... infoviewer.epgwait Warte auf EPG-Informationen... -infoviewer.eventlist EPG/Vorschau -infoviewer.languages Tonwahl infoviewer.motor_moving Antennenpositionierung infoviewer.next Später infoviewer.nocurrent Keine Info zu laufendem Programm @@ -788,10 +786,8 @@ infoviewer.noepg Keine EPG-Information verfügbar infoviewer.notavailable Kanal (zur Zeit) nicht verfügbar infoviewer.now Jetzt infoviewer.selecttime Startzeiten -infoviewer.streaminfo Erweiterungen infoviewer.subchan_disp_pos Unterkanalanzeige infoviewer.subchan_infobar Infobar -infoviewer.subservice Bildregie infoviewer.waittime Warte auf Uhrzeit... ipsetup.hint_1 Benutzen Sie 0..9 oder hoch/runter ipsetup.hint_2 OK speichert, EXIT bricht ab @@ -1858,7 +1854,8 @@ nfsmenu.head NFS/CIFS/FTPFS Einstellungen nvod.percentage (%d%% vorbei) nvod.starting (Beginn in %d min) nvodselector.directormode Bildregie-Modus -nvodselector.head Anfangszeit auswählen +nvodselector.head Bildregie +nvodselector.starttime Anfangszeit auswählen nvodselector.subservice Perspektiven opkg.button.expert_off Standard-Modus opkg.button.expert_on Experten-Modus @@ -2355,6 +2352,10 @@ usermenu.msg_info_is_empty Es wurde kein Name für dieses Menü vergeben.\nVerwe usermenu.msg_warning_name Sie haben mehrere Menüpunkte für dieses Menü angelegt,\naber keinen neuen Namen festgelegt.\nEs ist daher empfohlen, einen neuen Namen zu vergeben! usermenu.msg_warning_no_items Sie haben keine Menüpunkte für dieses Menü angelegt!\nDer Menüname wird daher zurückgesetzt! usermenu.name Name +usermenu.title_blue Erweiterungen +usermenu.title_green Tonwahl +usermenu.title_red EPG +usermenu.title_yellow Bildregie video_mode_ok Video-Einstellungen OK? videomenu.43mode 4:3 Anzeigeverhalten videomenu.analog_auto AUTO diff --git a/data/locale/english.locale b/data/locale/english.locale index 2debf79f3..6454f6a6c 100644 --- a/data/locale/english.locale +++ b/data/locale/english.locale @@ -779,8 +779,6 @@ imageinfo.version Version: inetradio.name Internetradio infoviewer.epgnotload EPG not loaded.... infoviewer.epgwait waiting for EPG... -infoviewer.eventlist Event-List -infoviewer.languages Audio infoviewer.motor_moving Antenna positioning infoviewer.next next infoviewer.nocurrent No info for current program available @@ -788,10 +786,8 @@ infoviewer.noepg EPG not available infoviewer.notavailable Channel not available infoviewer.now now infoviewer.selecttime Timeselection -infoviewer.streaminfo Features infoviewer.subchan_disp_pos Subchannel display infoviewer.subchan_infobar Full infobar -infoviewer.subservice Subservices infoviewer.waittime Waiting for time... ipsetup.hint_1 Use 0..9, or use Up/Down, ipsetup.hint_2 OK saves, Exit aborts @@ -1455,7 +1451,7 @@ miscsettings.epg_dir EPG save path miscsettings.epg_extendedcache EPG Long Description (hours) miscsettings.epg_extendedcache_hint1 How long into the future will EPG extended descriptions miscsettings.epg_extendedcache_hint2 be Cached? (Set in hours) -miscsettings.epg_head Epg +miscsettings.epg_head EPG miscsettings.epg_max_events Max. Events miscsettings.epg_max_events_hint1 How many events should be stored? miscsettings.epg_max_events_hint2 normaly 6000, 0 to disable limit @@ -1857,9 +1853,10 @@ nfs.username username nfsmenu.head NFS/CIFS/FTPFS settings nvod.percentage (%d%% over) nvod.starting (starting in %d min) -nvodselector.directormode Direct-Mode -nvodselector.head Select starting-time -nvodselector.subservice Select Subservice +nvodselector.directormode Director mode +nvodselector.head Subservices +nvodselector.starttime Select starting time +nvodselector.subservice Select subservice opkg.button.expert_off Standard mode opkg.button.expert_on Expert mode opkg.button.info Package information @@ -2355,6 +2352,10 @@ usermenu.msg_info_is_empty You don't have definied a name for this menu!\nUsing usermenu.msg_warning_name You have more than one items created for this menu,\nbut none new name for this menue defined.\nIt is recommended to enter a new name! usermenu.msg_warning_no_items No items defined!\nThe menu name is reset! usermenu.name Name +usermenu.title_blue Features +usermenu.title_green Audio +usermenu.title_red Event-List +usermenu.title_yellow Subservices video_mode_ok Is this video mode working ok ? videomenu.43mode 4:3 Content mode videomenu.analog_auto AUTO diff --git a/src/gui/channellist.cpp b/src/gui/channellist.cpp index bd39251b3..bfa476dd6 100644 --- a/src/gui/channellist.cpp +++ b/src/gui/channellist.cpp @@ -1708,7 +1708,7 @@ void CChannelList::showChannelLogo() //TODO: move into an own handler, eg. heade #define NUM_LIST_BUTTONS_SORT 9 struct button_label SChannelListButtons_SMode[NUM_LIST_BUTTONS_SORT] = { - { NEUTRINO_ICON_BUTTON_RED, LOCALE_INFOVIEWER_EVENTLIST}, + { NEUTRINO_ICON_BUTTON_RED, LOCALE_MISCSETTINGS_EPG_HEAD}, { NEUTRINO_ICON_BUTTON_GREEN, LOCALE_CHANNELLIST_FOOT_SORT_ALPHA}, { NEUTRINO_ICON_BUTTON_YELLOW, LOCALE_BOUQUETLIST_HEAD}, { NEUTRINO_ICON_BUTTON_BLUE, LOCALE_INFOVIEWER_NEXT}, diff --git a/src/gui/user_menue.cpp b/src/gui/user_menue.cpp index bb6109591..b5a42917d 100644 --- a/src/gui/user_menue.cpp +++ b/src/gui/user_menue.cpp @@ -265,14 +265,15 @@ bool CUserMenu::showUserMenu(neutrino_msg_t msg) if (g_RemoteControl->subChannels.empty()) break; // NVOD/SubService- Kanal! - CMenuWidget *tmpNVODSelector = new CMenuWidget(g_RemoteControl->are_subchannels ? LOCALE_NVODSELECTOR_SUBSERVICE : LOCALE_NVODSELECTOR_HEAD, NEUTRINO_ICON_VIDEO); + CMenuWidget *tmpNVODSelector = new CMenuWidget(g_RemoteControl->are_subchannels ? LOCALE_NVODSELECTOR_SUBSERVICE : LOCALE_NVODSELECTOR_STARTTIME, NEUTRINO_ICON_VIDEO); if (!subchanselect.getNVODMenu(tmpNVODSelector)) { delete tmpNVODSelector; break; } keyhelper.get(&key,&icon); - menu_item = new CMenuDForwarder(g_RemoteControl->are_subchannels ? LOCALE_NVODSELECTOR_SUBSERVICE : LOCALE_NVODSELECTOR_HEAD, true, NULL, tmpNVODSelector, "-1", key,icon); + menu_item = new CMenuDForwarder(g_RemoteControl->are_subchannels ? LOCALE_NVODSELECTOR_SUBSERVICE : LOCALE_NVODSELECTOR_STARTTIME, true, NULL, tmpNVODSelector, "-1", key,icon); // FIXME menu_item->setHint("", NONEXISTANT_LOCALE); + break; } case SNeutrinoSettings::ITEM_TECHINFO: @@ -518,7 +519,7 @@ const char *CUserMenu::getUserMenuButtonName(int button, bool &active, bool retu case SNeutrinoSettings::ITEM_SUBCHANNEL: if (!g_RemoteControl->subChannels.empty()) { if(loc == NONEXISTANT_LOCALE && !text) - loc = g_RemoteControl->are_subchannels ? LOCALE_NVODSELECTOR_SUBSERVICE : LOCALE_NVODSELECTOR_HEAD; + loc = g_RemoteControl->are_subchannels ? LOCALE_NVODSELECTOR_SUBSERVICE : LOCALE_NVODSELECTOR_STARTTIME; else return_title = true; active = true; diff --git a/src/gui/user_menue.h b/src/gui/user_menue.h index 33a90f0c2..c5b801c17 100644 --- a/src/gui/user_menue.h +++ b/src/gui/user_menue.h @@ -57,10 +57,10 @@ typedef struct user_menu_data_t #define COL_BUTTONMAX SNeutrinoSettings::BUTTON_MAX static user_menu_data_t user_menu[COL_BUTTONMAX] = { - {LOCALE_INFOVIEWER_EVENTLIST , CRCInput::RC_red , NEUTRINO_ICON_BUTTON_RED , NEUTRINO_ICON_RED, -1}, - {LOCALE_INFOVIEWER_LANGUAGES , CRCInput::RC_green , NEUTRINO_ICON_BUTTON_GREEN , NEUTRINO_ICON_GREEN, -1}, + {LOCALE_USERMENU_TITLE_RED , CRCInput::RC_red , NEUTRINO_ICON_BUTTON_RED , NEUTRINO_ICON_RED, -1}, + {LOCALE_USERMENU_TITLE_GREEN , CRCInput::RC_green , NEUTRINO_ICON_BUTTON_GREEN , NEUTRINO_ICON_GREEN, -1}, {NONEXISTANT_LOCALE , CRCInput::RC_yellow , NEUTRINO_ICON_BUTTON_YELLOW , NEUTRINO_ICON_YELLOW, -1}, - {LOCALE_INFOVIEWER_STREAMINFO , CRCInput::RC_blue , NEUTRINO_ICON_BUTTON_BLUE , NEUTRINO_ICON_FEATURES, -1} + {LOCALE_USERMENU_TITLE_BLUE , CRCInput::RC_blue , NEUTRINO_ICON_BUTTON_BLUE , NEUTRINO_ICON_FEATURES, -1} }; // const neutrino_msg_t col_key_helper_msg_def[COL_BUTTONMAX]={CRCInput::RC_red,CRCInput::RC_green,CRCInput::RC_yellow,CRCInput::RC_blue}; diff --git a/src/gui/user_menue_setup.cpp b/src/gui/user_menue_setup.cpp index 7fd2d38aa..b21ca131c 100644 --- a/src/gui/user_menue_setup.cpp +++ b/src/gui/user_menue_setup.cpp @@ -80,7 +80,7 @@ static keyvals usermenu_items[] = { SNeutrinoSettings::ITEM_EPG_INFO, LOCALE_EPGMENU_EVENTINFO, usermenu_show }, { SNeutrinoSettings::ITEM_EPG_MISC, LOCALE_USERMENU_ITEM_EPG_MISC, usermenu_show }, { SNeutrinoSettings::ITEM_AUDIO_SELECT, LOCALE_AUDIOSELECTMENUE_HEAD, usermenu_show }, - { SNeutrinoSettings::ITEM_SUBCHANNEL, LOCALE_INFOVIEWER_SUBSERVICE, usermenu_show }, + { SNeutrinoSettings::ITEM_SUBCHANNEL, LOCALE_NVODSELECTOR_HEAD, usermenu_show }, { SNeutrinoSettings::ITEM_FILEPLAY, LOCALE_MOVIEPLAYER_FILEPLAYBACK, usermenu_show }, { SNeutrinoSettings::ITEM_AUDIOPLAY, LOCALE_AUDIOPLAYER_NAME, usermenu_show }, { SNeutrinoSettings::ITEM_INETPLAY, LOCALE_INETRADIO_NAME, usermenu_show }, diff --git a/src/gui/user_menue_setup.h b/src/gui/user_menue_setup.h index 088e135e6..f622eadf5 100644 --- a/src/gui/user_menue_setup.h +++ b/src/gui/user_menue_setup.h @@ -53,10 +53,10 @@ typedef struct usermenu_props_t #define USERMENU_ITEMS_COUNT SNeutrinoSettings::BUTTON_MAX const struct usermenu_props_t usermenu[USERMENU_ITEMS_COUNT] = { - {LOCALE_USERMENU_BUTTON_RED , SNeutrinoSettings::BUTTON_RED , CRCInput::RC_red ,NEUTRINO_ICON_BUTTON_RED ,LOCALE_INFOVIEWER_EVENTLIST }, - {LOCALE_USERMENU_BUTTON_GREEN , SNeutrinoSettings::BUTTON_GREEN , CRCInput::RC_green ,NEUTRINO_ICON_BUTTON_GREEN ,LOCALE_AUDIOSELECTMENUE_HEAD }, - {LOCALE_USERMENU_BUTTON_YELLOW , SNeutrinoSettings::BUTTON_YELLOW , CRCInput::RC_yellow ,NEUTRINO_ICON_BUTTON_YELLOW ,LOCALE_INFOVIEWER_SUBSERVICE }, - {LOCALE_USERMENU_BUTTON_BLUE , SNeutrinoSettings::BUTTON_BLUE , CRCInput::RC_blue ,NEUTRINO_ICON_BUTTON_BLUE ,LOCALE_INFOVIEWER_STREAMINFO } + {LOCALE_USERMENU_BUTTON_RED , SNeutrinoSettings::BUTTON_RED , CRCInput::RC_red ,NEUTRINO_ICON_BUTTON_RED ,LOCALE_USERMENU_TITLE_RED }, + {LOCALE_USERMENU_BUTTON_GREEN , SNeutrinoSettings::BUTTON_GREEN , CRCInput::RC_green ,NEUTRINO_ICON_BUTTON_GREEN ,LOCALE_USERMENU_TITLE_GREEN }, + {LOCALE_USERMENU_BUTTON_YELLOW , SNeutrinoSettings::BUTTON_YELLOW , CRCInput::RC_yellow ,NEUTRINO_ICON_BUTTON_YELLOW ,LOCALE_USERMENU_TITLE_YELLOW }, + {LOCALE_USERMENU_BUTTON_BLUE , SNeutrinoSettings::BUTTON_BLUE , CRCInput::RC_blue ,NEUTRINO_ICON_BUTTON_BLUE ,LOCALE_USERMENU_TITLE_BLUE } }; diff --git a/src/neutrino.cpp b/src/neutrino.cpp index a973136dc..b98cc91f7 100644 --- a/src/neutrino.cpp +++ b/src/neutrino.cpp @@ -283,14 +283,7 @@ const lcd_setting_struct_t lcd_setting[SNeutrinoSettings::LCD_SETTING_COUNT] = ,{ "lcd_epgmode" , 0 /*DEFAULT_LCD_EPGMODE*/ } #endif }; -#if 0 -const char* usermenu_default[SNeutrinoSettings::BUTTON_MAX]={ - "2,3,4,13", // RED - "6", // GREEN - "7", // YELLOW - "12,11,20,21,19,14,15" // BLUE -}; -#endif + static SNeutrinoSettings::usermenu_t usermenu_default[] = { { CRCInput::RC_red, "2,3,4,13", "", "red" }, { CRCInput::RC_green, "6", "", "green" }, @@ -298,11 +291,6 @@ static SNeutrinoSettings::usermenu_t usermenu_default[] = { { CRCInput::RC_blue, "12,11,20,21,19,14,29,30,15", "", "blue" }, { CRCInput::RC_play, "9", "", "5" }, { CRCInput::RC_audio, "27", "", "6" }, -#if 0 - { CRCInput::RC_timer, "19", "", "7" }, - { CRCInput::RC_usb, "31", "", "6" }, - { CRCInput::RC_archive, "30", "", "4" }, -#endif { CRCInput::RC_nokey, "", "", "" }, }; @@ -1916,13 +1904,13 @@ TIMER_START(); // default usermenu titles correspond to gui/user_menue_setup.h:struct usermenu_props_t usermenu if (g_settings.usermenu[0]->title.empty()) - g_settings.usermenu[0]->title = g_Locale->getText(LOCALE_INFOVIEWER_EVENTLIST); + g_settings.usermenu[0]->title = g_Locale->getText(LOCALE_USERMENU_TITLE_RED); if (g_settings.usermenu[1]->title.empty()) - g_settings.usermenu[1]->title = g_Locale->getText(LOCALE_AUDIOSELECTMENUE_HEAD); + g_settings.usermenu[1]->title = g_Locale->getText(LOCALE_USERMENU_TITLE_GREEN); if (g_settings.usermenu[2]->title.empty()) - g_settings.usermenu[2]->title = g_Locale->getText(LOCALE_INFOVIEWER_SUBSERVICE); + g_settings.usermenu[2]->title = g_Locale->getText(LOCALE_USERMENU_TITLE_YELLOW); if (g_settings.usermenu[3]->title.empty()) - g_settings.usermenu[3]->title = g_Locale->getText(LOCALE_INFOVIEWER_STREAMINFO); + g_settings.usermenu[3]->title = g_Locale->getText(LOCALE_USERMENU_TITLE_BLUE); /* setup GUI */ neutrinoFonts = CNeutrinoFonts::getInstance(); diff --git a/src/system/locals.h b/src/system/locals.h index 1323053fa..fdc3e8519 100644 --- a/src/system/locals.h +++ b/src/system/locals.h @@ -806,8 +806,6 @@ typedef enum LOCALE_INETRADIO_NAME, LOCALE_INFOVIEWER_EPGNOTLOAD, LOCALE_INFOVIEWER_EPGWAIT, - LOCALE_INFOVIEWER_EVENTLIST, - LOCALE_INFOVIEWER_LANGUAGES, LOCALE_INFOVIEWER_MOTOR_MOVING, LOCALE_INFOVIEWER_NEXT, LOCALE_INFOVIEWER_NOCURRENT, @@ -815,10 +813,8 @@ typedef enum LOCALE_INFOVIEWER_NOTAVAILABLE, LOCALE_INFOVIEWER_NOW, LOCALE_INFOVIEWER_SELECTTIME, - LOCALE_INFOVIEWER_STREAMINFO, LOCALE_INFOVIEWER_SUBCHAN_DISP_POS, LOCALE_INFOVIEWER_SUBCHAN_INFOBAR, - LOCALE_INFOVIEWER_SUBSERVICE, LOCALE_INFOVIEWER_WAITTIME, LOCALE_IPSETUP_HINT_1, LOCALE_IPSETUP_HINT_2, @@ -1886,6 +1882,7 @@ typedef enum LOCALE_NVOD_STARTING, LOCALE_NVODSELECTOR_DIRECTORMODE, LOCALE_NVODSELECTOR_HEAD, + LOCALE_NVODSELECTOR_STARTTIME, LOCALE_NVODSELECTOR_SUBSERVICE, LOCALE_OPKG_BUTTON_EXPERT_OFF, LOCALE_OPKG_BUTTON_EXPERT_ON, @@ -2382,6 +2379,10 @@ typedef enum LOCALE_USERMENU_MSG_WARNING_NAME, LOCALE_USERMENU_MSG_WARNING_NO_ITEMS, LOCALE_USERMENU_NAME, + LOCALE_USERMENU_TITLE_BLUE, + LOCALE_USERMENU_TITLE_GREEN, + LOCALE_USERMENU_TITLE_RED, + LOCALE_USERMENU_TITLE_YELLOW, LOCALE_VIDEO_MODE_OK, LOCALE_VIDEOMENU_43MODE, LOCALE_VIDEOMENU_ANALOG_AUTO, diff --git a/src/system/locals_intern.h b/src/system/locals_intern.h index 4a7a86c5b..00da45a71 100644 --- a/src/system/locals_intern.h +++ b/src/system/locals_intern.h @@ -806,8 +806,6 @@ const char * locale_real_names[] = "inetradio.name", "infoviewer.epgnotload", "infoviewer.epgwait", - "infoviewer.eventlist", - "infoviewer.languages", "infoviewer.motor_moving", "infoviewer.next", "infoviewer.nocurrent", @@ -815,10 +813,8 @@ const char * locale_real_names[] = "infoviewer.notavailable", "infoviewer.now", "infoviewer.selecttime", - "infoviewer.streaminfo", "infoviewer.subchan_disp_pos", "infoviewer.subchan_infobar", - "infoviewer.subservice", "infoviewer.waittime", "ipsetup.hint_1", "ipsetup.hint_2", @@ -1886,6 +1882,7 @@ const char * locale_real_names[] = "nvod.starting", "nvodselector.directormode", "nvodselector.head", + "nvodselector.starttime", "nvodselector.subservice", "opkg.button.expert_off", "opkg.button.expert_on", @@ -2382,6 +2379,10 @@ const char * locale_real_names[] = "usermenu.msg_warning_name", "usermenu.msg_warning_no_items", "usermenu.name", + "usermenu.title_blue", + "usermenu.title_green", + "usermenu.title_red", + "usermenu.title_yellow", "video_mode_ok", "videomenu.43mode", "videomenu.analog_auto", From 4a9d983042ff045a600e03d69fb7fda185ecffe4 Mon Sep 17 00:00:00 2001 From: vanhofen Date: Sat, 2 Jan 2016 11:54:08 +0100 Subject: [PATCH 06/44] neutrino: don't autofill usermenu title, when no items included This keeps init-code compatible to personalize-code (title is removed automatically, when no items are included). Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/c617f764abc1b347915b6ef7f3f7a7675a8574fb Author: vanhofen Date: 2016-01-02 (Sat, 02 Jan 2016) Origin message was: ------------------ - neutrino: don't autofill usermenu title, when no items included This keeps init-code compatible to personalize-code (title is removed automatically, when no items are included). ------------------ This commit was generated by Migit --- src/neutrino.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/neutrino.cpp b/src/neutrino.cpp index b98cc91f7..871f09e5d 100644 --- a/src/neutrino.cpp +++ b/src/neutrino.cpp @@ -1903,13 +1903,13 @@ TIMER_START(); } // default usermenu titles correspond to gui/user_menue_setup.h:struct usermenu_props_t usermenu - if (g_settings.usermenu[0]->title.empty()) + if (g_settings.usermenu[0]->title.empty() && !g_settings.usermenu[0]->items.empty()) g_settings.usermenu[0]->title = g_Locale->getText(LOCALE_USERMENU_TITLE_RED); - if (g_settings.usermenu[1]->title.empty()) + if (g_settings.usermenu[1]->title.empty() && !g_settings.usermenu[1]->items.empty()) g_settings.usermenu[1]->title = g_Locale->getText(LOCALE_USERMENU_TITLE_GREEN); - if (g_settings.usermenu[2]->title.empty()) + if (g_settings.usermenu[2]->title.empty() && !g_settings.usermenu[2]->items.empty()) g_settings.usermenu[2]->title = g_Locale->getText(LOCALE_USERMENU_TITLE_YELLOW); - if (g_settings.usermenu[3]->title.empty()) + if (g_settings.usermenu[3]->title.empty() && !g_settings.usermenu[3]->items.empty()) g_settings.usermenu[3]->title = g_Locale->getText(LOCALE_USERMENU_TITLE_BLUE); /* setup GUI */ From f2abacb4a7a1edd4cef0114f6f97624377f03e95 Mon Sep 17 00:00:00 2001 From: vanhofen Date: Sat, 2 Jan 2016 14:14:41 +0100 Subject: [PATCH 07/44] movieplayer: allow configurable RC_setup key Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/fdf8bd486089529875a71e607dbf734765c42dd9 Author: vanhofen Date: 2016-01-02 (Sat, 02 Jan 2016) Origin message was: ------------------ - movieplayer: allow configurable RC_setup key ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- src/gui/movieplayer.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gui/movieplayer.cpp b/src/gui/movieplayer.cpp index 1230e7929..f28953e74 100644 --- a/src/gui/movieplayer.cpp +++ b/src/gui/movieplayer.cpp @@ -987,8 +987,6 @@ void CMoviePlayerGui::PlayFileLoop(void) repeat_mode = REPEAT_OFF; g_settings.movieplayer_repeat_on = repeat_mode; callInfoViewer(); - } else if (msg == (neutrino_msg_t) CRCInput::RC_setup) { - CNeutrinoApp::getInstance()->handleMsg(NeutrinoMessages::SHOW_MAINMENU, 0); } else if (msg == (neutrino_msg_t) g_settings.mpkey_play) { if (time_forced) { time_forced = false; @@ -1181,6 +1179,8 @@ void CMoviePlayerGui::PlayFileLoop(void) makeScreenShot(false, true); } else if (msg == CRCInput::RC_sat) { //FIXME do nothing ? + } else if (msg == (neutrino_msg_t) CRCInput::RC_setup) { + CNeutrinoApp::getInstance()->handleMsg(NeutrinoMessages::SHOW_MAINMENU, 0); } else if (msg == CRCInput::RC_red || msg == CRCInput::RC_green || msg == CRCInput::RC_yellow || msg == CRCInput::RC_blue ) { //maybe move FileTime.kill to Usermenu to simplify this call bool restore = FileTime.IsVisible(); From f47a85bd26beffe7d2c00bdec0656301b25a69de Mon Sep 17 00:00:00 2001 From: defans Date: Sun, 3 Jan 2016 12:24:59 +0100 Subject: [PATCH 08/44] movieplayer: Add screensaver function when movie player is paused Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/f661cb2ee3121ba7fc3fe48f2a5fa33416b87596 Author: defans Date: 2016-01-03 (Sun, 03 Jan 2016) ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- src/gui/movieplayer.cpp | 43 +++++++++++++++++++++++++++++++++++++++++ src/gui/movieplayer.h | 5 +++++ 2 files changed, 48 insertions(+) diff --git a/src/gui/movieplayer.cpp b/src/gui/movieplayer.cpp index f28953e74..697c8927e 100644 --- a/src/gui/movieplayer.cpp +++ b/src/gui/movieplayer.cpp @@ -44,6 +44,7 @@ #include #include #include +#include #include #include #include @@ -190,6 +191,7 @@ void CMoviePlayerGui::Init(void) keyPressed = CMoviePlayerGui::PLUGIN_PLAYSTATE_NORMAL; isLuaPlay = false; blockedFromPlugin = false; + m_screensaver=false; } void CMoviePlayerGui::cutNeutrino() @@ -952,6 +954,32 @@ void CMoviePlayerGui::PlayFileLoop(void) } showSubtitle(0); + if (playstate == CMoviePlayerGui::PAUSE && (msg == CRCInput::RC_timeout || msg == NeutrinoMessages::EVT_TIMER)) + { + int delay = time(NULL) - m_idletime; + int screensaver_delay = g_settings.screensaver_delay; + if (screensaver_delay != 0 && delay > screensaver_delay*60 && !m_screensaver) { + videoDecoder->setBlank(true); + screensaver(true); + } + } + else + { + m_idletime = time(NULL); + if (m_screensaver) + { + videoDecoder->setBlank(false); + screensaver(false); + //ignore first keypress stop - just quit the screensaver and call infoviewer + if (msg == CRCInput::RC_stop) { + g_RCInput->clearRCMsg(); + callInfoViewer(); + continue; + } + + } + } + if (msg == (neutrino_msg_t) g_settings.mpkey_plugin) { g_PluginList->startPlugin_by_name(g_settings.movieplayer_plugin.c_str ()); } else if (msg == (neutrino_msg_t) g_settings.mpkey_stop) { @@ -2238,3 +2266,18 @@ size_t CMoviePlayerGui::GetReadCount() //printf("GetReadCount: %lld\n", res); return (size_t) res; } + +void CMoviePlayerGui::screensaver(bool on) +{ + if (on) + { + m_screensaver = true; + CScreenSaver::getInstance()->Start(); + } + else + { + CScreenSaver::getInstance()->Stop(); + m_screensaver = false; + m_idletime = time(NULL); + } +} diff --git a/src/gui/movieplayer.h b/src/gui/movieplayer.h index ba1f2fadf..fcef1ea6f 100644 --- a/src/gui/movieplayer.h +++ b/src/gui/movieplayer.h @@ -107,6 +107,11 @@ class CMoviePlayerGui : public CMenuTarget unsigned short currentapid, currentac3; repeat_mode_enum repeat_mode; + /* screensaver */ + int m_idletime; + bool m_screensaver; + void screensaver(bool on); + /* subtitles vars */ unsigned short numsubs; std::string slanguage[MAX_PLAYBACK_PIDS]; From 1f45b9041e3a40dc584d4af9904d84144f09cefb Mon Sep 17 00:00:00 2001 From: Michael Liebmann Date: Sun, 3 Jan 2016 12:56:36 +0100 Subject: [PATCH 09/44] Remove redundant pthread_cancel() call Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/0e68d504c956c0e5bf322687fa3efabd796ccf8b Author: Michael Liebmann Date: 2016-01-03 (Sun, 03 Jan 2016) ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- src/gui/screensaver.cpp | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/gui/screensaver.cpp b/src/gui/screensaver.cpp index f8b027c56..c6cb91405 100644 --- a/src/gui/screensaver.cpp +++ b/src/gui/screensaver.cpp @@ -112,10 +112,6 @@ void CScreenSaver::Stop() thrScreenSaver = 0; } - if(thrScreenSaver) - pthread_cancel(thrScreenSaver); - thrScreenSaver = 0; - if (scr_clock){ scr_clock->Stop(); delete scr_clock; From df0f6741a6683f00e4afe0ac6fd3dfcc97f9b288 Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Sun, 3 Jan 2016 16:48:03 +0100 Subject: [PATCH 10/44] CFlashUpdate: remove superfluous paint of progress This should fix remains on screen of progressbars after flashing or local updates. Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/ab29b2fa4378eea849d6d3b3f60967419c092a81 Author: Thilo Graf Date: 2016-01-03 (Sun, 03 Jan 2016) ------------------ This commit was generated by Migit --- src/gui/update.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/update.cpp b/src/gui/update.cpp index 83346a471..7853e338c 100644 --- a/src/gui/update.cpp +++ b/src/gui/update.cpp @@ -508,7 +508,7 @@ int CFlashUpdate::exec(CMenuTarget* parent, const std::string &actionKey) CVFD::getInstance()->setMode(CLCD::MODE_PROGRESSBAR2); #endif // VFD_UPDATE - showGlobalStatus(19); + paint(); showGlobalStatus(20); From 86191d473b2ad76956effe86f73ff6c6689d2146 Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Sun, 3 Jan 2016 14:29:20 +0100 Subject: [PATCH 11/44] CInfoViewer: try to fix overlapping current info and curren/next time info This effect was heavy to reproduce, but some useres had such effects. Hold saved background and hide() ensure clean background before repaint title and rest. Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/ec701e310823dcb61a045289f094445d3f3a54a0 Author: Thilo Graf Date: 2016-01-03 (Sun, 03 Jan 2016) ------------------ This commit was generated by Migit --- src/gui/infoviewer.cpp | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/src/gui/infoviewer.cpp b/src/gui/infoviewer.cpp index a10312dd0..81189ffa5 100644 --- a/src/gui/infoviewer.cpp +++ b/src/gui/infoviewer.cpp @@ -1624,7 +1624,13 @@ void CInfoViewer::display_Info(const char *current, const char *next, else txt_cur_event->setDimensionsAll(xStart, CurrInfoY - height, currTimeX - xStart - 5, height); txt_cur_event->setText(current, CTextBox::NO_AUTO_LINEBREAK, g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_INFO], colored_event_C ? COL_COLORED_EVENTS_TEXT : COL_INFOBAR_TEXT); - txt_cur_event->paint(CC_SAVE_SCREEN_NO); + + if (txt_cur_event_rest && txt_cur_event_rest->isPainted()) + txt_cur_event_rest->hide(); + if (txt_cur_event && txt_cur_event->isPainted()) + txt_cur_event->hide(); + + txt_cur_event->paint(CC_SAVE_SCREEN_YES); if (runningStart){ if (txt_cur_start == NULL) txt_cur_start = new CComponentsTextTransp(NULL, InfoX, CurrInfoY - height, info_time_width, height); @@ -1640,7 +1646,7 @@ void CInfoViewer::display_Info(const char *current, const char *next, else txt_cur_event_rest->setDimensionsAll(currTimeX, CurrInfoY - height, currTimeW, height); txt_cur_event_rest->setText(runningRest, CTextBox::RIGHT, g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_INFO], colored_event_C ? COL_COLORED_EVENTS_TEXT : COL_INFOBAR_TEXT); - txt_cur_event_rest->paint(CC_SAVE_SCREEN_NO); + txt_cur_event_rest->paint(CC_SAVE_SCREEN_YES); } } @@ -1981,18 +1987,18 @@ void CInfoViewer::killTitle() sigbox->kill(); #endif header->kill(); -#if 0 //not really required to kill clock, body does this +#if 0 //not really required to kill clock, header does this if (clock) clock->kill(); #endif body->kill(); -#if 0 //not really required to kill epg infos, body does this - if (txt_cur_start) - txt_cur_start->kill(); if (txt_cur_event) txt_cur_event->kill(); if (txt_cur_event_rest) txt_cur_event_rest->kill(); +#if 0 //not really required to kill epg infos, body does this + if (txt_cur_start) + txt_cur_start->kill(); if (txt_next_start) txt_next_start->kill(); if (txt_next_event) From 831d9442e2b0cec0060efd27960a7fb16867713f Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Sun, 3 Jan 2016 14:30:21 +0100 Subject: [PATCH 12/44] CComponentsItem: try to fix clean up screen buffers after killed items Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/976e0251ee40c93e46a6267144afbaf2043c7511 Author: Thilo Graf Date: 2016-01-03 (Sun, 03 Jan 2016) ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- src/gui/components/cc_item.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/gui/components/cc_item.cpp b/src/gui/components/cc_item.cpp index 4f9b242c4..9c938167c 100644 --- a/src/gui/components/cc_item.cpp +++ b/src/gui/components/cc_item.cpp @@ -135,6 +135,7 @@ void CComponentsItem::kill(const fb_pixel_t& bg_color, bool ignore_parent) else CComponents::kill(cc_parent->getColorBody(), cc_parent->getCornerRadius()); } + clearScreenBuffer(); } //synchronize colors for forms From ffebc0949842e0dc3c85938ecdf6ec29d3d1f9c7 Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Sun, 3 Jan 2016 14:38:42 +0100 Subject: [PATCH 13/44] CInfoViewer: ensure removing of timescale bar after killed infobar In some constellations it was possible that timescale was not removed from screen after closing of infoviewer. e.g. user switched from a channel with epg data to a channel without epg data and infobar was closed before epg data was complete arrived. btw: it seems INFOBAR_PROGRESSBAR_ARRANGEMENT_DEFAULT is not not really "default" Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/85ad35abdc3e897ddf47688ddd00b501bcb8d86f Author: Thilo Graf Date: 2016-01-03 (Sun, 03 Jan 2016) Origin message was: ------------------ CInfoViewer: ensure removing of timescale bar after killed infobar In some constellations it was possible that timescale was not removed from screen after closing of infoviewer. e.g. user switched from a channel with epg data to a channel without epg data and infobar was closed before epg data was complete arrived. btw: it seems INFOBAR_PROGRESSBAR_ARRANGEMENT_DEFAULT is not not really "default" ------------------ This commit was generated by Migit --- src/gui/infoviewer.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/gui/infoviewer.cpp b/src/gui/infoviewer.cpp index 81189ffa5..85542903d 100644 --- a/src/gui/infoviewer.cpp +++ b/src/gui/infoviewer.cpp @@ -232,6 +232,8 @@ void CInfoViewer::ResetPB() } if (timescale){ + if (g_settings.infobar_progressbar == SNeutrinoSettings::INFOBAR_PROGRESSBAR_ARRANGEMENT_DEFAULT) + timescale->kill(); delete timescale; timescale = NULL; } From cbc8a44595783c01b9531635f953ef6894bb742d Mon Sep 17 00:00:00 2001 From: vanhofen Date: Sun, 3 Jan 2016 20:42:58 +0100 Subject: [PATCH 14/44] locale: add cut/copy/truncate menu hints; thx to tewsbo for support Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/d88e40f41d03e3a0a31bb006ad01ecab7fd23c0d Author: vanhofen Date: 2016-01-03 (Sun, 03 Jan 2016) Origin message was: ------------------ - locale: add cut/copy/truncate menu hints; thx to tewsbo for support ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- data/locale/deutsch.locale | 8 ++++---- data/locale/english.locale | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/data/locale/deutsch.locale b/data/locale/deutsch.locale index ca2b70c07..6ca6b6d3c 100644 --- a/data/locale/deutsch.locale +++ b/data/locale/deutsch.locale @@ -1632,15 +1632,15 @@ moviebrowser.help_button_red Sortierung ändern moviebrowser.help_button_right Ansicht ändern moviebrowser.help_button_yellow Aktives Fenster wechseln moviebrowser.hide_series Verstecke Serien -moviebrowser.hint_copy_onefile -moviebrowser.hint_copy_several -moviebrowser.hint_cut +moviebrowser.hint_copy_onefile Erstellt aus den Sprungmarken des Films einen neuen Film +moviebrowser.hint_copy_several Erstellt aus den Sprungmarken des Films mehrere neue Filme +moviebrowser.hint_cut Schneidet die Sprungmarken aus dem Film und erstellt einen neuen Film moviebrowser.hint_jumpbackward Rücksprung in 5 Sekunden\n'0' zum Weitersehen moviebrowser.hint_jumpforward Werbung überspringen in 5 Sekunden\n'0' zum Ansehen moviebrowser.hint_movieend Filmende in 5 Sekunden\n'0' zum Weitersehen moviebrowser.hint_newbook_backward Neue Wiederholung gestartet.\n'%s' bestimmt die Endposition, '0' bricht ab. moviebrowser.hint_newbook_forward Neuer Werbesprung gestartet.\n'%s' bestimmt die Endposition, '0' bricht ab. -moviebrowser.hint_truncate +moviebrowser.hint_truncate Entfernt den Filmteil hinter der Filmende-Markierung moviebrowser.info_audio Audio moviebrowser.info_channel Kanal moviebrowser.info_file Datei diff --git a/data/locale/english.locale b/data/locale/english.locale index 6454f6a6c..70a88506a 100644 --- a/data/locale/english.locale +++ b/data/locale/english.locale @@ -1632,15 +1632,15 @@ moviebrowser.help_button_red Change sort moviebrowser.help_button_right Change view moviebrowser.help_button_yellow Switch active window moviebrowser.hide_series Hide series -moviebrowser.hint_copy_onefile -moviebrowser.hint_copy_several -moviebrowser.hint_cut +moviebrowser.hint_copy_onefile Creating one new movie from the bookmarks of the movie +moviebrowser.hint_copy_several Creating several new movies from the bookmarks of the movie +moviebrowser.hint_cut Cutting bookmarks from movie and creating one new movie moviebrowser.hint_jumpbackward Jump back in 5 seconds\n'0' to cancel moviebrowser.hint_jumpforward Jump forward in 5 seconds\n'0' to cancel moviebrowser.hint_movieend Film end in 5 seconds\n'0' to cancel moviebrowser.hint_newbook_backward New jump back started\n'%s' to define endposition, '0' to cancel moviebrowser.hint_newbook_forward New jump forward started\n'%s' to define endposition, '0' to cancel -moviebrowser.hint_truncate +moviebrowser.hint_truncate Truncating all data beyond the end-bookmark moviebrowser.info_audio Audio moviebrowser.info_channel Channel moviebrowser.info_file File From 02eaf5358975ff02c86a46e4c6ecd047d3a1eec4 Mon Sep 17 00:00:00 2001 From: defans Date: Sun, 3 Jan 2016 21:09:37 +0100 Subject: [PATCH 15/44] CInfoViewer: fix infobar size in virtual zap mode Signed-off-by: Thilo Graf Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/64c412071a0f641856c1d89566391295ba45f85d Author: defans Date: 2016-01-03 (Sun, 03 Jan 2016) ------------------ This commit was generated by Migit --- src/gui/infoviewer.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/gui/infoviewer.cpp b/src/gui/infoviewer.cpp index 85542903d..81a4970ce 100644 --- a/src/gui/infoviewer.cpp +++ b/src/gui/infoviewer.cpp @@ -435,6 +435,10 @@ void CInfoViewer::paintHead() void CInfoViewer::paintBody() { int h_body = InfoHeightY - header_height + (g_settings.infobar_casystem_display < 2 ? infoViewerBB->bottom_bar_offset : 0); + + if(virtual_zap_mode) + h_body -= (g_settings.infobar_casystem_display < 2 ? infoViewerBB->bottom_bar_offset : 0); + if (body == NULL) body = new CComponentsShapeSquare(ChanInfoX, ChanNameY + header_height, BoxEndX-ChanInfoX, h_body); else From a2d14f83e10c45ab64fc10296c3c61b623df6c27 Mon Sep 17 00:00:00 2001 From: vanhofen Date: Sun, 3 Jan 2016 21:49:20 +0100 Subject: [PATCH 16/44] CShellWindow: fix textbox position Signed-off-by: Thilo Graf Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/a6537c766bb4958c3a8222db16031769e4496e81 Author: vanhofen Date: 2016-01-03 (Sun, 03 Jan 2016) ------------------ This commit was generated by Migit --- src/gui/widget/shellwindow.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/widget/shellwindow.cpp b/src/gui/widget/shellwindow.cpp index da1f1ed53..4c477f7ba 100644 --- a/src/gui/widget/shellwindow.cpp +++ b/src/gui/widget/shellwindow.cpp @@ -89,7 +89,7 @@ void CShellWindow::exec() int w_shell = frameBuffer->getScreenWidth(); unsigned int lines_max = h_shell / font->getHeight(); list lines; - CBox textBoxPosition(frameBuffer->getScreenX(), frameBuffer->getScreenX(), w_shell, h_shell); + CBox textBoxPosition(frameBuffer->getScreenX(), frameBuffer->getScreenY(), w_shell, h_shell); if (textBox == NULL){ textBox = new CTextBox(cmd.c_str(), font, CTextBox::BOTTOM, &textBoxPosition); textBox->enableSaveScreen(false); From 72e442a51eaf78bd11cf797520c56d582bc229a7 Mon Sep 17 00:00:00 2001 From: Jacek Jendrzej Date: Mon, 4 Jan 2016 13:50:36 +0100 Subject: [PATCH 17/44] src/gui/channellist.cpp fix possible segfault (heap-buffer-overflow) Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/597f10d92026034cd3b79e9ecfeea91bd6493a3b Author: Jacek Jendrzej Date: 2016-01-04 (Mon, 04 Jan 2016) ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- src/gui/channellist.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/gui/channellist.cpp b/src/gui/channellist.cpp index bfa476dd6..89bfcc921 100644 --- a/src/gui/channellist.cpp +++ b/src/gui/channellist.cpp @@ -1386,6 +1386,9 @@ int CChannelList::numericZap(int key) CZapitChannel* CChannelList::getPrevNextChannel(int key, unsigned int &sl) { + if(sl >= (*chanlist).size()) + sl = (*chanlist).size()-1; + CZapitChannel* channel = (*chanlist)[sl]; int bsize = bouquetList->Bouquets.size(); int bactive = bouquetList->getActiveBouquetNumber(); From 4c09a4b1b415d78ad5107d2990fa75f0bec31c43 Mon Sep 17 00:00:00 2001 From: Jacek Jendrzej Date: Mon, 4 Jan 2016 20:13:59 +0100 Subject: [PATCH 18/44] src/gui/infoviewer.cpp try to fix segfault after PB change Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/9aa1420ca7d1b05f9fc3ef6ab13b63711e402e3f Author: Jacek Jendrzej Date: 2016-01-04 (Mon, 04 Jan 2016) Origin message was: ------------------ src/gui/infoviewer.cpp try to fix segfault after PB change ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- src/gui/infoviewer.cpp | 6 ++++++ src/gui/infoviewer_bb.h | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/gui/infoviewer.cpp b/src/gui/infoviewer.cpp index 81a4970ce..1327af558 100644 --- a/src/gui/infoviewer.cpp +++ b/src/gui/infoviewer.cpp @@ -122,6 +122,9 @@ CInfoViewer::CInfoViewer () oldinfo.current_uniqueKey = 0; oldinfo.next_uniqueKey = 0; isVolscale = false; + info_time_width = 0; + timeoutEnd = 0; + sec_timer_id = 0; } CInfoViewer::~CInfoViewer() @@ -644,7 +647,10 @@ void CInfoViewer::reset_allScala() { changePB(); lastsig = lastsnr = -1; + infoViewerBB->changePB(); infoViewerBB->reset_allScala(); + if(!clock) + initClock(); } void CInfoViewer::check_channellogo_ca_SettingsChange() diff --git a/src/gui/infoviewer_bb.h b/src/gui/infoviewer_bb.h index 360898a21..4a7944028 100644 --- a/src/gui/infoviewer_bb.h +++ b/src/gui/infoviewer_bb.h @@ -118,7 +118,6 @@ class CInfoViewerBB void paint_ca_icons(int, const char*, int&); void paintCA_bar(int,int); void showOne_CAIcon(); - void changePB(void); static void* scrambledThread(void *arg); void scrambledCheck(bool force=false); @@ -153,6 +152,7 @@ class CInfoViewerBB CComponentsShapeSquare* getFooter(void){return foot;} CComponentsShapeSquare* getCABar(void){return cabar;} void ResetModules(void); + void changePB(void); }; #endif // __infoview_bb__ From 3601c4c9fc69051d4e5fd34381d9bccc6b073bec Mon Sep 17 00:00:00 2001 From: Stefan Seyfried Date: Mon, 4 Jan 2016 20:24:36 +0100 Subject: [PATCH 19/44] opkg_manager: don't use hardcoded path instead of "/var/tuxbox/config" use CONFIGDIR instead. Signed-off-by: Thilo Graf Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/09d7361f42a3dd8377d53b1eba459f74eb8c56ee Author: Stefan Seyfried Date: 2016-01-04 (Mon, 04 Jan 2016) ------------------ This commit was generated by Migit --- src/gui/opkg_manager.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gui/opkg_manager.cpp b/src/gui/opkg_manager.cpp index dd04a9e7a..b188b81e4 100644 --- a/src/gui/opkg_manager.cpp +++ b/src/gui/opkg_manager.cpp @@ -11,7 +11,7 @@ Adaptions: Copyright (C) 2013 martii gitorious.org/neutrino-mp/martiis-neutrino-mp - Copyright (C) 2015 Stefan Seyfried + Copyright (C) 2015-2016 Stefan Seyfried License: GPL @@ -67,7 +67,7 @@ #define OPKG_TEST_DIR OPKG_TMP_DIR "/test" #define OPKG_CL_CONFIG_OPTIONS " -V2 --tmp-dir=/tmp --cache=" OPKG_TMP_DIR -#define OPKG_BAD_PATTERN_LIST_FILE "/var/tuxbox/config/bad_package_pattern.list" +#define OPKG_BAD_PATTERN_LIST_FILE CONFIGDIR "/bad_package_pattern.list" #define OPKG_CONFIG_FILE "/etc/opkg/opkg.conf" using namespace std; From 79832e713cb33ac915180c690401ea5b97be7bca Mon Sep 17 00:00:00 2001 From: Stefan Seyfried Date: Mon, 4 Jan 2016 20:26:41 +0100 Subject: [PATCH 20/44] opkg_manager: remove reboot and restart trigger files Signed-off-by: Thilo Graf Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/662433c0c315051eb104e08771b8de0d89c8ed84 Author: Stefan Seyfried Date: 2016-01-04 (Mon, 04 Jan 2016) ------------------ This commit was generated by Migit --- src/gui/opkg_manager.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/gui/opkg_manager.cpp b/src/gui/opkg_manager.cpp index b188b81e4..2c687fc5f 100644 --- a/src/gui/opkg_manager.cpp +++ b/src/gui/opkg_manager.cpp @@ -555,6 +555,10 @@ int COPKGManager::showMenu() res = menu_return::RETURN_EXIT_ALL; } } + /* remove the package-generated files... */ + unlink("/tmp/.restart"); + unlink("/tmp/.force_restart"); + unlink("/tmp/.reboot"); delete menu; From d7319820d1027b5557506480dcc6db2420ebe1f6 Mon Sep 17 00:00:00 2001 From: Stefan Seyfried Date: Mon, 4 Jan 2016 20:28:39 +0100 Subject: [PATCH 21/44] opkg_manager: disable "key_up" after updating packages Signed-off-by: Thilo Graf I think too. Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/fccb831b050ed8d69c48ba9bfa3efa48f2eac5f0 Author: Stefan Seyfried Date: 2016-01-04 (Mon, 04 Jan 2016) ------------------ This commit was generated by Migit --- src/gui/opkg_manager.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/gui/opkg_manager.cpp b/src/gui/opkg_manager.cpp index 2c687fc5f..321f6b2f5 100644 --- a/src/gui/opkg_manager.cpp +++ b/src/gui/opkg_manager.cpp @@ -212,7 +212,9 @@ int COPKGManager::exec(CMenuTarget* parent, const string &actionKey) } else installed = true; refreshMenu(); + /* I don't think ending up at the last package in the list is a good idea... g_RCInput->postMsg((neutrino_msg_t) CRCInput::RC_up, 0); + */ return res; } From 6fc6079b0546fe2481706cf20ef59c8e5d1da1cf Mon Sep 17 00:00:00 2001 From: Stefan Seyfried Date: Mon, 4 Jan 2016 20:38:45 +0100 Subject: [PATCH 22/44] opkg_manager: disarm checkSize() function Signed-off-by: Thilo Graf You're right but opkg gives not really usable size values and nothing about dependencies. Solutions are welcome. Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/dd493eac8a2c4ba450c2f60ca7d06068757f51e4 Author: Stefan Seyfried Date: 2016-01-04 (Mon, 04 Jan 2016) ------------------ This commit was generated by Migit --- src/gui/opkg_manager.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/gui/opkg_manager.cpp b/src/gui/opkg_manager.cpp index 321f6b2f5..2737b5f32 100644 --- a/src/gui/opkg_manager.cpp +++ b/src/gui/opkg_manager.cpp @@ -249,6 +249,13 @@ bool COPKGManager::checkSize(const string& pkg_name) if (isInstalled(plain_pkg)) return true; + /* this is pretty broken right now for several reasons: + * space in /tmp is limited (/tmp being ramfs usually, but wasted + by unpacking the archive and then untaring it instead of using a pipe + * the file is downloaded for this test, then discarded and later + downloaded again for installation + so until a better solution is found, simply disable it. */ +#if 0 //get available root fs size //TODO: Check writability! struct statfs root_fs; @@ -303,6 +310,7 @@ bool COPKGManager::checkSize(const string& pkg_name) dprintf(DEBUG_NORMAL, "[COPKGManager] [%s - %d] WARNING: size check freesize=%lld (recommended: %lld)\n", __func__, __LINE__, free_size, req_size); return false; } +#endif return true; } From 9d0525050b29bd52942d12fc82264f3323839550 Mon Sep 17 00:00:00 2001 From: Stefan Seyfried Date: Mon, 4 Jan 2016 20:40:55 +0100 Subject: [PATCH 23/44] opkg_manager: tone down diagnostics in badpackage() In case of many packages, it can take a very long time to output the matches of badpackage() on a serial console, so only print them if the verbosity is increased and remove unnecessary information. Signed-off-by: Thilo Graf Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/cb9ec38623dc305e081972945c39e8d0079c63da Author: Stefan Seyfried Date: 2016-01-04 (Mon, 04 Jan 2016) ------------------ This commit was generated by Migit --- src/gui/opkg_manager.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/opkg_manager.cpp b/src/gui/opkg_manager.cpp index 2737b5f32..707eb5a4f 100644 --- a/src/gui/opkg_manager.cpp +++ b/src/gui/opkg_manager.cpp @@ -379,7 +379,7 @@ bool COPKGManager::badpackage(std::string &s) } if (!st.empty()){ - dprintf(DEBUG_NORMAL, "[COPKGManager] [%s - %d] found bad package => %s [filtered with %s]\n", __func__, __LINE__, s.c_str(), st.c_str()); + dprintf(DEBUG_INFO, "[%s] filtered '%s' pattern(s) '%s'\n", __func__, s.c_str(), st.c_str()); return true; } From d843b7fa2adb7cef7825608acb43553d3fc4189e Mon Sep 17 00:00:00 2001 From: Stefan Seyfried Date: Mon, 4 Jan 2016 21:00:24 +0100 Subject: [PATCH 24/44] opkg_manager: do not put bad packages into package list "bad" packages will be ignored later anyway, so to speed things up and save memory, do not even put them into the package list. Signed-off-by: Thilo Graf Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/8578218c38ee3f0f3b996f9c656f162cd308e2ab Author: Stefan Seyfried Date: 2016-01-04 (Mon, 04 Jan 2016) ------------------ This commit was generated by Migit --- src/gui/opkg_manager.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/gui/opkg_manager.cpp b/src/gui/opkg_manager.cpp index 707eb5a4f..c4bca4b99 100644 --- a/src/gui/opkg_manager.cpp +++ b/src/gui/opkg_manager.cpp @@ -392,6 +392,7 @@ void COPKGManager::updateMenu() getPkgData(OM_LIST_INSTALLED); getPkgData(OM_LIST_UPGRADEABLE); for (map::iterator it = pkg_map.begin(); it != pkg_map.end(); it++) { + /* this should no longer trigger at all */ if (badpackage(it->second.name)) continue; it->second.forwarder->iconName_Info_right = ""; @@ -524,6 +525,7 @@ int COPKGManager::showMenu() pkg_vec.clear(); for (map::iterator it = pkg_map.begin(); it != pkg_map.end(); it++) { + /* this should no longer trigger at all */ if (badpackage(it->second.name)) continue; it->second.forwarder = new CMenuForwarder(it->second.desc, true, NULL , this, it->second.name.c_str()); @@ -643,10 +645,12 @@ void COPKGManager::getPkgData(const int pkg_content_id) continue; switch (pkg_content_id) { - case OM_LIST: { + case OM_LIST: + /* do not even put "bad" packages into the list to save memory */ + if (badpackage(name)) + continue; pkg_map[name] = pkg(name, line, line); break; - } case OM_LIST_INSTALLED: { map::iterator it = pkg_map.find(name); if (it != pkg_map.end()) From 6bef0548d19bf3095fe828f93e0eb6e114b427e4 Mon Sep 17 00:00:00 2001 From: Stefan Seyfried Date: Mon, 4 Jan 2016 21:01:57 +0100 Subject: [PATCH 25/44] update_menu: don't leak COPKGManager objects Signed-off-by: Thilo Graf Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/70e1891b369c7d9f0161f05fe2a1e9cd20685198 Author: Stefan Seyfried Date: 2016-01-04 (Mon, 04 Jan 2016) ------------------ This commit was generated by Migit --- src/gui/update_menue.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/update_menue.cpp b/src/gui/update_menue.cpp index 5c54266fe..383a62594 100644 --- a/src/gui/update_menue.cpp +++ b/src/gui/update_menue.cpp @@ -106,7 +106,7 @@ int CSoftwareUpdate::showSoftwareUpdate() softUpdate.addItem(mf); //firmware update via opkg - mf = new CMenuForwarder(LOCALE_OPKG_TITLE, COPKGManager::hasOpkgSupport(), NULL, new COPKGManager()); + mf = new CMenuDForwarder(LOCALE_OPKG_TITLE, COPKGManager::hasOpkgSupport(), NULL, new COPKGManager()); mf->setHint(NEUTRINO_ICON_HINT_SW_UPDATE, LOCALE_MENU_HINT_OPKG); softUpdate.addItem(mf); } From fccc2ab4284c3f19838fa91ff0513f48999845fe Mon Sep 17 00:00:00 2001 From: Stefan Seyfried Date: Mon, 4 Jan 2016 21:03:18 +0100 Subject: [PATCH 26/44] opkg_manager: fix invalid match with -foo$ "regex" Signed-off-by: Thilo Graf Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/8f0e74a3bf505256f2569cac51a664fdb324cc63 Author: Stefan Seyfried Date: 2016-01-04 (Mon, 04 Jan 2016) ------------------ This commit was generated by Migit --- src/gui/opkg_manager.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/gui/opkg_manager.cpp b/src/gui/opkg_manager.cpp index c4bca4b99..15a3c20ef 100644 --- a/src/gui/opkg_manager.cpp +++ b/src/gui/opkg_manager.cpp @@ -365,13 +365,14 @@ bool COPKGManager::badpackage(std::string &s) bool res = false; /* poor man's regex :-) only supported are "^" and "$" */ if (p.substr(patlen, 1) == "$") { /* match at end */ - if (s.rfind(p.substr(0, patlen)) == (s.length() - patlen)) + size_t pos = s.rfind(p.substr(0, patlen)); /* s.len-patlen can be -1 == npos */ + if (pos != string::npos && pos == (s.length() - patlen)) res = true; } else if (p.substr(0, 1) == "^") { /* match at beginning */ if (s.find(p.substr(1)) == 0) res = true; } else { /* match everywhere */ - if (s.find(p) != std::string::npos) + if (s.find(p) != string::npos) res = true; } if (res) From c7de01997553f798db6346424ad27a1897b51f8a Mon Sep 17 00:00:00 2001 From: Stefan Seyfried Date: Mon, 4 Jan 2016 21:03:49 +0100 Subject: [PATCH 27/44] opkg_manager: explicitly clear pkg_map in destructor Signed-off-by: Thilo Graf Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/fb5265e0fadeecd96da4a3815a0c481bff72b0cb Author: Stefan Seyfried Date: 2016-01-04 (Mon, 04 Jan 2016) ------------------ This commit was generated by Migit --- src/gui/opkg_manager.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/gui/opkg_manager.cpp b/src/gui/opkg_manager.cpp index 15a3c20ef..9a41117a3 100644 --- a/src/gui/opkg_manager.cpp +++ b/src/gui/opkg_manager.cpp @@ -133,6 +133,7 @@ void COPKGManager::init() COPKGManager::~COPKGManager() { + pkg_map.clear(); CFileHelpers::removeDir(OPKG_TMP_DIR); } From d842489a088882fa64e47643628b6a089912530d Mon Sep 17 00:00:00 2001 From: Stefan Seyfried Date: Mon, 4 Jan 2016 21:04:44 +0100 Subject: [PATCH 28/44] opkg_manager: do not read package list twice on start checkUpdates() already gets the package list and the list of upgradables, so it is unnecessary to do this again immediately afterwards. Signed-off-by: Thilo Graf Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/45707de09ea6a8907b15b7fd8981fe0c4aa63551 Author: Stefan Seyfried Date: 2016-01-04 (Mon, 04 Jan 2016) ------------------ This commit was generated by Migit --- src/gui/opkg_manager.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/gui/opkg_manager.cpp b/src/gui/opkg_manager.cpp index 9a41117a3..82747d68d 100644 --- a/src/gui/opkg_manager.cpp +++ b/src/gui/opkg_manager.cpp @@ -464,7 +464,9 @@ bool COPKGManager::checkUpdates(const std::string & package_name, bool show_prog status.hide(); } +#if 0 pkg_map.clear(); +#endif return ret; } @@ -493,8 +495,10 @@ int COPKGManager::showMenu() if (checkUpdates()) DisplayInfoMessage(g_Locale->getText(LOCALE_OPKG_MESSAGEBOX_UPDATES_AVAILABLE)); +#if 0 getPkgData(OM_LIST); getPkgData(OM_LIST_UPGRADEABLE); +#endif menu = new CMenuWidget(g_Locale->getText(LOCALE_SERVICEMENU_UPDATE), NEUTRINO_ICON_UPDATE, width, MN_WIDGET_ID_SOFTWAREUPDATE); menu->addIntroItems(LOCALE_OPKG_TITLE, NONEXISTANT_LOCALE, CMenuWidget::BTN_TYPE_BACK, CMenuWidget::BRIEF_HINT_YES); From 1a7da7b852cd63d875f49e693024c6506e91e806 Mon Sep 17 00:00:00 2001 From: Stefan Seyfried Date: Mon, 4 Jan 2016 21:05:29 +0100 Subject: [PATCH 29/44] update_menu: put opkg update in front Signed-off-by: Thilo Graf Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/20bf0b00d8d1a9e3ca6c580e1a44976a308dc68b Author: Stefan Seyfried Date: 2016-01-04 (Mon, 04 Jan 2016) ------------------ This commit was generated by Migit --- src/gui/update_menue.cpp | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/src/gui/update_menue.cpp b/src/gui/update_menue.cpp index 383a62594..e0af074e7 100644 --- a/src/gui/update_menue.cpp +++ b/src/gui/update_menue.cpp @@ -46,6 +46,7 @@ #include #include #include +#include CSoftwareUpdate::CSoftwareUpdate() { @@ -73,17 +74,27 @@ int CSoftwareUpdate::exec(CMenuTarget* parent, const std::string &/*actionKey*/) int CSoftwareUpdate::showSoftwareUpdate() /* shows the menue and options for software update */ { - CMenuForwarder * mf; + CMenuForwarder * mf, *update_item; CMenuWidget softUpdate(LOCALE_MAINMENU_SERVICE, NEUTRINO_ICON_UPDATE, width, MN_WIDGET_ID_SOFTWAREUPDATE); softUpdate.addIntroItems(LOCALE_SERVICEMENU_UPDATE); //flashing CFlashUpdate flash; + unsigned int inetkey = CRCInput::RC_red; + if (COPKGManager::hasOpkgSupport()) { + //firmware update via opkg + mf = new CMenuDForwarder(LOCALE_OPKG_TITLE, true, NULL, new COPKGManager(), NULL, CRCInput::RC_red); + mf->setHint(NEUTRINO_ICON_HINT_SW_UPDATE, LOCALE_MENU_HINT_OPKG); + softUpdate.addItem(mf); + inetkey = CRCInput::convertDigitToKey(1); + } - CMenuForwarder *update_item = new CMenuForwarder(LOCALE_FLASHUPDATE_CHECKUPDATE_INTERNET, true, NULL, &flash, "inet", CRCInput::RC_red); - update_item->setHint("", LOCALE_MENU_HINT_SOFTUPDATE_CHECK); - softUpdate.addItem(update_item); + if (file_exists(g_settings.softupdate_url_file.c_str())) { + update_item = new CMenuForwarder(LOCALE_FLASHUPDATE_CHECKUPDATE_INTERNET, true, NULL, &flash, "inet", inetkey); + update_item->setHint("", LOCALE_MENU_HINT_SOFTUPDATE_CHECK); + softUpdate.addItem(update_item); + } update_item = new CMenuForwarder(LOCALE_FLASHUPDATE_CHECKUPDATE_LOCAL, true, NULL, &flash, "local", CRCInput::RC_green); update_item->setHint("", LOCALE_MENU_HINT_SOFTUPDATE_CHECK_LOCAL); @@ -105,10 +116,12 @@ int CSoftwareUpdate::showSoftwareUpdate() mf->setHint("", LOCALE_MENU_HINT_SOFTUPDATE_EXPERT); softUpdate.addItem(mf); +#if 0 //firmware update via opkg mf = new CMenuDForwarder(LOCALE_OPKG_TITLE, COPKGManager::hasOpkgSupport(), NULL, new COPKGManager()); mf->setHint(NEUTRINO_ICON_HINT_SW_UPDATE, LOCALE_MENU_HINT_OPKG); softUpdate.addItem(mf); +#endif } #ifdef BOXMODEL_APOLLO From fd094d3359c7df18513d1294cf85c6d16dcdaa48 Mon Sep 17 00:00:00 2001 From: Stefan Seyfried Date: Mon, 4 Jan 2016 21:07:02 +0100 Subject: [PATCH 30/44] make various dprintf macros safer for general usage Signed-off-by: Thilo Graf Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/9c2d9c8a2545e877b388f83c46dcded9e9c33322 Author: Stefan Seyfried Date: 2016-01-04 (Mon, 04 Jan 2016) ------------------ This commit was generated by Migit --- src/system/debug.h | 6 +++++- src/timerd/debug.h | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/system/debug.h b/src/system/debug.h index 40cba3863..a05ff1895 100644 --- a/src/system/debug.h +++ b/src/system/debug.h @@ -39,7 +39,11 @@ enum void setDebugLevel( int level ); -#define dprintf(debuglevel, fmt, args...) {if(debug>=debuglevel) printf( "[neutrino] " fmt, ## args);} +#define dprintf(debuglevel, fmt, args...) \ + do { \ + if (debug >= debuglevel) \ + printf( "[neutrino] " fmt, ## args); \ + } while(0) #define dperror(str) {perror("[neutrino] " str);} diff --git a/src/timerd/debug.h b/src/timerd/debug.h index 812842c07..76d200a9e 100644 --- a/src/timerd/debug.h +++ b/src/timerd/debug.h @@ -28,7 +28,11 @@ extern int timerd_debug; -#define dprintf(fmt, args...) {if(timerd_debug) printf( "[timerd] " fmt, ## args);} +#define dprintf(fmt, args...) \ + do { \ + if(timerd_debug) \ + printf( "[timerd] " fmt, ## args); \ + } while(0) #define dperror(str) {perror("[timerd] " str);} From 758c0c137abc810d4f2146c42765eba683814c65 Mon Sep 17 00:00:00 2001 From: Stefan Seyfried Date: Mon, 4 Jan 2016 21:08:02 +0100 Subject: [PATCH 31/44] CShellWindow: do not dereference NULL pointers additionally, try to shorten the debug messages slightly and make the output more useful in the error case for my_popen() Signed-off-by: Thilo Graf Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/f8fc83c496b2af9daa13b56d27d15dd1a4685649 Author: Stefan Seyfried Date: 2016-01-04 (Mon, 04 Jan 2016) ------------------ This commit was generated by Migit --- src/gui/widget/shellwindow.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/gui/widget/shellwindow.cpp b/src/gui/widget/shellwindow.cpp index 4c477f7ba..a2cb0165b 100644 --- a/src/gui/widget/shellwindow.cpp +++ b/src/gui/widget/shellwindow.cpp @@ -80,7 +80,7 @@ void CShellWindow::exec() if (!f) { if (res) *res = -1; - dprintf(DEBUG_NORMAL, "[CShellWindow] [%s - %d] Error! my_popen returns: %d command: %s\n", __func__, __LINE__, *res, cmd.c_str()); + dprintf(DEBUG_NORMAL, "[CShellWindow] [%s:%d] Error! my_popen errno: %d command: %s\n", __func__, __LINE__, errno, cmd.c_str()); return; } @@ -159,7 +159,10 @@ void CShellWindow::exec() //callback for line handler std::string s_output = std::string((output)); OnShellOutputLoop(&s_output, res, &ok); - dprintf(DEBUG_NORMAL, "[CShellWindow] [%s - %d] res=%d ok=%d\n", __func__, __LINE__, *res, ok); + if (res) + dprintf(DEBUG_NORMAL, "[CShellWindow] [%s:%d] res=%d ok=%d\n", __func__, __LINE__, *res, ok); + else + dprintf(DEBUG_NORMAL, "[CShellWindow] [%s:%d] res=NULL ok=%d\n", __func__, __LINE__, ok); if (lines.size() > lines_max) lines.pop_front(); From 9b74e0e581d4be1a86a068c81c1dbb8252337483 Mon Sep 17 00:00:00 2001 From: Stefan Seyfried Date: Mon, 4 Jan 2016 21:22:46 +0100 Subject: [PATCH 32/44] opkg_manager: make progress reports on startup more practical Signed-off-by: Thilo Graf Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/0d6fd4c7d77172b8c23bea10433c38c301be2697 Author: Stefan Seyfried Date: 2016-01-04 (Mon, 04 Jan 2016) ------------------ This commit was generated by Migit --- data/locale/deutsch.locale | 2 ++ data/locale/english.locale | 2 ++ src/gui/opkg_manager.cpp | 21 ++++++++++++++++----- src/system/locals.h | 2 ++ src/system/locals_intern.h | 2 ++ 5 files changed, 24 insertions(+), 5 deletions(-) diff --git a/data/locale/deutsch.locale b/data/locale/deutsch.locale index 6ca6b6d3c..f7603cff7 100644 --- a/data/locale/deutsch.locale +++ b/data/locale/deutsch.locale @@ -1875,6 +1875,8 @@ opkg.messagebox.size.error Nicht genügend freier Speicher für Paketinstallatio opkg.messagebox.updates.available Aktualisierungen verfügbar! opkg.success.install Installation erfolgreich!\nNeustart von Neutrino kann erforderlich sein. Jetzt neu starten? opkg.title Paketverwaltung +opkg.update.check Prüfe auf Updates... +opkg.update.reading_lists Paketlisten werden eingelesen... opkg.upgrade Installierte Pakete aktualisieren opkg.warning_3rdparty_packages Drittanbieter-Pakete könnten Ihr System beschädigen! Sind Sie sicher, dieses Paket zu installieren? options.default Voreinstellungen benutzen diff --git a/data/locale/english.locale b/data/locale/english.locale index 70a88506a..d578034b9 100644 --- a/data/locale/english.locale +++ b/data/locale/english.locale @@ -1875,6 +1875,8 @@ opkg.messagebox.size.error Not enough free memory available for this package! opkg.messagebox.updates.available Updates available! opkg.success.install Install successful!\n restart of Neutrino might be required. Restart now? opkg.title Package Management +opkg.update.check Checking for updates... +opkg.update.reading_lists Reading package lists... opkg.upgrade Upgrade installed packages opkg.warning_3rdparty_packages 3rd party packages could damage your system! Are you sure install this package? options.default Reset to defaults diff --git a/src/gui/opkg_manager.cpp b/src/gui/opkg_manager.cpp index 82747d68d..e140235df 100644 --- a/src/gui/opkg_manager.cpp +++ b/src/gui/opkg_manager.cpp @@ -43,6 +43,7 @@ #include #include +#include #include #include #include @@ -428,23 +429,30 @@ bool COPKGManager::checkUpdates(const std::string & package_name, bool show_prog bool ret = false; - getPkgData(OM_LIST); - getPkgData(OM_LIST_UPGRADEABLE); - size_t i = 0; CProgressWindow status; status.showHeader(false); if (show_progress){ status.paint(); - status.showStatus(i); + status.showStatusMessageUTF(g_Locale->getText(LOCALE_OPKG_UPDATE_READING_LISTS)); + status.showStatus(25); /* after do_update, we have actually done the hardest work already */ } + getPkgData(OM_LIST); + if (show_progress) + status.showStatus(50); + getPkgData(OM_LIST_UPGRADEABLE); + if (show_progress) + status.showStatus(75); + for (map::iterator it = pkg_map.begin(); it != pkg_map.end(); it++){ dprintf(DEBUG_INFO, "[COPKGManager] [%s - %d] Update check for...%s\n", __func__, __LINE__, it->second.name.c_str()); if (show_progress){ + /* showing the names only makes things *much* slower... status.showStatusMessageUTF(it->second.name); - status.showStatus(100*i / pkg_map.size()); + */ + status.showStatus(75 + 25*i / pkg_map.size()); } if (it->second.upgradable){ @@ -473,7 +481,10 @@ bool COPKGManager::checkUpdates(const std::string & package_name, bool show_prog int COPKGManager::doUpdate() { + CHintBox *hb = new CHintBox(LOCALE_MESSAGEBOX_INFO, LOCALE_OPKG_UPDATE_CHECK); + hb->paint(); int r = execCmd(pkg_types[OM_UPDATE], CShellWindow::QUIET); + delete hb; if (r) { string msg = string(g_Locale->getText(LOCALE_OPKG_FAILURE_UPDATE)); msg += '\n' + tmp_str; diff --git a/src/system/locals.h b/src/system/locals.h index fdc3e8519..2fbbe336a 100644 --- a/src/system/locals.h +++ b/src/system/locals.h @@ -1902,6 +1902,8 @@ typedef enum LOCALE_OPKG_MESSAGEBOX_UPDATES_AVAILABLE, LOCALE_OPKG_SUCCESS_INSTALL, LOCALE_OPKG_TITLE, + LOCALE_OPKG_UPDATE_CHECK, + LOCALE_OPKG_UPDATE_READING_LISTS, LOCALE_OPKG_UPGRADE, LOCALE_OPKG_WARNING_3RDPARTY_PACKAGES, LOCALE_OPTIONS_DEFAULT, diff --git a/src/system/locals_intern.h b/src/system/locals_intern.h index 00da45a71..b9ab8d2b4 100644 --- a/src/system/locals_intern.h +++ b/src/system/locals_intern.h @@ -1902,6 +1902,8 @@ const char * locale_real_names[] = "opkg.messagebox.updates.available", "opkg.success.install", "opkg.title", + "opkg.update.check", + "opkg.update.reading_lists", "opkg.upgrade", "opkg.warning_3rdparty_packages", "options.default", From 84a0c0abc8c588d42fb116cd0eecf6521e1b98c3 Mon Sep 17 00:00:00 2001 From: Stefan Seyfried Date: Mon, 4 Jan 2016 21:23:40 +0100 Subject: [PATCH 33/44] infoviewer: fix ordering of variable initialization Signed-off-by: Thilo Graf Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/0b246f32e9027e21d2ca59c366f03c2dd5228c32 Author: Stefan Seyfried Date: 2016-01-04 (Mon, 04 Jan 2016) ------------------ This commit was generated by Migit --- src/gui/infoviewer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/infoviewer.cpp b/src/gui/infoviewer.cpp index 1327af558..d65af3e9e 100644 --- a/src/gui/infoviewer.cpp +++ b/src/gui/infoviewer.cpp @@ -134,8 +134,8 @@ CInfoViewer::~CInfoViewer() void CInfoViewer::Init() { - initClock(); BoxStartX = BoxStartY = BoxEndX = BoxEndY = 0; + initClock(); recordModeActive = false; is_visible = false; showButtonBar = false; From b8e9498fdf7e8945b3cc3792f74774a22a0f8709 Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Mon, 4 Jan 2016 21:47:14 +0100 Subject: [PATCH 34/44] CCDraw: remove hide() from destructor. hide() should be called explicit if required. This should fix unintentionally call of hide() if objects used on stack. Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/2ea156e9331299b37bfd499bc5e89032ac016021 Author: Thilo Graf Date: 2016-01-04 (Mon, 04 Jan 2016) ------------------ This commit was generated by Migit --- src/gui/components/cc_draw.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/src/gui/components/cc_draw.cpp b/src/gui/components/cc_draw.cpp index 8433253a7..a43e0e461 100644 --- a/src/gui/components/cc_draw.cpp +++ b/src/gui/components/cc_draw.cpp @@ -76,7 +76,6 @@ CCDraw::CCDraw() : COSDFader(g_settings.theme.menu_Content_alpha) CCDraw::~CCDraw() { - hide(); clearFbData(); } From 5b85141dbd0aa591c2dca5194b3cd0fc04f0ac87 Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Mon, 4 Jan 2016 22:06:47 +0100 Subject: [PATCH 35/44] CComponentsButton: remove current gradient from all buttons This will comming soon, gradient is prepared for use but disabled at the moment till some other parts of gui parts are provide gradient Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/eec34222ea867ef70315ad8fa857a44d5b784543 Author: Thilo Graf Date: 2016-01-04 (Mon, 04 Jan 2016) ------------------ This commit was generated by Migit --- src/gui/components/cc_frm_button.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gui/components/cc_frm_button.cpp b/src/gui/components/cc_frm_button.cpp index ab4b45563..057567c5f 100644 --- a/src/gui/components/cc_frm_button.cpp +++ b/src/gui/components/cc_frm_button.cpp @@ -102,8 +102,8 @@ void CComponentsButton::initVarButton( const int& x_pos, const int& y_pos, const shadow = shadow_mode; shadow_w = SHADOW_OFFSET; - cc_body_gradient_enable = false/*g_settings.gradiant*/; //gradient is prepared for use but disabled at the moment till some other parts of gui parts are provide gradient - setColBodyGradient(CColorGradient::gradientLight2Dark, CFrameBuffer::gradientVertical, CColorGradient::light); + cc_body_gradient_enable = CC_COLGRAD_OFF/*g_settings.gradiant*/; //gradient is prepared for use but disabled at the moment till some other parts of gui parts are provide gradient + setColBodyGradient(cc_body_gradient_enable/*CColorGradient::gradientLight2Dark*/, CFrameBuffer::gradientVertical, CColorGradient::light); col_frame = color_frame; col_body = cc_body_gradient_enable? COL_DARK_GRAY : color_body; col_shadow = color_shadow; From 48524144165063035f23000c23734eca88c8dd0c Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Mon, 4 Jan 2016 22:40:57 +0100 Subject: [PATCH 36/44] CComponentsPicture: move SetTransparent() to public Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/c11ea8f50b78a44a27e52f8614bfdb7c60f48662 Author: Thilo Graf Date: 2016-01-04 (Mon, 04 Jan 2016) ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- src/gui/components/cc_item_picture.h | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/gui/components/cc_item_picture.h b/src/gui/components/cc_item_picture.h index 2ca4639b3..a1865bcef 100644 --- a/src/gui/components/cc_item_picture.h +++ b/src/gui/components/cc_item_picture.h @@ -93,10 +93,6 @@ class CComponentsPicture : public CComponentsItem ///paint image void paintPicture(); - // t = CFrameBuffer::TM_BLACK : Transparency when black content ('pseudo' transparency) - // t = CFrameBuffer::TM_NONE : No 'pseudo' transparency - void SetTransparent(int t){ image_transparent = t; } - public: /*! Constructor for image objects: use this for scaled images. @@ -160,6 +156,13 @@ class CComponentsPicture : public CComponentsItem ///return paint mode of internal image, true=image was painted, please do not to confuse with isPainted()! isPainted() is related to item itself. virtual inline bool isPicPainted(){return is_image_painted;}; + /**sets transparency mode if icons + * @param[in] t Transparency mode + * @li t = CFrameBuffer::TM_BLACK : Transparency when black content ('pseudo' transparency) + * @li t = CFrameBuffer::TM_NONE : No 'pseudo' transparency + */ + void SetTransparent(int t){ image_transparent = t; } + ///paint item virtual void paint(bool do_save_bg = CC_SAVE_SCREEN_YES); ///hide item, see also CComponents::hide(); From 57b65dd200d1836f30bd3f6387f77f5d31c8978e Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Mon, 4 Jan 2016 22:46:07 +0100 Subject: [PATCH 37/44] CComponentsButton: fix transparecny of button icon Background was black for some icons Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/ff97b7d25fe99a816122a90833f223e3f6f6e0da Author: Thilo Graf Date: 2016-01-04 (Mon, 04 Jan 2016) ------------------ 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 057567c5f..38087c79a 100644 --- a/src/gui/components/cc_frm_button.cpp +++ b/src/gui/components/cc_frm_button.cpp @@ -150,7 +150,7 @@ void CComponentsButton::initIcon() cc_btn_icon = frameBuffer->getIconBasePath() + "/" + cc_btn_icon + ".png"; cc_btn_icon_obj = new CComponentsPictureScalable(fr_thickness, y_icon, cc_btn_icon, this); - + cc_btn_icon_obj->SetTransparent(CFrameBuffer::TM_BLACK); int h_icon = cc_btn_icon_obj->getHeight(); //get required icon height From a3e9a5aad9a8c2b4d4a2cb446179066b09cef2b6 Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Mon, 4 Jan 2016 22:47:01 +0100 Subject: [PATCH 38/44] CShellWindow: use current window color for result button Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/467e888458c8804cd2852715e775088f8cb2cf4c Author: Thilo Graf Date: 2016-01-04 (Mon, 04 Jan 2016) ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- src/gui/widget/shellwindow.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/gui/widget/shellwindow.cpp b/src/gui/widget/shellwindow.cpp index a2cb0165b..60eab7cb3 100644 --- a/src/gui/widget/shellwindow.cpp +++ b/src/gui/widget/shellwindow.cpp @@ -251,7 +251,8 @@ void CShellWindow::showResult() int xpos = frameBuffer->getScreenWidth() - b_width; int ypos = frameBuffer->getScreenHeight() - b_height; CComponentsButton btn(xpos, ypos, b_width, b_height, LOCALE_MESSAGEBOX_BACK, NEUTRINO_ICON_BUTTON_OKAY, NULL, true, true); - btn.paint(); + btn.setColorBody(COL_MENUCONTENT_PLUS_0); + btn.paint(false); } neutrino_msg_t msg; From e7cff73e8836d5c8a2cf97cb10ad848917f05831 Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Wed, 6 Jan 2016 22:26:14 +0100 Subject: [PATCH 39/44] CInfoViewer: try to fix numbox arrangement Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/9ed32739604b56619f68e9ae842166d2fbc73002 Author: Thilo Graf Date: 2016-01-06 (Wed, 06 Jan 2016) ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- src/gui/infoviewer.cpp | 47 +++++++++++++++--------------------------- 1 file changed, 17 insertions(+), 30 deletions(-) diff --git a/src/gui/infoviewer.cpp b/src/gui/infoviewer.cpp index d65af3e9e..876b406f1 100644 --- a/src/gui/infoviewer.cpp +++ b/src/gui/infoviewer.cpp @@ -195,35 +195,22 @@ void CInfoViewer::start () 2 * g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_INFO]->getHeight() + 25; infoViewerBB->Init(); - if ( g_settings.infobar_show_channellogo != 3 && g_settings.infobar_show_channellogo != 5 && g_settings.infobar_show_channellogo != 6) /* 3 & 5 & 6 is "default" with sigscales etc. */ - { - ChanWidth = 4 * g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_NUMBER]->getMaxDigitWidth() + 10; - ChanHeight = g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_NUMBER]->getHeight() * 9 / 8; - } - else - { /* default mode, with signal bars etc. */ - ChanWidth = 122; - ChanHeight = 74; - int test = g_SignalFont->getWidth() * 14; - if (test > ChanWidth) { - ChanWidth = test; - } - test = (g_SignalFont->getHeight() * 2) + (36 * g_settings.screen_yres / 100); - if (test > ChanHeight) { - ChanHeight = test; - } - } + ChanWidth = max(125, 4 * g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_NUMBER]->getMaxDigitWidth() + 10); + + ChanHeight = g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_NUMBER]->getHeight()/* * 9/8*/; + ChanHeight += g_SignalFont->getHeight()/2; + ChanHeight = max(75, ChanHeight); BoxStartX = g_settings.screen_StartX + 10; BoxEndX = g_settings.screen_EndX - 10; BoxEndY = g_settings.screen_EndY - 10 - infoViewerBB->InfoHeightY_Info - infoViewerBB->bottom_bar_offset; BoxStartY = BoxEndY - InfoHeightY - ChanHeight / 2; - ChanNameY = BoxStartY + (ChanHeight / 2)/* + SHADOW_OFFSET*/; //oberkante schatten? + ChanNameY = BoxStartY + (ChanHeight / 2) + SHADOW_OFFSET; ChanInfoX = BoxStartX + (ChanWidth / 3); initClock(); - time_height = clock->getHeight(); + time_height = max(ChanHeight / 2, clock->getHeight()); time_width = clock->getWidth(); } @@ -405,12 +392,12 @@ void CInfoViewer::paintBackground(int col_NumBox) paintBody(); // number box + int y_numbox = body->getYPos()-ChanHeight-SHADOW_OFFSET; if (numbox == NULL){ //TODO: move into an own member, paintNumBox() or so... - numbox = new CComponentsShapeSquare(BoxStartX, BoxStartY, ChanWidth, ChanHeight); - numbox->enableShadow(CC_SHADOW_ON, 6, true); + numbox = new CComponentsShapeSquare(BoxStartX, y_numbox, ChanWidth, ChanHeight); + numbox->enableShadow(CC_SHADOW_ON, SHADOW_OFFSET, true); }else - numbox->setDimensionsAll(BoxStartX, BoxStartY, ChanWidth, ChanHeight); - + numbox->setDimensionsAll(BoxStartX, y_numbox, ChanWidth, ChanHeight); numbox->setColorBody(g_settings.theme.infobar_gradient_top ? COL_MENUHEAD_PLUS_0 : col_NumBox); numbox->enableColBodyGradient(g_settings.theme.infobar_gradient_top, g_settings.theme.infobar_gradient_top ? COL_INFOBAR_PLUS_0 : col_NumBox, g_settings.theme.infobar_gradient_top_direction); numbox->setCorner(c_rad_mid, CORNER_ALL); @@ -419,7 +406,7 @@ void CInfoViewer::paintBackground(int col_NumBox) void CInfoViewer::paintHead() { - int head_x = BoxStartX+ChanWidth+5; + int head_x = BoxStartX+ChanWidth; int head_w = BoxEndX-head_x; if (header == NULL){ header = new CComponentsShapeSquare(head_x, ChanNameY, head_w, time_height, NULL, CC_SHADOW_RIGHT); @@ -782,7 +769,7 @@ void CInfoViewer::showTitle(CZapitChannel * channel, const bool calledFromNumZap } } int chanH = g_SignalFont->getHeight (); - g_SignalFont->RenderString (3 + BoxStartX + ((ChanWidth - satNameWidth) / 2) , BoxStartY + chanH, satNameWidth, satname_tmp, COL_INFOBAR_TEXT); + g_SignalFont->RenderString (3 + BoxStartX + ((ChanWidth - satNameWidth) / 2) , numbox->getYPos() + chanH, satNameWidth, satname_tmp, COL_INFOBAR_TEXT); ChanNumYPos += 10; } @@ -1501,7 +1488,7 @@ void CInfoViewer::showSNR () TODO: decouple this */ if (!fileplay && !IS_WEBTV(current_channel_id) && ( g_settings.infobar_show_channellogo == 3 || g_settings.infobar_show_channellogo == 5 || g_settings.infobar_show_channellogo == 6 )) { int chanH = g_SignalFont->getHeight(); -// int freqStartY = BoxStartY + 2 * chanH - 3; + int y_numbox = numbox->getYPos(); if ((newfreq && chanready) || SDT_freq_update) { char freq[20]; newfreq = false; @@ -1515,12 +1502,12 @@ void CInfoViewer::showSNR () snprintf (freq, sizeof(freq), "%d.%d MHz %s", frequency / 1000, frequency % 1000, polarisation.c_str()); int satNameWidth = g_SignalFont->getRenderWidth (freq); - g_SignalFont->RenderString (3 + BoxStartX + ((ChanWidth - satNameWidth) / 2), BoxStartY + 2 * chanH - 3, satNameWidth, freq, SDT_freq_update ? COL_COLORED_EVENTS_TEXT:COL_INFOBAR_TEXT); + g_SignalFont->RenderString (3 + BoxStartX + ((ChanWidth - satNameWidth) / 2), y_numbox + 2 * chanH - 3, satNameWidth, freq, SDT_freq_update ? COL_COLORED_EVENTS_TEXT:COL_INFOBAR_TEXT); SDT_freq_update = false; } if (sigbox == NULL){ int sb_x = ChanWidth *10/100; - sigbox = new CSignalBox(BoxStartX+sb_x, BoxStartY+ChanHeight/2, ChanWidth-2*sb_x, ChanHeight/2, CFEManager::getInstance()->getLiveFE(), true, NULL, "S", "Q"); + sigbox = new CSignalBox(BoxStartX+sb_x, y_numbox+ChanHeight/2, ChanWidth-2*sb_x, ChanHeight/2, CFEManager::getInstance()->getLiveFE(), true, NULL, "S", "Q"); sigbox->setTextColor(COL_INFOBAR_TEXT); sigbox->doPaintBg(false); } @@ -2079,7 +2066,7 @@ int CInfoViewer::showChannelLogo(const t_channel_id logo_channel_id, const int c // calculate mid of numberbox int satNameHeight = g_settings.infobar_sat_display ? g_SignalFont->getHeight() : 0; int x_mid = BoxStartX + ChanWidth / 2; - y_mid = BoxStartY + (satNameHeight + ChanHeight) / 2; + y_mid = numbox->getYPos() + (satNameHeight + ChanHeight) / 2; g_PicViewer->rescaleImageDimensions(&logo_w, &logo_h, ChanWidth, ChanHeight - satNameHeight); // channel name with number From c12a4594dcbe819bc7a3e10b84b5b2f0d6e7567f Mon Sep 17 00:00:00 2001 From: vanhofen Date: Thu, 7 Jan 2016 08:48:33 +0100 Subject: [PATCH 40/44] infoviewer: (re)use SHADOW_OFFSET/2 for small shadows Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/429e401d91524030b56d0234648784d08e346240 Author: vanhofen Date: 2016-01-07 (Thu, 07 Jan 2016) Origin message was: ------------------ - infoviewer: (re)use SHADOW_OFFSET/2 for small shadows ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- src/gui/infoviewer.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gui/infoviewer.cpp b/src/gui/infoviewer.cpp index 876b406f1..a04353172 100644 --- a/src/gui/infoviewer.cpp +++ b/src/gui/infoviewer.cpp @@ -327,7 +327,7 @@ void CInfoViewer::showRecordIcon (const bool show) if (rec == NULL){ //TODO: full refactoring of this icon handler rec = new CComponentsShapeSquare(box_posX, BoxStartY + box_posY , box_len, chanH, NULL, CC_SHADOW_ON, COL_RED, COL_INFOBAR_PLUS_0); rec->setFrameThickness(2); - rec->setShadowWidth(3); + rec->setShadowWidth(SHADOW_OFFSET/2); rec->setCorner(RADIUS_MIN, CORNER_ALL); } if (!rec->isPainted()) @@ -1949,7 +1949,7 @@ void CInfoViewer::showInfoFile() //set some properties for info object infobar_txt->setDimensionsAll(xStart, yStart, width, height); infobar_txt->setCorner(RADIUS_SMALL); - infobar_txt->enableShadow(CC_SHADOW_ON, 3); + infobar_txt->enableShadow(CC_SHADOW_ON, SHADOW_OFFSET/2); infobar_txt->setTextColor(COL_INFOBAR_TEXT); infobar_txt->setColorBody(COL_INFOBAR_PLUS_0); infobar_txt->doPaintTextBoxBg(false); From a03ab6d48262e6a23a02c8b3c694a4b750de72db Mon Sep 17 00:00:00 2001 From: defans Date: Thu, 7 Jan 2016 12:32:54 +0100 Subject: [PATCH 41/44] movieplayer: fix screensaver init Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/c78bfcfce033402b639d6f0715dd55e9e03c7481 Author: defans Date: 2016-01-07 (Thu, 07 Jan 2016) Origin message was: ------------------ - movieplayer: fix screensaver init ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- src/gui/movieplayer.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/gui/movieplayer.cpp b/src/gui/movieplayer.cpp index 697c8927e..fd822d373 100644 --- a/src/gui/movieplayer.cpp +++ b/src/gui/movieplayer.cpp @@ -191,7 +191,8 @@ void CMoviePlayerGui::Init(void) keyPressed = CMoviePlayerGui::PLUGIN_PLAYSTATE_NORMAL; isLuaPlay = false; blockedFromPlugin = false; - m_screensaver=false; + m_screensaver = false; + m_idletime = time(NULL); } void CMoviePlayerGui::cutNeutrino() From 39c5f26b4862ad2793c3d73c981d84613a9d8969 Mon Sep 17 00:00:00 2001 From: vanhofen Date: Thu, 7 Jan 2016 13:18:49 +0100 Subject: [PATCH 42/44] textbox: allow users setting screen_StartX/Y = 0 Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/3d4bb41062ebcdce6296464df74f3cea16b6460a Author: vanhofen Date: 2016-01-07 (Thu, 07 Jan 2016) Origin message was: ------------------ - textbox: allow users setting screen_StartX/Y = 0 ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- src/gui/widget/textbox.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/widget/textbox.cpp b/src/gui/widget/textbox.cpp index 70d642bf8..c42fa67e2 100644 --- a/src/gui/widget/textbox.cpp +++ b/src/gui/widget/textbox.cpp @@ -580,7 +580,7 @@ void CTextBox::refreshText(void) } //detect corrupt position values - if ((ax<=0) || (ay<=0)){ + if ((ax<0) || (ay<0)){ dprintf(DEBUG_NORMAL, "\033[33m[CTextBox] [%s - %d] ERROR! position out of range: ax = %d, ay = %d, dx = %d, dy = %d\033[0m\n", __func__, __LINE__, ax, ay, dx, dy); return; } From f267a09d3b69a481e315418aae3d416029730f66 Mon Sep 17 00:00:00 2001 From: vanhofen Date: Thu, 7 Jan 2016 15:56:36 +0100 Subject: [PATCH 43/44] infoviewer: align header position to fix a small 'hole' beside numbox Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/033d111a58d33cd0a0fb717f7d5e84f072db2770 Author: vanhofen Date: 2016-01-07 (Thu, 07 Jan 2016) Origin message was: ------------------ - infoviewer: align header position to fix a small 'hole' beside numbox ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- src/gui/infoviewer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/infoviewer.cpp b/src/gui/infoviewer.cpp index a04353172..393590c3c 100644 --- a/src/gui/infoviewer.cpp +++ b/src/gui/infoviewer.cpp @@ -406,7 +406,7 @@ void CInfoViewer::paintBackground(int col_NumBox) void CInfoViewer::paintHead() { - int head_x = BoxStartX+ChanWidth; + int head_x = BoxStartX+ChanWidth -1; /*Ugly: -1 to avoid background shine through round borders*/ int head_w = BoxEndX-head_x; if (header == NULL){ header = new CComponentsShapeSquare(head_x, ChanNameY, head_w, time_height, NULL, CC_SHADOW_RIGHT); From c95ba0b3d2c9c3a3d29ef0b7a1e94a0633e8b032 Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Thu, 7 Jan 2016 19:33:41 +0100 Subject: [PATCH 44/44] CInfoViewer: try to fix channel number allignment Allignment was broken on different font size. Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/11e480b6e88b8e5a675c5b65ffc2b0181f13f831 Author: Thilo Graf Date: 2016-01-07 (Thu, 07 Jan 2016) ------------------ This commit was generated by Migit --- src/gui/infoviewer.cpp | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/src/gui/infoviewer.cpp b/src/gui/infoviewer.cpp index 393590c3c..13cdd9aa8 100644 --- a/src/gui/infoviewer.cpp +++ b/src/gui/infoviewer.cpp @@ -777,10 +777,19 @@ void CInfoViewer::showTitle(CZapitChannel * channel, const bool calledFromNumZap if ((!logo_ok && g_settings.infobar_show_channellogo < 2) || g_settings.infobar_show_channellogo == 2 || g_settings.infobar_show_channellogo == 4) // no logo in numberbox { // show number in numberbox - int tmpwidth = g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_NUMBER]->getRenderWidth(strChanNum); - g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_NUMBER]->RenderString( - BoxStartX + (ChanWidth - tmpwidth) / 2, ChanNumYPos, - ChanWidth, strChanNum, col_NumBoxText); + int h_tmp = numbox->getHeight(); + int y_tmp = numbox->getYPos() + 5*100/h_tmp; //5% + if (g_settings.infobar_sat_display){ + int h_sfont = g_SignalFont->getHeight(); + h_tmp -= h_sfont; + y_tmp += h_sfont; + } + y_tmp += h_tmp/2 + g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_NUMBER]->getHeight()/2; + g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_NUMBER]->RenderString(BoxStartX + (ChanWidth-g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_NUMBER]->getRenderWidth(strChanNum))/2, + y_tmp, + ChanWidth, + strChanNum, + col_NumBoxText); } if (ChannelLogoMode == 1 || ( g_settings.infobar_show_channellogo == 3 && !logo_ok) || g_settings.infobar_show_channellogo == 6 ) /* channel number besides channel name */ {