From d6b7d95600b418a3bd16a9d4a75d72f613cfa6c9 Mon Sep 17 00:00:00 2001 From: Jacek Jendrzej Date: Mon, 26 Jun 2017 11:53:59 +0200 Subject: [PATCH 1/7] lib/libtuxtxt/tuxtxt.cpp avoid segfault, FIXME Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/7aec84d124b6040deaa306d6980ffdc7463784e8 Author: Jacek Jendrzej Date: 2017-06-26 (Mon, 26 Jun 2017) --- lib/libtuxtxt/tuxtxt.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/libtuxtxt/tuxtxt.cpp b/lib/libtuxtxt/tuxtxt.cpp index 714494681..d5d093a6a 100644 --- a/lib/libtuxtxt/tuxtxt.cpp +++ b/lib/libtuxtxt/tuxtxt.cpp @@ -58,6 +58,10 @@ fb_pixel_t *getFBp(int *y) void FillRect(int x, int y, int w, int h, int color) { + if(color < 0 || SIZECOLTABLE < color){ + printf("FIXME array size %i color %i not in range\n",SIZECOLTABLE,color); + return; + } fb_pixel_t *p = getFBp(&y); MARK_FB(x, y, w, h); p += x + y * stride; From 0e522bb6e641963dc7bded006e615b8270986844 Mon Sep 17 00:00:00 2001 From: Jacek Jendrzej Date: Mon, 26 Jun 2017 19:23:23 +0200 Subject: [PATCH 2/7] init pre post Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/4bdacf39c81a89e07dd7f5399a88217f7030c303 Author: Jacek Jendrzej Date: 2017-06-26 (Mon, 26 Jun 2017) --- src/gui/record_setup.cpp | 2 +- src/gui/timerlist.cpp | 2 +- src/timerd/timerd.cpp | 2 +- src/timerd/timermanager.cpp | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/gui/record_setup.cpp b/src/gui/record_setup.cpp index 49ed97d86..fae191c0e 100644 --- a/src/gui/record_setup.cpp +++ b/src/gui/record_setup.cpp @@ -310,7 +310,7 @@ int CRecordSetup::showRecordSetup() void CRecordSetup::showRecordTimerSetup(CMenuWidget *menu_timersettings) { //recording start/end correcture - int pre,post; + int pre = 0,post = 0; g_Timerd->getRecordingSafety(pre,post); g_settings.record_safety_time_before = pre/60; g_settings.record_safety_time_after = post/60; diff --git a/src/gui/timerlist.cpp b/src/gui/timerlist.cpp index 5fe4586b3..601ae3981 100644 --- a/src/gui/timerlist.cpp +++ b/src/gui/timerlist.cpp @@ -442,7 +442,7 @@ int CTimerList::exec(CMenuTarget* parent, const std::string & actionKey) } else if ((strcmp(key, "send_remotetimer") == 0) && RemoteBoxChanExists(timerlist[selected].channel_id)) { - int pre,post; + int pre = 0,post = 0; Timer->getRecordingSafety(pre,post); CHTTPTool httpTool; std::string r_url; diff --git a/src/timerd/timerd.cpp b/src/timerd/timerd.cpp index 385afac85..e1b00fbf9 100644 --- a/src/timerd/timerd.cpp +++ b/src/timerd/timerd.cpp @@ -306,7 +306,7 @@ bool timerd_parse_command(CBasicMessage::Header &rmsg, int connfd) CBasicServer::receive_data(connfd, &recInfo, sizeof(CTimerd::TransferRecordingInfo)); if(recInfo.recordingSafety) { - int pre,post; + int pre = 0,post = 0; CTimerManager::getInstance()->getRecordingSafety(pre,post); msgAddTimer.announceTime -= pre; msgAddTimer.alarmTime -= pre; diff --git a/src/timerd/timermanager.cpp b/src/timerd/timermanager.cpp index 82051b394..3903a4b0f 100644 --- a/src/timerd/timermanager.cpp +++ b/src/timerd/timermanager.cpp @@ -1347,7 +1347,7 @@ bool CTimerEvent_Record::adjustToCurrentEPG() CChannelEventList evtlist; CEitManager::getInstance()->getEventsServiceKey(eventInfo.channel_id, evtlist); - int pre, post; + int pre = 0, post = 0; CTimerManager::getInstance()->getRecordingSafety(pre, post); time_t _announceTime = announceTime; From 9711d463271264e076bafeea403577d82965df5b Mon Sep 17 00:00:00 2001 From: vanhofen Date: Mon, 26 Jun 2017 20:53:12 +0200 Subject: [PATCH 3/7] CProgressWindow: use CProgressBar::PB_TIMESCALE as default More colors makes not really sense here. Signed-off-by: Thilo Graf Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/3fdd07e92c4f06c1715c23c5e03014fcbe3c2dd4 Author: vanhofen Date: 2017-06-26 (Mon, 26 Jun 2017) --- src/gui/widget/progresswindow.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/gui/widget/progresswindow.cpp b/src/gui/widget/progresswindow.cpp index 983ff2aac..26975c02a 100644 --- a/src/gui/widget/progresswindow.cpp +++ b/src/gui/widget/progresswindow.cpp @@ -122,6 +122,7 @@ CProgressBar* CProgressWindow::getProgressItem() pBar->setActiveColor(COL_PROGRESSBAR_ACTIVE_PLUS_0); pBar->setFrameThickness(1); pBar->setColorFrame(COL_PROGRESSBAR_ACTIVE_PLUS_0); + pBar->setType(CProgressBar::PB_TIMESCALE); addWindowItem(pBar); return pBar; From 145b1b84fdb32e1de7ab02a0c0975083b1754efb Mon Sep 17 00:00:00 2001 From: vanhofen Date: Mon, 26 Jun 2017 20:53:12 +0200 Subject: [PATCH 4/7] timerlist: add separationline to items (cherry picked from commit 68dac768c0b45cb855514f55254ba6a19956357c) Signed-off-by: Thilo Graf Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/d2415c49303e9bec96132a3b3a3e6a0c61e5701a Author: vanhofen Date: 2017-06-26 (Mon, 26 Jun 2017) Origin message was: ------------------ - timerlist: add separationline to items (cherry picked from commit 68dac768c0b45cb855514f55254ba6a19956357c) Signed-off-by: Thilo Graf --- src/gui/timerlist.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/gui/timerlist.cpp b/src/gui/timerlist.cpp index 601ae3981..dfbc96a9f 100644 --- a/src/gui/timerlist.cpp +++ b/src/gui/timerlist.cpp @@ -677,7 +677,7 @@ void CTimerList::updateEvents(void) header_height = g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->getHeight(); font_height = g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getHeight(); - item_height = 2*font_height; + item_height = 2*font_height + 1; // + 1 for separationline footer_height = header_height; width = frameBuffer->getScreenWidth()/100 * 90; @@ -1160,6 +1160,8 @@ void CTimerList::paintItem(int pos) if (i_radius) frameBuffer->paintBoxRel(x, ypos, real_width, item_height, COL_MENUCONTENT_PLUS_0); frameBuffer->paintBoxRel(x, ypos, real_width, item_height, bgcolor, i_radius); + // separationline + frameBuffer->paintHLineRel(x, real_width, ypos + item_height - 1, (pos + 1 == listmaxshow) ? bgcolor : COL_MENUCONTENTDARK_PLUS_0); //shadow frameBuffer->paintBoxRel(x + width, ypos + OFFSET_SHADOW, OFFSET_SHADOW, item_height, COL_SHADOW_PLUS_0); From 842164614d19f9934cf1cc7ad91ab9be140bafbe Mon Sep 17 00:00:00 2001 From: vanhofen Date: Mon, 26 Jun 2017 20:53:12 +0200 Subject: [PATCH 5/7] timerlist: fix compiler-warning (comparison signed/unsigned int) (cherry picked from commit 3b84c0a7ae63ac9001af3f86285f823ce93503d7) Signed-off-by: Thilo Graf Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/033d6bb3593e3829b8de43f3cb515ec53e9b418b Author: vanhofen Date: 2017-06-26 (Mon, 26 Jun 2017) Origin message was: ------------------ - timerlist: fix compiler-warning (comparison signed/unsigned int) (cherry picked from commit 3b84c0a7ae63ac9001af3f86285f823ce93503d7) Signed-off-by: Thilo Graf --- src/gui/timerlist.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/timerlist.cpp b/src/gui/timerlist.cpp index dfbc96a9f..23f6d734a 100644 --- a/src/gui/timerlist.cpp +++ b/src/gui/timerlist.cpp @@ -1161,7 +1161,7 @@ void CTimerList::paintItem(int pos) frameBuffer->paintBoxRel(x, ypos, real_width, item_height, COL_MENUCONTENT_PLUS_0); frameBuffer->paintBoxRel(x, ypos, real_width, item_height, bgcolor, i_radius); // separationline - frameBuffer->paintHLineRel(x, real_width, ypos + item_height - 1, (pos + 1 == listmaxshow) ? bgcolor : COL_MENUCONTENTDARK_PLUS_0); + frameBuffer->paintHLineRel(x, real_width, ypos + item_height - 1, (pos + 1 == (int) listmaxshow) ? bgcolor : COL_MENUCONTENTDARK_PLUS_0); //shadow frameBuffer->paintBoxRel(x + width, ypos + OFFSET_SHADOW, OFFSET_SHADOW, item_height, COL_SHADOW_PLUS_0); From 30f56a7edc16b7189d03970933cdeadb790d09c1 Mon Sep 17 00:00:00 2001 From: vanhofen Date: Mon, 26 Jun 2017 20:53:12 +0200 Subject: [PATCH 6/7] moviebrowser: fix deletion of non-marked movies via mute-key (cherry picked from commit 15e33337a6982fa0a206a319636c84f66d9a0cf2) Signed-off-by: Thilo Graf Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/2f8ae15b669cc48d33e8b72f1069ea4a1a56b120 Author: vanhofen Date: 2017-06-26 (Mon, 26 Jun 2017) Origin message was: ------------------ - moviebrowser: fix deletion of non-marked movies via mute-key (cherry picked from commit 15e33337a6982fa0a206a319636c84f66d9a0cf2) Signed-off-by: Thilo Graf --- 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 f513de08a..9d3a3e27f 100644 --- a/src/gui/moviebrowser/mb.cpp +++ b/src/gui/moviebrowser/mb.cpp @@ -2480,7 +2480,7 @@ bool CMovieBrowser::onDelete(bool cursor_only) MI_MOVIE_INFO *movieinfo; movieinfo = NULL; - if (cursor_only) + if (cursor_only || (filelist.empty() || movielist.empty())) { filelist.clear(); movielist.clear(); From b8fab4c0fb4bf8b7594142ce5f526c4c57ce0511 Mon Sep 17 00:00:00 2001 From: vanhofen Date: Mon, 26 Jun 2017 20:53:12 +0200 Subject: [PATCH 7/7] bouqueteditor: use default font for CComponentsFooter (cherry picked from commit 17aa5edad9f564abe18f32254d54e142bf272fa2) Signed-off-by: Thilo Graf Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/9d323f499474f1aefa18c8bbee1a8fd3d7f4089f Author: vanhofen Date: 2017-06-26 (Mon, 26 Jun 2017) Origin message was: ------------------ - bouqueteditor: use default font for CComponentsFooter (cherry picked from commit 17aa5edad9f564abe18f32254d54e142bf272fa2) Signed-off-by: Thilo Graf --- src/gui/bedit/bouqueteditor_bouquets.cpp | 2 +- src/gui/bedit/bouqueteditor_channels.cpp | 2 +- src/gui/bedit/bouqueteditor_chanselect.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/gui/bedit/bouqueteditor_bouquets.cpp b/src/gui/bedit/bouqueteditor_bouquets.cpp index 6c8486bc0..a5b2d6ebc 100644 --- a/src/gui/bedit/bouqueteditor_bouquets.cpp +++ b/src/gui/bedit/bouqueteditor_bouquets.cpp @@ -150,7 +150,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-2*OFFSET_INNER_MID, 0, g_Font[SNeutrinoSettings::FONT_TYPE_MENU_FOOT]); + footer.paintButtons(x, y+height, width, ButtonHeight, numbuttons, CBEBouquetWidgetButtons, width/numbuttons-2*OFFSET_INNER_MID); } void CBEBouquetWidget::hide() diff --git a/src/gui/bedit/bouqueteditor_channels.cpp b/src/gui/bedit/bouqueteditor_channels.cpp index 8618ffca5..1b405ae83 100644 --- a/src/gui/bedit/bouqueteditor_channels.cpp +++ b/src/gui/bedit/bouqueteditor_channels.cpp @@ -184,7 +184,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-2*OFFSET_INNER_MID, 0, g_Font[SNeutrinoSettings::FONT_TYPE_MENU_FOOT]); + footer.paintButtons(x, y + (height-footerHeight), width, footerHeight, numbuttons, CBEChannelWidgetButtons, width/numbuttons-2*OFFSET_INNER_MID); } std::string CBEChannelWidget::getInfoText(int index) diff --git a/src/gui/bedit/bouqueteditor_chanselect.cpp b/src/gui/bedit/bouqueteditor_chanselect.cpp index 87227e8df..e9ee12385 100644 --- a/src/gui/bedit/bouqueteditor_chanselect.cpp +++ b/src/gui/bedit/bouqueteditor_chanselect.cpp @@ -251,7 +251,7 @@ void CBEChannelSelectWidget::paintFoot() break; } - footer.paintButtons(x, y + (height-footerHeight), width, footerHeight, numbuttons, Button, width/numbuttons-20); + footer.paintButtons(x, y + (height-footerHeight), width, footerHeight, numbuttons, Button, width/numbuttons-2*OFFSET_INNER_MID); } std::string CBEChannelSelectWidget::getInfoText(int index)