From d4740238ddbbf8a3805bce3f0348d1257e2fbc42 Mon Sep 17 00:00:00 2001 From: Michael Liebmann Date: Sat, 6 Apr 2013 15:42:05 +0200 Subject: [PATCH 01/28] * Supplement to commit adfbfe0... - epgview: Fix colors in progress bar --- src/gui/epgview.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/gui/epgview.cpp b/src/gui/epgview.cpp index 719533328..e28244fa0 100644 --- a/src/gui/epgview.cpp +++ b/src/gui/epgview.cpp @@ -643,6 +643,7 @@ int CEpgData::show(const t_channel_id channel_id, uint64_t a_id, time_t* a_start int pbx = sx + 10 + widthl + 10 + ((ox-104-widthr-widthl-10-10-20)>>1); CProgressBar pb(pbx, sy+oy-height, 104, height-6); pb.setBlink(); + pb.setRgb(0, 100, 70); pb.setValues(epg_done, 100); pb.paint(false); } @@ -688,6 +689,7 @@ int CEpgData::show(const t_channel_id channel_id, uint64_t a_id, time_t* a_start int pbx = sx + 10 + widthl + 10 + ((ox-104-widthr-widthl-10-10-20)>>1); CProgressBar pb(pbx, sy+oy-height, 104, height-6); pb.setBlink(); + pb.setRgb(0, 100, 70); pb.setValues(epg_done, 100); pb.paint(false); } From e0facfa2e0d4244af207c2b9dde9ba0264efdc35 Mon Sep 17 00:00:00 2001 From: Jacek Jendrzej Date: Sat, 6 Apr 2013 22:13:47 +0200 Subject: [PATCH 02/28] revert commit f4ae5e17ce00575de61daba517f37a4bb9252836 --- src/gui/channellist.cpp | 20 +++++--------------- 1 file changed, 5 insertions(+), 15 deletions(-) diff --git a/src/gui/channellist.cpp b/src/gui/channellist.cpp index 4b5c46624..1137fa7b3 100644 --- a/src/gui/channellist.cpp +++ b/src/gui/channellist.cpp @@ -749,21 +749,11 @@ int CChannelList::show() if(bouquetList->Bouquets[nNext]->channelList->isEmpty() ) { found = false; nNext = (nNext + b_size + dir) % b_size; - if(msg == (neutrino_msg_t)g_settings.key_bouquet_down){ - for (int i = nNext; i > 0; i--) { - if( !bouquetList->Bouquets[i]->channelList->isEmpty() ) { - found = true; - nNext = i; - break; - } - } - }else{ - for (int i = nNext; i < b_size; i++) { - if( !bouquetList->Bouquets[i]->channelList->isEmpty() ) { - found = true; - nNext = i; - break; - } + for (int i = nNext; i < b_size; i++) { + if( !bouquetList->Bouquets[i]->channelList->isEmpty() ) { + found = true; + nNext = i; + break; } } } From 80e7f9753b0ac579da5997596b3f53f3d9bc31b0 Mon Sep 17 00:00:00 2001 From: Stefan Seyfried Date: Sat, 6 Apr 2013 13:15:40 +0200 Subject: [PATCH 03/28] CChannelList: fix "prev bouquet" if empty bouquets are present also do proper wrap-around when selecting previous / next bouquet --- src/gui/channellist.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/gui/channellist.cpp b/src/gui/channellist.cpp index 1137fa7b3..4142b4afc 100644 --- a/src/gui/channellist.cpp +++ b/src/gui/channellist.cpp @@ -744,12 +744,13 @@ int CChannelList::show() if (!bouquetList->Bouquets.empty()) { bool found = true; int dir = msg == (neutrino_msg_t)g_settings.key_bouquet_up ? 1 : -1; - int b_size = bouquetList->Bouquets.size(); + int b_size = bouquetList->Bouquets.size(); /* bigger than 0 */ int nNext = (bouquetList->getActiveBouquetNumber() + b_size + dir) % b_size; if(bouquetList->Bouquets[nNext]->channelList->isEmpty() ) { found = false; + int n_old = nNext; nNext = (nNext + b_size + dir) % b_size; - for (int i = nNext; i < b_size; i++) { + for (int i = nNext; i != n_old; i = (i + b_size + dir) % b_size) { if( !bouquetList->Bouquets[i]->channelList->isEmpty() ) { found = true; nNext = i; From 2ba024168d401bb1cd6aa9bf9e0665bbe6966807 Mon Sep 17 00:00:00 2001 From: Stefan Seyfried Date: Sat, 6 Apr 2013 11:49:47 +0200 Subject: [PATCH 04/28] nhttpd: fix streaming with non-standard port --- src/nhttpd/tuxboxapi/coolstream/controlapi.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/nhttpd/tuxboxapi/coolstream/controlapi.cpp b/src/nhttpd/tuxboxapi/coolstream/controlapi.cpp index 8957d6d2a..e8123dde2 100644 --- a/src/nhttpd/tuxboxapi/coolstream/controlapi.cpp +++ b/src/nhttpd/tuxboxapi/coolstream/controlapi.cpp @@ -2555,6 +2555,10 @@ void CControlAPI::build_live_url(CyhookHandler *hh) url = "http://"+hh->ParamList["host"]; else url = "http://"+hh->HeaderList["Host"]; + /* strip off optional custom port */ + if (url.rfind(":") != 4) + url = url.substr(0, url.rfind(":")); + //url += (mode == CZapitClient::MODE_TV) ? ":31339/0," : ":31338/"; url += ":31339/0,"; url += xpids; From 8d8ce4c55ab6b93e5f861a73b34e22cb136af304 Mon Sep 17 00:00:00 2001 From: Stefan Seyfried Date: Sat, 6 Apr 2013 12:28:18 +0200 Subject: [PATCH 05/28] cc_frm: fix invalid cast --- src/gui/components/cc_frm.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/components/cc_frm.cpp b/src/gui/components/cc_frm.cpp index 443e04d63..1a55a32f1 100644 --- a/src/gui/components/cc_frm.cpp +++ b/src/gui/components/cc_frm.cpp @@ -178,7 +178,7 @@ void CComponentsForm::insertCCItem(const uint& cc_item_id, CComponentsItem* cc_I if (cc_Item == NULL){ #ifdef DEBUG_CC - printf("[CComponentsForm] %s parameter: cc_Item = %d...\n", __FUNCTION__, (int)cc_Item); + printf("[CComponentsForm] %s parameter: cc_Item = %p...\n", __func__, cc_Item); #endif return; } From 276fa6273e4b2fa31fb6921fa2156d0c76af06d7 Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Sun, 7 Apr 2013 20:37:30 +0200 Subject: [PATCH 06/28] CProgressBar: use correct default colors in constructor --- src/gui/components/cc_item_progressbar.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/components/cc_item_progressbar.h b/src/gui/components/cc_item_progressbar.h index a7c0d5796..36bb4d26c 100644 --- a/src/gui/components/cc_item_progressbar.h +++ b/src/gui/components/cc_item_progressbar.h @@ -111,7 +111,7 @@ class CProgressBar : public CComponentsItem CProgressBar(); CProgressBar( const int x_pos, const int y_pos, const int w = -1, const int h = -1, - fb_pixel_t color_frame = 0, fb_pixel_t color_body = COL_INFOBAR_PLUS_3, fb_pixel_t color_shadow = COL_INFOBAR_PLUS_7, + fb_pixel_t color_frame = 0, fb_pixel_t color_body = COL_MENUCONTENT_PLUS_0, fb_pixel_t color_shadow = COL_MENUCONTENTDARK_PLUS_0, const fb_pixel_t active_col = COL_INFOBAR_PLUS_7, const fb_pixel_t passive_col = COL_INFOBAR_PLUS_3, const bool blinkenlights = false, const int r = 40, const int g = 100, const int b =70, From 9a9a347ee312976fbcdda68bdf0869f6c1c3f4ab Mon Sep 17 00:00:00 2001 From: Michael Liebmann Date: Sun, 7 Apr 2013 23:02:26 +0200 Subject: [PATCH 07/28] * src/gui/audioplayer.cpp: Fix segfault in audioplayer osd --- src/gui/audioplayer.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gui/audioplayer.cpp b/src/gui/audioplayer.cpp index 9c87241de..4807aeb23 100644 --- a/src/gui/audioplayer.cpp +++ b/src/gui/audioplayer.cpp @@ -1525,8 +1525,8 @@ void CAudioPlayerGui::hide() // printf("hide(){\n"); if (m_visible) { - m_frameBuffer->paintBackgroundBoxRel(m_x - ConnectLineBox_Width-1, m_y + m_title_height - 1, - m_width + ConnectLineBox_Width+2, m_height + 2 - m_title_height); + m_frameBuffer->paintBackgroundBoxRel(m_x - ConnectLineBox_Width, m_y + m_title_height, + m_width + ConnectLineBox_Width, m_height - m_title_height); clearItemID3DetailsLine(); m_frameBuffer->paintBackgroundBoxRel(m_x, m_y, m_width, m_title_height); m_visible = false; From c0a1b8690fec0beae870c35ad61850fe4e8b3f9f Mon Sep 17 00:00:00 2001 From: Stefan Seyfried Date: Sat, 6 Apr 2013 16:59:13 +0200 Subject: [PATCH 08/28] CScanTs: add destructor to avoid leaks --- src/gui/scan.cpp | 6 ++++++ src/gui/scan.h | 1 + 2 files changed, 7 insertions(+) diff --git a/src/gui/scan.cpp b/src/gui/scan.cpp index 28838244c..a3e85b090 100644 --- a/src/gui/scan.cpp +++ b/src/gui/scan.cpp @@ -88,6 +88,12 @@ CScanTs::CScanTs() snrscale->setBlink(); } +CScanTs::~CScanTs() +{ + delete sigscale; + delete snrscale; +} + void CScanTs::prev_next_TP( bool up) { t_satellite_position position = 0; diff --git a/src/gui/scan.h b/src/gui/scan.h index 4464f6441..f35a73092 100644 --- a/src/gui/scan.h +++ b/src/gui/scan.h @@ -83,6 +83,7 @@ class CScanTs : public CMenuTarget public: CScanTs(); + ~CScanTs(); void hide(); int exec(CMenuTarget* parent, const std::string & actionKey); }; From 13871d832883c97bd4fc21a167d15f7a89fa4feb Mon Sep 17 00:00:00 2001 From: Stefan Seyfried Date: Sat, 6 Apr 2013 16:59:39 +0200 Subject: [PATCH 09/28] CScanTs: silence valgrind --- src/gui/scan.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/gui/scan.cpp b/src/gui/scan.cpp index a3e85b090..eeaac8342 100644 --- a/src/gui/scan.cpp +++ b/src/gui/scan.cpp @@ -86,6 +86,7 @@ CScanTs::CScanTs() snrscale = new CProgressBar(); snrscale->setBlink(); + memset(&TP, 0, sizeof(TP)); // valgrind } CScanTs::~CScanTs() @@ -236,6 +237,7 @@ int CScanTs::exec(CMenuTarget* /*parent*/, const std::string & actionKey) CServiceScan::getInstance()->SetCableNID(scansettings.cable_nid); CZapitClient::commandSetScanSatelliteList sat; + memset(&sat, 0, sizeof(sat)); // valgrind CZapitClient::ScanSatelliteList satList; satList.clear(); if(fast) { From 629dc8562f8ed0f9a4cb4057cc3039739f7d6799 Mon Sep 17 00:00:00 2001 From: Stefan Seyfried Date: Sat, 6 Apr 2013 17:47:06 +0200 Subject: [PATCH 10/28] fontrenderer: use background color of framebuffer --- src/driver/fontrenderer.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/driver/fontrenderer.cpp b/src/driver/fontrenderer.cpp index 662e3968a..163c8aaa0 100644 --- a/src/driver/fontrenderer.cpp +++ b/src/driver/fontrenderer.cpp @@ -432,7 +432,10 @@ void Font::RenderString(int x, int y, const int width, const char *text, const u static fb_pixel_t oldbgcolor = 0, oldfgcolor = 0; static fb_pixel_t colors[256]={0}; - fb_pixel_t bgcolor = frameBuffer->realcolor[color]; + /* fetch bgcolor from framebuffer, using lower left edge of the font... */ + fb_pixel_t bgcolor = *(frameBuffer->getFrameBufferPointer() + x + + y * frameBuffer->getStride() / sizeof(fb_pixel_t)); + // fb_pixel_t bgcolor = frameBuffer->realcolor[color]; fb_pixel_t fgcolor = frameBuffer->realcolor[(((((int)color) + 2) | 7) - 2)]; if((oldbgcolor != bgcolor) || (oldfgcolor != fgcolor)) { From cc1dea140ad054e70c76c2cc39dcc5f8e3509b77 Mon Sep 17 00:00:00 2001 From: Stefan Seyfried Date: Sun, 7 Apr 2013 17:20:42 +0200 Subject: [PATCH 11/28] mp3dec: recover from PCM write errors without crashing --- src/driver/audiodec/mp3dec.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/driver/audiodec/mp3dec.cpp b/src/driver/audiodec/mp3dec.cpp index c0fa2da42..458873e56 100644 --- a/src/driver/audiodec/mp3dec.cpp +++ b/src/driver/audiodec/mp3dec.cpp @@ -768,6 +768,8 @@ q * next mad_frame_decode() invocation. (See the comments marked { fprintf(stderr,"%s: PCM write error in stereo (%s).\n", ProgName, strerror(errno)); Status = WRITE_ERR; + Synth.pcm.length = 0; /* discard buffer */ + OutputPtr = OutputBuffer; break; } @@ -835,6 +837,8 @@ q * next mad_frame_decode() invocation. (See the comments marked { fprintf(stderr,"%s: PCM write error in mono (%s).\n", ProgName, strerror(errno)); Status = WRITE_ERR; + Synth.pcm.length = 0; /* discard buffer */ + OutputPtr = OutputBuffer; break; } From 88fde35e52c710e34957b742f19e805cdecd2e6e Mon Sep 17 00:00:00 2001 From: Stefan Seyfried Date: Sun, 7 Apr 2013 17:26:53 +0200 Subject: [PATCH 12/28] test_menu: fix path to demo picture --- src/gui/test_menu.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/test_menu.cpp b/src/gui/test_menu.cpp index b714c5f22..86faad1f8 100644 --- a/src/gui/test_menu.cpp +++ b/src/gui/test_menu.cpp @@ -350,7 +350,7 @@ int CTestMenu::exec(CMenuTarget* parent, const std::string &actionKey) } else if (actionKey == "picture"){ if (pic == NULL) - pic = new CComponentsPicture (100, 100, 200, 200, "/share/tuxbox/neutrino/icons/mp3-5.jpg"); + pic = new CComponentsPicture (100, 100, 200, 200, DATADIR "/neutrino/icons/mp3-5.jpg"); if (!pic->isPainted() && !pic->isPicPainted()) pic->paint(); From a5c61603847de5fe9859bf9117e6b1110f2e5fe1 Mon Sep 17 00:00:00 2001 From: Stefan Seyfried Date: Sun, 7 Apr 2013 17:57:58 +0200 Subject: [PATCH 13/28] audioplayer: don't free curl_handle too early --- src/gui/audioplayer.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/gui/audioplayer.cpp b/src/gui/audioplayer.cpp index 4807aeb23..167da68e5 100644 --- a/src/gui/audioplayer.cpp +++ b/src/gui/audioplayer.cpp @@ -1055,9 +1055,6 @@ void CAudioPlayerGui::processPlaylistUrl(const char *url, const char *name, cons /* get it! */ curl_easy_perform(curl_handle); - /* cleanup curl stuff */ - curl_easy_cleanup(curl_handle); - /* * Now, our chunk.memory points to a memory block that is chunk.size * bytes big and contains the remote file. @@ -1098,6 +1095,9 @@ void CAudioPlayerGui::processPlaylistUrl(const char *url, const char *name, cons } } + /* cleanup curl stuff */ + curl_easy_cleanup(curl_handle); + if (chunk.memory) free(chunk.memory); From 89251f648ea431eb2808e3e4e575b3dc1c25a1c8 Mon Sep 17 00:00:00 2001 From: Stefan Seyfried Date: Sun, 7 Apr 2013 18:15:49 +0200 Subject: [PATCH 14/28] fontrenderer: allow using customcolor.h colors for fonts --- src/driver/fontrenderer.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/driver/fontrenderer.cpp b/src/driver/fontrenderer.cpp index 163c8aaa0..44de21344 100644 --- a/src/driver/fontrenderer.cpp +++ b/src/driver/fontrenderer.cpp @@ -436,7 +436,10 @@ void Font::RenderString(int x, int y, const int width, const char *text, const u fb_pixel_t bgcolor = *(frameBuffer->getFrameBufferPointer() + x + y * frameBuffer->getStride() / sizeof(fb_pixel_t)); // fb_pixel_t bgcolor = frameBuffer->realcolor[color]; - fb_pixel_t fgcolor = frameBuffer->realcolor[(((((int)color) + 2) | 7) - 2)]; + uint8_t fgindex = color; /* index of font color in the palette */ + if (color > COL_BLACK0 && color < 254) /* bigger than 254 would result in > 255 */ + fgindex = ((((int)color) + 2) | 7) - 2; /* no idea what this does exactly... */ + fb_pixel_t fgcolor = frameBuffer->realcolor[fgindex]; if((oldbgcolor != bgcolor) || (oldfgcolor != fgcolor)) { From 55e37eb2b53adea5306b49dc1e704190a0de16ca Mon Sep 17 00:00:00 2001 From: Michael Liebmann Date: Mon, 8 Apr 2013 16:55:14 +0200 Subject: [PATCH 15/28] * src/gui/audioplayer.cpp: Fix osd (draw frame) --- src/gui/audioplayer.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/gui/audioplayer.cpp b/src/gui/audioplayer.cpp index 167da68e5..1738b2dae 100644 --- a/src/gui/audioplayer.cpp +++ b/src/gui/audioplayer.cpp @@ -1797,13 +1797,13 @@ void CAudioPlayerGui::paintInfo() if (!m_show_playlist) { // no playlist -> smaller Info-Box - m_frameBuffer->paintBoxFrame(m_x, m_y, m_width, m_title_height - 10 - m_fheight,2, COL_MENUCONTENT_PLUS_6, c_rad_mid); - m_frameBuffer->paintBoxRel(m_x + 2, m_y + 2 , m_width - 4, m_title_height - 14 - m_fheight, COL_MENUCONTENTSELECTED_PLUS_0, c_rad_mid); + m_frameBuffer->paintBoxRel(m_x + 1, m_y + 1 , m_width - 2, m_title_height - 12 - m_fheight, COL_MENUCONTENTSELECTED_PLUS_0, c_rad_mid); + m_frameBuffer->paintBoxFrame(m_x, m_y, m_width, m_title_height - 10 - m_fheight, 2, COL_MENUCONTENT_PLUS_6, c_rad_mid); } else { - m_frameBuffer->paintBoxFrame(m_x, m_y, m_width, m_title_height - 10,2, COL_MENUCONTENT_PLUS_6, c_rad_mid); - m_frameBuffer->paintBoxRel(m_x + 2, m_y + 2 , m_width - 4, m_title_height - 14, COL_MENUCONTENTSELECTED_PLUS_0, c_rad_mid); + m_frameBuffer->paintBoxRel(m_x + 1, m_y + 1 , m_width - 2, m_title_height - 12, COL_MENUCONTENTSELECTED_PLUS_0, c_rad_mid); + m_frameBuffer->paintBoxFrame(m_x, m_y, m_width, m_title_height - 10, 2, COL_MENUCONTENT_PLUS_6, c_rad_mid); } // first line (Track number) From 67e6ed102c9e2f499f47cdae4cf5ce0e33d13858 Mon Sep 17 00:00:00 2001 From: Jacek Jendrzej Date: Mon, 8 Apr 2013 17:42:37 +0200 Subject: [PATCH 16/28] src/gui/epgview.cpp: fixes from tuxbox, THX Gaucho316 & GetAway --- src/gui/epgview.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/gui/epgview.cpp b/src/gui/epgview.cpp index e28244fa0..83fa9dfcc 100644 --- a/src/gui/epgview.cpp +++ b/src/gui/epgview.cpp @@ -224,10 +224,10 @@ void CEpgData::showText( int startPos, int ypos ) int max_mon_w = 0, max_wday_w = 0; int digi = g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO2]->getRenderWidth("29.."); for(int i = 0; i < 12;i++){ - max_mon_w = std::max(max_mon_w ,g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO2]->getRenderWidth(g_Locale->getText(CLocaleManager::getMonth(i)))); + max_mon_w = std::max(max_mon_w ,g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO2]->getRenderWidth(std::string(g_Locale->getText(CLocaleManager::getMonth(i))) + ".", true)); // UTF-8 if(i > 6) continue; - max_wday_w = std::max(max_wday_w ,g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO2]->getRenderWidth(g_Locale->getText(CLocaleManager::getWeekday(i)))); + max_wday_w = std::max(max_wday_w ,g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO2]->getRenderWidth(std::string(g_Locale->getText(CLocaleManager::getWeekday(i))) + ".", true)); // UTF-8 } frameBuffer->paintBoxRel(sx, y, ox- 15, sb, COL_MENUCONTENT_PLUS_0); // background of the text box for (int i = startPos; i < textSize && i < startPos + medlinecount; i++, y += medlineheight) @@ -878,7 +878,7 @@ int CEpgData::show(const t_channel_id channel_id, uint64_t a_id, time_t* a_start g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO2]->setSize((int)(g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO2]->getSize() / BIG_FONT_FAKTOR)); } g_settings.bigFonts = bigFonts; - show(channel_id, id, &startzeit, false); + show(channel_id, id, &startzeit, false, call_fromfollowlist); showPos=0; break; From f3dcf52ea009266e34bf917ae633ef56a715c5ad Mon Sep 17 00:00:00 2001 From: Jacek Jendrzej Date: Mon, 8 Apr 2013 18:03:33 +0200 Subject: [PATCH 17/28] revert 89251f648ea431eb2808e3e4e575b3dc1c25a1c8 && 89251f648ea431eb2808e3e4e575b3dc1c25a1c8 --- src/driver/fontrenderer.cpp | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/src/driver/fontrenderer.cpp b/src/driver/fontrenderer.cpp index 44de21344..662e3968a 100644 --- a/src/driver/fontrenderer.cpp +++ b/src/driver/fontrenderer.cpp @@ -432,14 +432,8 @@ void Font::RenderString(int x, int y, const int width, const char *text, const u static fb_pixel_t oldbgcolor = 0, oldfgcolor = 0; static fb_pixel_t colors[256]={0}; - /* fetch bgcolor from framebuffer, using lower left edge of the font... */ - fb_pixel_t bgcolor = *(frameBuffer->getFrameBufferPointer() + x + - y * frameBuffer->getStride() / sizeof(fb_pixel_t)); - // fb_pixel_t bgcolor = frameBuffer->realcolor[color]; - uint8_t fgindex = color; /* index of font color in the palette */ - if (color > COL_BLACK0 && color < 254) /* bigger than 254 would result in > 255 */ - fgindex = ((((int)color) + 2) | 7) - 2; /* no idea what this does exactly... */ - fb_pixel_t fgcolor = frameBuffer->realcolor[fgindex]; + fb_pixel_t bgcolor = frameBuffer->realcolor[color]; + fb_pixel_t fgcolor = frameBuffer->realcolor[(((((int)color) + 2) | 7) - 2)]; if((oldbgcolor != bgcolor) || (oldfgcolor != fgcolor)) { From d23bdf7bb84976b6428eee8e0fe039da48384b39 Mon Sep 17 00:00:00 2001 From: Jacek Jendrzej Date: Mon, 8 Apr 2013 20:41:36 +0200 Subject: [PATCH 18/28] src/gui/epgview.cpp: fixes2 from tuxbox, THX Gaucho316 --- src/gui/epgview.cpp | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/src/gui/epgview.cpp b/src/gui/epgview.cpp index 83fa9dfcc..ad7b058bb 100644 --- a/src/gui/epgview.cpp +++ b/src/gui/epgview.cpp @@ -741,7 +741,7 @@ int CEpgData::show(const t_channel_id channel_id, uint64_t a_id, time_t* a_start case CRCInput::RC_up: showPos -= scrollCount; if (showPos<0) - showPos = 0; + showPos=0; else showText(showPos, sy + toph); break; @@ -765,7 +765,13 @@ int CEpgData::show(const t_channel_id channel_id, uint64_t a_id, time_t* a_start strcpy(recDir, b.getSelectedFile()->Name.c_str()); } else doRecord = false; + if (!bigFonts && g_settings.bigFonts) { + g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO1]->setSize((int)(g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO1]->getSize() * BIG_FONT_FAKTOR)); + g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO2]->setSize((int)(g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO2]->getSize() * BIG_FONT_FAKTOR)); + } + bigFonts = g_settings.bigFonts; show(channel_id,epgData.eventID,&epgData.epg_times.startzeit,false); + showPos=0; } else if (g_settings.recording_choose_direct_rec_dir == 1) { @@ -775,7 +781,13 @@ int CEpgData::show(const t_channel_id channel_id, uint64_t a_id, time_t* a_start { hide(); recDirs.exec(NULL,""); + if (!bigFonts && g_settings.bigFonts) { + g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO1]->setSize((int)(g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO1]->getSize() * BIG_FONT_FAKTOR)); + g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO2]->setSize((int)(g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO2]->getSize() * BIG_FONT_FAKTOR)); + } + bigFonts = g_settings.bigFonts; show(channel_id,epgData.eventID,&epgData.epg_times.startzeit,false); + showPos=0; timeoutEnd = CRCInput::calcTimeoutEnd(g_settings.timing[SNeutrinoSettings::TIMING_EPG]); } else { @@ -857,6 +869,7 @@ int CEpgData::show(const t_channel_id channel_id, uint64_t a_id, time_t* a_start } bigFonts = g_settings.bigFonts; show(channel_id,tmp_eID,&tmp_sZeit,false); + showPos=0; } break; } From 6a32e96920e9c0489e56946eb58c0e0035be8898 Mon Sep 17 00:00:00 2001 From: Jacek Jendrzej Date: Mon, 8 Apr 2013 21:03:46 +0200 Subject: [PATCH 19/28] src/gui/epgview.cpp: fixes3 from tuxbox, THX Gaucho316 --- src/gui/epgview.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/gui/epgview.cpp b/src/gui/epgview.cpp index ad7b058bb..6df9737b2 100644 --- a/src/gui/epgview.cpp +++ b/src/gui/epgview.cpp @@ -866,10 +866,10 @@ int CEpgData::show(const t_channel_id channel_id, uint64_t a_id, time_t* a_start g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO1]->setSize((int)(g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO1]->getSize() * BIG_FONT_FAKTOR)); g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO2]->setSize((int)(g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO2]->getSize() * BIG_FONT_FAKTOR)); } + bigFonts = g_settings.bigFonts; + show(channel_id,tmp_eID,&tmp_sZeit,false); + showPos=0; } - bigFonts = g_settings.bigFonts; - show(channel_id,tmp_eID,&tmp_sZeit,false); - showPos=0; } break; } From e66b57cd8894dcea92b6f629c3cc39deb8d9a13b Mon Sep 17 00:00:00 2001 From: Stefan Seyfried Date: Sat, 6 Apr 2013 17:47:06 +0200 Subject: [PATCH 20/28] fontrenderer: use background color of framebuffer --- src/driver/fontrenderer.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/driver/fontrenderer.cpp b/src/driver/fontrenderer.cpp index 662e3968a..163c8aaa0 100644 --- a/src/driver/fontrenderer.cpp +++ b/src/driver/fontrenderer.cpp @@ -432,7 +432,10 @@ void Font::RenderString(int x, int y, const int width, const char *text, const u static fb_pixel_t oldbgcolor = 0, oldfgcolor = 0; static fb_pixel_t colors[256]={0}; - fb_pixel_t bgcolor = frameBuffer->realcolor[color]; + /* fetch bgcolor from framebuffer, using lower left edge of the font... */ + fb_pixel_t bgcolor = *(frameBuffer->getFrameBufferPointer() + x + + y * frameBuffer->getStride() / sizeof(fb_pixel_t)); + // fb_pixel_t bgcolor = frameBuffer->realcolor[color]; fb_pixel_t fgcolor = frameBuffer->realcolor[(((((int)color) + 2) | 7) - 2)]; if((oldbgcolor != bgcolor) || (oldfgcolor != fgcolor)) { From 90c252f6f9ab4d2af85d2fab44d204d948cef656 Mon Sep 17 00:00:00 2001 From: Stefan Seyfried Date: Sun, 7 Apr 2013 18:15:49 +0200 Subject: [PATCH 21/28] fontrenderer: allow using customcolor.h colors for fonts --- src/driver/fontrenderer.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/driver/fontrenderer.cpp b/src/driver/fontrenderer.cpp index 163c8aaa0..44de21344 100644 --- a/src/driver/fontrenderer.cpp +++ b/src/driver/fontrenderer.cpp @@ -436,7 +436,10 @@ void Font::RenderString(int x, int y, const int width, const char *text, const u fb_pixel_t bgcolor = *(frameBuffer->getFrameBufferPointer() + x + y * frameBuffer->getStride() / sizeof(fb_pixel_t)); // fb_pixel_t bgcolor = frameBuffer->realcolor[color]; - fb_pixel_t fgcolor = frameBuffer->realcolor[(((((int)color) + 2) | 7) - 2)]; + uint8_t fgindex = color; /* index of font color in the palette */ + if (color > COL_BLACK0 && color < 254) /* bigger than 254 would result in > 255 */ + fgindex = ((((int)color) + 2) | 7) - 2; /* no idea what this does exactly... */ + fb_pixel_t fgcolor = frameBuffer->realcolor[fgindex]; if((oldbgcolor != bgcolor) || (oldfgcolor != fgcolor)) { From ca9b85b3f55f916a04c2074fb461d2e8e145f2d1 Mon Sep 17 00:00:00 2001 From: Stefan Seyfried Date: Tue, 9 Apr 2013 08:23:32 +0200 Subject: [PATCH 22/28] fontrenderer: fix rendering problems with accelerated blitting --- src/driver/fontrenderer.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/driver/fontrenderer.cpp b/src/driver/fontrenderer.cpp index 44de21344..f0d0220db 100644 --- a/src/driver/fontrenderer.cpp +++ b/src/driver/fontrenderer.cpp @@ -432,14 +432,20 @@ void Font::RenderString(int x, int y, const int width, const char *text, const u static fb_pixel_t oldbgcolor = 0, oldfgcolor = 0; static fb_pixel_t colors[256]={0}; - /* fetch bgcolor from framebuffer, using lower left edge of the font... */ - fb_pixel_t bgcolor = *(frameBuffer->getFrameBufferPointer() + x + - y * frameBuffer->getStride() / sizeof(fb_pixel_t)); // fb_pixel_t bgcolor = frameBuffer->realcolor[color]; uint8_t fgindex = color; /* index of font color in the palette */ if (color > COL_BLACK0 && color < 254) /* bigger than 254 would result in > 255 */ fgindex = ((((int)color) + 2) | 7) - 2; /* no idea what this does exactly... */ fb_pixel_t fgcolor = frameBuffer->realcolor[fgindex]; +#ifndef USE_NEVIS_GXA + /* the GXA seems to do it's job asynchonously, so we need to wait until + it's ready, otherwise the font will sometimes "be overwritten" with + background color or bgcolor will be wrong */ + frameBuffer->waitForIdle(); +#endif + /* fetch bgcolor from framebuffer, using lower left edge of the font... */ + fb_pixel_t bgcolor = *(frameBuffer->getFrameBufferPointer() + x + + y * frameBuffer->getStride() / sizeof(fb_pixel_t)); if((oldbgcolor != bgcolor) || (oldfgcolor != fgcolor)) { @@ -484,12 +490,6 @@ void Font::RenderString(int x, int y, const int width, const char *text, const u spread_by = 1; } - /* the GXA seems to do it's job asynchonously, so we need to wait until - it's ready, otherwise the font will sometimes "be overwritten" with - background color */ -#ifndef USE_NEVIS_GXA - frameBuffer->waitForIdle(); -#endif for (; *text; text++) { FTC_SBit glyph; From f5297f06d9b58e2ecf3f3e298540b5ab16e62e12 Mon Sep 17 00:00:00 2001 From: Jacek Jendrzej Date: Wed, 10 Apr 2013 11:59:48 +0200 Subject: [PATCH 23/28] src/neutrino.cpp: fix execute rcK script --- src/neutrino.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/neutrino.cpp b/src/neutrino.cpp index d22776f76..5f269773e 100644 --- a/src/neutrino.cpp +++ b/src/neutrino.cpp @@ -2945,7 +2945,7 @@ void CNeutrinoApp::ExitRun(const bool /*write_si*/, int retcode) mode = mode_off; //CVFD::getInstance()->ShowText(g_Locale->getText(LOCALE_MAINMENU_SHUTDOWN)); - my_system(2,"/etc/init.d/rcK"); + my_system("/etc/init.d/rcK"); sync(); my_system(2,"/bin/umount", "-a"); sleep(1); From 4a8350c3824c2c337045a4b6d89e15543e3b2565 Mon Sep 17 00:00:00 2001 From: Jacek Jendrzej Date: Wed, 10 Apr 2013 19:28:30 +0200 Subject: [PATCH 24/28] src/gui/channellist.cpp: fix paint details with different font size --- src/gui/channellist.cpp | 16 ++++++++++------ src/gui/channellist.h | 1 + 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/src/gui/channellist.cpp b/src/gui/channellist.cpp index 4142b4afc..423094918 100644 --- a/src/gui/channellist.cpp +++ b/src/gui/channellist.cpp @@ -112,6 +112,8 @@ CChannelList::CChannelList(const char * const pName, bool phistoryMode, bool _vl footerHeight = g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->getHeight()+6; //initial height value for buttonbar theight = g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->getHeight(); fheight = g_Font[SNeutrinoSettings::FONT_TYPE_CHANNELLIST]->getHeight(); + fdescrheight = g_Font[SNeutrinoSettings::FONT_TYPE_CHANNELLIST_DESCR]->getHeight(); + previous_channellist_additional = -1; eventFont = SNeutrinoSettings::FONT_TYPE_CHANNELLIST_EVENT; dline = NULL; @@ -482,6 +484,8 @@ void CChannelList::calcSize() // recalculate theight, fheight and footerHeight for a possilble change of fontsize factor theight = g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->getHeight(); fheight = g_Font[SNeutrinoSettings::FONT_TYPE_CHANNELLIST]->getHeight(); + fdescrheight = g_Font[SNeutrinoSettings::FONT_TYPE_CHANNELLIST_DESCR]->getHeight(); + if (fheight == 0) fheight = 1; /* avoid div-by-zero crash on invalid font */ footerHeight = g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->getHeight()+6; @@ -494,7 +498,7 @@ void CChannelList::calcSize() width = full_width; // calculate height (the infobox below mainbox is handled outside height) - info_height = 2*fheight + g_Font[SNeutrinoSettings::FONT_TYPE_CHANNELLIST_DESCR]->getHeight() + 10; + info_height = 2*fheight + fdescrheight + 10; height = frameBuffer->getScreenHeightRel() - info_height; // calculate x position @@ -1577,12 +1581,12 @@ void CChannelList::paintDetails(int index) } } #endif - g_Font[SNeutrinoSettings::FONT_TYPE_CHANNELLIST_DESCR]->RenderString(x+ xstart, y+ height+ 5+ 2* fheight, full_width- xstart- 30- noch_len, text2, colored_event_C ? COL_COLORED_EVENTS_CHANNELLIST : COL_MENUCONTENTDARK, 0, true); + g_Font[SNeutrinoSettings::FONT_TYPE_CHANNELLIST_DESCR]->RenderString(x+ xstart, y+ height+ 5+ fdescrheight+ fheight, full_width- xstart- 30- noch_len, text2, colored_event_C ? COL_COLORED_EVENTS_CHANNELLIST : COL_MENUCONTENTDARK, 0, true); } g_Font[SNeutrinoSettings::FONT_TYPE_CHANNELLIST]->RenderString(x+ 10, y+ height+ 5+ fheight, full_width - 30 - seit_len, text1, colored_event_C ? COL_COLORED_EVENTS_CHANNELLIST : COL_MENUCONTENTDARK, 0, true); g_Font[SNeutrinoSettings::FONT_TYPE_CHANNELLIST_DESCR]->RenderString(x+ full_width- 10- seit_len, y+ height+ 5+ fheight, seit_len, cSeit, colored_event_C ? COL_COLORED_EVENTS_CHANNELLIST : COL_MENUCONTENTDARK, 0, true); // UTF-8 - g_Font[SNeutrinoSettings::FONT_TYPE_CHANNELLIST_DESCR]->RenderString(x+ full_width- 10- noch_len, y+ height+ 5+ 2* fheight, noch_len, cNoch, colored_event_C ? COL_COLORED_EVENTS_CHANNELLIST : COL_MENUCONTENTDARK, 0, true); // UTF-8 + g_Font[SNeutrinoSettings::FONT_TYPE_CHANNELLIST_DESCR]->RenderString(x+ full_width- 10- noch_len, y+ height+ 5+ fdescrheight+ fheight, noch_len, cNoch, colored_event_C ? COL_COLORED_EVENTS_CHANNELLIST : COL_MENUCONTENTDARK, 0, true); // UTF-8 } if(g_settings.channellist_foot == 0) { transponder t; @@ -1594,7 +1598,7 @@ void CChannelList::paintDetails(int index) else desc = desc + " (" + CServiceManager::getInstance()->GetSatelliteName(chanlist[index]->getSatellitePosition()) + ")"; - g_Font[SNeutrinoSettings::FONT_TYPE_CHANNELLIST]->RenderString(x+ 10, y+ height+ 5+ 3*fheight, full_width - 30, desc.c_str(), COL_MENUCONTENTDARK, 0, true); + g_Font[SNeutrinoSettings::FONT_TYPE_CHANNELLIST]->RenderString(x+ 10, y+ height+ 5+ 2*fheight, full_width - 30, desc.c_str(), COL_MENUCONTENTDARK, 0, true); } else if( !displayNext && g_settings.channellist_foot == 1) { // next Event char buf[128] = {0}; @@ -1607,8 +1611,8 @@ void CChannelList::paintDetails(int index) snprintf(buf, sizeof(buf), "%s", CurrentNext.next_name.c_str()); int from_len = g_Font[SNeutrinoSettings::FONT_TYPE_CHANNELLIST_DESCR]->getRenderWidth(cFrom, true); // UTF-8 - g_Font[SNeutrinoSettings::FONT_TYPE_CHANNELLIST]->RenderString(x+ 10, y+ height+ 5+ 3*fheight, full_width - 30 - from_len, buf, colored_event_N ? COL_COLORED_EVENTS_CHANNELLIST :COL_MENUCONTENTDARK, 0, true); - g_Font[SNeutrinoSettings::FONT_TYPE_CHANNELLIST_DESCR]->RenderString(x+ full_width- 10- from_len, y+ height+ 5+ 3*fheight, from_len, cFrom, colored_event_N ? COL_COLORED_EVENTS_CHANNELLIST : COL_MENUCONTENTDARK, 0, true); // UTF-8 + g_Font[SNeutrinoSettings::FONT_TYPE_CHANNELLIST]->RenderString(x+ 10, y+ height+ 5+ 2*fheight+ fdescrheight, full_width - 30 - from_len, buf, colored_event_N ? COL_COLORED_EVENTS_CHANNELLIST :COL_MENUCONTENTDARK, 0, true); + g_Font[SNeutrinoSettings::FONT_TYPE_CHANNELLIST_DESCR]->RenderString(x+ full_width- 10- from_len, y+ height+ 5+ 2*fheight+ fdescrheight, from_len, cFrom, colored_event_N ? COL_COLORED_EVENTS_CHANNELLIST : COL_MENUCONTENTDARK, 0, true); // UTF-8 } } if ((g_settings.channellist_additional) && (p_event != NULL)) diff --git a/src/gui/channellist.h b/src/gui/channellist.h index 1dd633d35..6c0828f5e 100644 --- a/src/gui/channellist.h +++ b/src/gui/channellist.h @@ -68,6 +68,7 @@ private: int new_zap_mode; int fheight; // Fonthoehe Channellist-Inhalt int theight; // Fonthoehe Channellist-Titel + int fdescrheight; int footerHeight; int eventFont; int ffheight; From 838cf61a692095f4688251eace39bf5e32dbb865 Mon Sep 17 00:00:00 2001 From: Jacek Jendrzej Date: Wed, 10 Apr 2013 20:43:32 +0200 Subject: [PATCH 25/28] src/gui/channellist.cpp: fix to 4a8350c3824c2c337045a4b6d89e15543e3b2565 --- src/gui/channellist.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/channellist.cpp b/src/gui/channellist.cpp index 423094918..2a0acfa4e 100644 --- a/src/gui/channellist.cpp +++ b/src/gui/channellist.cpp @@ -1598,7 +1598,7 @@ void CChannelList::paintDetails(int index) else desc = desc + " (" + CServiceManager::getInstance()->GetSatelliteName(chanlist[index]->getSatellitePosition()) + ")"; - g_Font[SNeutrinoSettings::FONT_TYPE_CHANNELLIST]->RenderString(x+ 10, y+ height+ 5+ 2*fheight, full_width - 30, desc.c_str(), COL_MENUCONTENTDARK, 0, true); + g_Font[SNeutrinoSettings::FONT_TYPE_CHANNELLIST]->RenderString(x+ 10, y+ height+ 5+ 2*fheight +fdescrheight, full_width - 30, desc.c_str(), COL_MENUCONTENTDARK, 0, true); } else if( !displayNext && g_settings.channellist_foot == 1) { // next Event char buf[128] = {0}; From d937082cd52af3bedf65e6efc47a78353d1b4337 Mon Sep 17 00:00:00 2001 From: svenhoefer Date: Sat, 13 Apr 2013 09:31:39 +0200 Subject: [PATCH 26/28] - eventlist: fix round borders for current unselected event --- src/gui/eventlist.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/gui/eventlist.cpp b/src/gui/eventlist.cpp index 97282ce39..368cc583c 100644 --- a/src/gui/eventlist.cpp +++ b/src/gui/eventlist.cpp @@ -717,12 +717,13 @@ void CNeutrinoEventList::paintItem(unsigned int pos, t_channel_id channel_idI) unsigned int curpos = liststart + pos; const char * icontype = 0; + if(RADIUS_LARGE) + frameBuffer->paintBoxRel(x, ypos, width- 15, fheight, COL_MENUCONTENT_PLUS_0, 0); + if (curpos==selected) { color = COL_MENUCONTENTSELECTED; bgcolor = COL_MENUCONTENTSELECTED_PLUS_0; - if(RADIUS_LARGE) - frameBuffer->paintBoxRel(x, ypos, width- 15, fheight, COL_MENUCONTENT_PLUS_0, 0); } else if (curpos == current_event ) { @@ -735,7 +736,7 @@ void CNeutrinoEventList::paintItem(unsigned int pos, t_channel_id channel_idI) bgcolor = COL_MENUCONTENT_PLUS_0; } - frameBuffer->paintBoxRel(x, ypos, width- 15, fheight, bgcolor, color == COL_MENUCONTENTSELECTED ? RADIUS_LARGE : 0); + frameBuffer->paintBoxRel(x, ypos, width- 15, fheight, bgcolor, RADIUS_LARGE); if(curpos Date: Sat, 13 Apr 2013 11:13:23 +0200 Subject: [PATCH 27/28] - eventlist: make additional infos switchable * new menu 'eventlist' in osd-setup * fix offset in infozone * fontsize for infozone adjustable --- data/locale/deutsch.locale | 5 +++++ data/locale/english.locale | 5 +++++ src/gui/eventlist.cpp | 18 +++++++++++++----- src/gui/osd_setup.cpp | 28 +++++++++++++++++++++++++--- src/gui/osd_setup.h | 1 + src/neutrino.cpp | 2 ++ src/neutrino_menue.h | 1 + src/system/locals.h | 5 +++++ src/system/locals_intern.h | 5 +++++ src/system/settings.h | 30 ++++++++++++++++-------------- 10 files changed, 78 insertions(+), 22 deletions(-) diff --git a/data/locale/deutsch.locale b/data/locale/deutsch.locale index 993e4cfbd..7b52239cf 100644 --- a/data/locale/deutsch.locale +++ b/data/locale/deutsch.locale @@ -319,6 +319,8 @@ eventfinder.search_within_epg Suche innerhalb EPG-Daten eventfinder.search_within_list Suche innerhalb Text eventfinder.searching Suche... eventfinder.start_search Suche starten +eventlist.additional Zusatzinformationen +eventlist.name Eventliste eventlistbar.channelswitch Umschalten eventlistbar.eventsort Sortieren eventlistbar.recordevent Aufnehmen @@ -530,6 +532,7 @@ fontsize.epg_info1 EPG Info 1 fontsize.epg_info2 EPG Info 2 fontsize.epg_title EPG Titel fontsize.eventlist_datetime Datum/Zeit +fontsize.eventlist_event Event Info fontsize.eventlist_itemlarge Groß fontsize.eventlist_itemsmall Klein fontsize.eventlist_title Titel @@ -765,7 +768,9 @@ menu.hint_epg_old_events Veraltete EPG-Daten werden nach dieser Zeit (in Stunden menu.hint_epg_save Speichert die EPG-Daten auf einem externen Datenträger und läd es von dort nach einen Neustart menu.hint_epg_save_standby Speichert die EPG-Daten auch im Standby-Modus menu.hint_event_textcolor Ändern Sie die Farbe für farbige Events in der Kanalliste und der Infobar +menu.hint_eventlist_additional Definiert, ob zusätzliche Informationen im Hauptfenster angezeigt werden sollen menu.hint_eventlist_fonts Ändern Sie die Schriftgröße in der Event-Liste +menu.hint_eventlist_setup Wählen Sie die Anzeigeoptionen für die Event-Liste menu.hint_extended Energiespar-, EPG-Speicher- und Lade-Optionen, HDMI-CEC, Startkanal und mehr menu.hint_factory Zurücksetzen der Box auf Werkseinstellungen.\nDie Box wird danach neu gestartet menu.hint_fade Bei aktivierter Funktion werden die Menüfenster 'weich' ein- bzw. ausgeblendet diff --git a/data/locale/english.locale b/data/locale/english.locale index e7a99dced..26fd83ed2 100644 --- a/data/locale/english.locale +++ b/data/locale/english.locale @@ -319,6 +319,8 @@ eventfinder.search_within_epg Search within eventfinder.search_within_list Search within eventfinder.searching Search for keyword in EPG... eventfinder.start_search Start Search +eventlist.additional Additional informations +eventlist.name Eventlist eventlistbar.channelswitch schedule eventlistbar.eventsort sorting eventlistbar.recordevent record @@ -530,6 +532,7 @@ fontsize.epg_info1 EPG Info 1 fontsize.epg_info2 EPG Info 2 fontsize.epg_title EPG Title fontsize.eventlist_datetime Date / Time +fontsize.eventlist_event Event Info fontsize.eventlist_itemlarge Large fontsize.eventlist_itemsmall Small fontsize.eventlist_title Title @@ -765,7 +768,9 @@ menu.hint_epg_old_events Hours after event end time to consider\nevent old and r menu.hint_epg_save Save cached EPG to harddisk or usb flash\nand load it after boot menu.hint_epg_save_standby Save EPG on soft standby mode menu.hint_event_textcolor Change event color for colored-event options\nin channel list and infobar +menu.hint_eventlist_additional Show additional informations\nin main box menu.hint_eventlist_fonts Change event list font sizes +menu.hint_eventlist_setup Configure event list GUI options menu.hint_extended Power saving, EPG save/load options\nHDMI-CEC, Start channel, zap options menu.hint_factory Reset box to factory state\nBox will reboot after reset menu.hint_fade Fade GUI windows diff --git a/src/gui/eventlist.cpp b/src/gui/eventlist.cpp index 368cc583c..45f65c0c4 100644 --- a/src/gui/eventlist.cpp +++ b/src/gui/eventlist.cpp @@ -249,7 +249,10 @@ int CNeutrinoEventList::exec(const t_channel_id channel_id, const std::string& c full_width = frameBuffer->getScreenWidthRel(); x = getScreenStartX(full_width); - width = full_width / 3 * 2; + if (g_settings.eventlist_additional) + width = full_width / 3 * 2; + else + width = full_width; height = frameBuffer->getScreenHeightRel(); iheight = ::paintButtons(0, 0, 0, 1, tmp_button, 0, 0, false, COL_INFOBAR_SHADOW, NULL, 0, false); @@ -282,7 +285,8 @@ int CNeutrinoEventList::exec(const t_channel_id channel_id, const std::string& c infozone_width = full_width - width; // init right info_zone - cc_infozone = new CComponentsText(x+width+5, y+theight+10, infozone_width-10, listmaxshow*fheight-20); + if (g_settings.eventlist_additional) + cc_infozone = new CComponentsText(x+width+10, y+theight, infozone_width-20, listmaxshow*fheight); int res = menu_return::RETURN_REPAINT; //printf("CNeutrinoEventList::exec: channel_id %llx\n", channel_id); @@ -673,7 +677,8 @@ int CNeutrinoEventList::exec(const t_channel_id channel_id, const std::string& c } } - delete cc_infozone; + if (cc_infozone) + delete cc_infozone; cc_infozone = NULL; oldIndex = -1; oldEventID = -1; @@ -816,6 +821,9 @@ void CNeutrinoEventList::paintItem(unsigned int pos, t_channel_id channel_idI) void CNeutrinoEventList::paintDescription(int index) { + if (!g_settings.eventlist_additional) + return; + if (evtlist[index].eventID == oldEventID) { if (oldEventID == 0) { if (index == oldIndex) @@ -838,7 +846,7 @@ void CNeutrinoEventList::paintDescription(int index) else infozone_text = g_Locale->getText(LOCALE_EPGLIST_NOEVENTS); - cc_infozone->setText(infozone_text, CTextBox::TOP, g_Font[SNeutrinoSettings::FONT_TYPE_EVENTLIST_ITEMLARGE]); + cc_infozone->setText(infozone_text, CTextBox::TOP, g_Font[SNeutrinoSettings::FONT_TYPE_EVENTLIST_EVENT]); cc_infozone->doPaintBg(false); cc_infozone->paint(CC_SAVE_SCREEN_NO); } @@ -901,7 +909,7 @@ void CNeutrinoEventList::paint(t_channel_id channel_id) } // paint background for right box - if (!bgRightBoxPaint) { + if (g_settings.eventlist_additional && !bgRightBoxPaint) { frameBuffer->paintBoxRel(x+width,y+theight,infozone_width,listmaxshow*fheight,COL_MENUCONTENT_PLUS_0); bgRightBoxPaint = true; } diff --git a/src/gui/osd_setup.cpp b/src/gui/osd_setup.cpp index ee7a147e6..0cfa661f1 100644 --- a/src/gui/osd_setup.cpp +++ b/src/gui/osd_setup.cpp @@ -91,12 +91,13 @@ const SNeutrinoSettings::FONT_TYPES channellist_font_sizes[5] = SNeutrinoSettings::FONT_TYPE_CHANNEL_NUM_ZAP }; -const SNeutrinoSettings::FONT_TYPES eventlist_font_sizes[4] = +const SNeutrinoSettings::FONT_TYPES eventlist_font_sizes[5] = { SNeutrinoSettings::FONT_TYPE_EVENTLIST_TITLE, SNeutrinoSettings::FONT_TYPE_EVENTLIST_ITEMLARGE, SNeutrinoSettings::FONT_TYPE_EVENTLIST_ITEMSMALL, SNeutrinoSettings::FONT_TYPE_EVENTLIST_DATETIME, + SNeutrinoSettings::FONT_TYPE_EVENTLIST_EVENT }; const SNeutrinoSettings::FONT_TYPES infobar_font_sizes[4] = @@ -134,7 +135,7 @@ font_sizes_groups font_sizes_groups[6] = { {LOCALE_FONTMENU_MENU , 5, other_font_sizes , "fontsize.doth", LOCALE_MENU_HINT_MENU_FONTS }, {LOCALE_FONTMENU_CHANNELLIST, 5, channellist_font_sizes, "fontsize.dcha", LOCALE_MENU_HINT_CHANNELLIST_FONTS }, - {LOCALE_FONTMENU_EVENTLIST , 4, eventlist_font_sizes , "fontsize.deve", LOCALE_MENU_HINT_EVENTLIST_FONTS }, + {LOCALE_FONTMENU_EVENTLIST , 5, eventlist_font_sizes , "fontsize.deve", LOCALE_MENU_HINT_EVENTLIST_FONTS }, {LOCALE_FONTMENU_EPG , 4, epg_font_sizes , "fontsize.depg", LOCALE_MENU_HINT_EPG_FONTS }, {LOCALE_FONTMENU_INFOBAR , 4, infobar_font_sizes , "fontsize.dinf", LOCALE_MENU_HINT_INFOBAR_FONTS }, {LOCALE_FONTMENU_GAMELIST , 2, gamelist_font_sizes , "fontsize.dgam", LOCALE_MENU_HINT_GAMELIST_FONTS } @@ -157,6 +158,7 @@ font_sizes_struct neutrino_font[FONT_TYPE_COUNT] = {LOCALE_FONTSIZE_EVENTLIST_ITEMLARGE, 20, FONT_STYLE_BOLD , 1}, {LOCALE_FONTSIZE_EVENTLIST_ITEMSMALL, 14, FONT_STYLE_REGULAR, 1}, {LOCALE_FONTSIZE_EVENTLIST_DATETIME , 16, FONT_STYLE_REGULAR, 1}, + {LOCALE_FONTSIZE_EVENTLIST_EVENT , 17, FONT_STYLE_REGULAR, 1}, {LOCALE_FONTSIZE_GAMELIST_ITEMLARGE , 20, FONT_STYLE_BOLD , 1}, {LOCALE_FONTSIZE_GAMELIST_ITEMSMALL , 16, FONT_STYLE_REGULAR, 1}, {LOCALE_FONTSIZE_CHANNELLIST , 20, FONT_STYLE_BOLD , 1}, @@ -447,10 +449,17 @@ int COsdSetup::showOsdSetup() mf->setHint("", LOCALE_MENU_HINT_CHANNELLIST_SETUP); osd_menu->addItem(mf); + //eventlist + CMenuWidget osd_menu_eventlist(LOCALE_MAINMENU_SETTINGS, NEUTRINO_ICON_SETTINGS, width, MN_WIDGET_ID_OSDSETUP_EVENTLIST); + showOsdEventlistSetup(&osd_menu_eventlist); + mf = new CMenuForwarder(LOCALE_EVENTLIST_NAME, true, NULL, &osd_menu_eventlist, NULL, CRCInput::RC_4); + mf->setHint("", LOCALE_MENU_HINT_EVENTLIST_SETUP); + osd_menu->addItem(mf); + //screenshot CMenuWidget osd_menu_screenshot(LOCALE_MAINMENU_SETTINGS, NEUTRINO_ICON_SETTINGS, width, MN_WIDGET_ID_OSDSETUP_SCREENSHOT); showOsdScreenShotSetup(&osd_menu_screenshot); - mf = new CMenuForwarder(LOCALE_SCREENSHOT_MENU, true, NULL, &osd_menu_screenshot, NULL, CRCInput::RC_4); + mf = new CMenuForwarder(LOCALE_SCREENSHOT_MENU, true, NULL, &osd_menu_screenshot, NULL, CRCInput::RC_5); mf->setHint("", LOCALE_MENU_HINT_SCREENSHOT_SETUP); osd_menu->addItem(mf); @@ -834,6 +843,19 @@ void COsdSetup::showOsdChanlistSetup(CMenuWidget *menu_chanlist) menu_chanlist->addItem(mc); } +//eventlist +void COsdSetup::showOsdEventlistSetup(CMenuWidget *menu_eventlist) +{ + CMenuOptionChooser * mc; + + menu_eventlist->addIntroItems(LOCALE_EVENTLIST_NAME); + + // eventlist additional + mc = new CMenuOptionChooser(LOCALE_EVENTLIST_ADDITIONAL, &g_settings.eventlist_additional, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true); + mc->setHint("", LOCALE_MENU_HINT_EVENTLIST_ADDITIONAL); + menu_eventlist->addItem(mc); +} + bool COsdSetup::changeNotify(const neutrino_locale_t OptionName, void * data) { if(ARE_LOCALES_EQUAL(OptionName, LOCALE_COLORMENU_CONTRAST_FONTS)) diff --git a/src/gui/osd_setup.h b/src/gui/osd_setup.h index e62f6f793..d3a84ce30 100644 --- a/src/gui/osd_setup.h +++ b/src/gui/osd_setup.h @@ -57,6 +57,7 @@ class COsdSetup : public CMenuTarget, public CChangeObserver void showOsdTimeoutSetup(CMenuWidget *menu_timeout); void showOsdInfobarSetup(CMenuWidget *menu_infobar); void showOsdChanlistSetup(CMenuWidget *menu_chanlist); + void showOsdEventlistSetup(CMenuWidget *menu_eventlist); void showOsdScreenShotSetup(CMenuWidget *menu_screenshot); void AddFontSettingItem(CMenuWidget &font_Settings, const SNeutrinoSettings::FONT_TYPES number_of_fontsize_entry); diff --git a/src/neutrino.cpp b/src/neutrino.cpp index 5f269773e..b09f89e20 100644 --- a/src/neutrino.cpp +++ b/src/neutrino.cpp @@ -606,6 +606,7 @@ int CNeutrinoApp::loadSetup(const char * fname) g_settings.mode_clock = configfile.getInt32( "mode_clock", 0); g_settings.zapto_pre_time = configfile.getInt32( "zapto_pre_time", 0); g_settings.spectrum = configfile.getBool("spectrum" , false); + g_settings.eventlist_additional = configfile.getInt32("eventlist_additional", 0); g_settings.channellist_additional = configfile.getInt32("channellist_additional", 0); //default off g_settings.channellist_epgtext_align_right = configfile.getBool("channellist_epgtext_align_right" , false); g_settings.channellist_extended = configfile.getBool("channellist_extended" , true); @@ -1031,6 +1032,7 @@ void CNeutrinoApp::saveSetup(const char * fname) configfile.setInt32( "mode_clock", g_settings.mode_clock ); configfile.setInt32( "zapto_pre_time", g_settings.zapto_pre_time ); configfile.setBool("spectrum", g_settings.spectrum); + configfile.setInt32("eventlist_additional", g_settings.eventlist_additional); configfile.setInt32("channellist_additional", g_settings.channellist_additional); configfile.setBool("channellist_epgtext_align_right", g_settings.channellist_epgtext_align_right); configfile.setBool("channellist_extended" , g_settings.channellist_extended); diff --git a/src/neutrino_menue.h b/src/neutrino_menue.h index 3efe11bd3..970bc2afc 100644 --- a/src/neutrino_menue.h +++ b/src/neutrino_menue.h @@ -55,6 +55,7 @@ enum MN_WIDGET_ID //osd setup MN_WIDGET_ID_OSDSETUP, MN_WIDGET_ID_OSDSETUP_CHANNELLIST, + MN_WIDGET_ID_OSDSETUP_EVENTLIST, MN_WIDGET_ID_OSDSETUP_FONT, MN_WIDGET_ID_OSDSETUP_FONTSCALE, MN_WIDGET_ID_OSDSETUP_INFOBAR, diff --git a/src/system/locals.h b/src/system/locals.h index dc9fadf40..ccea4e1df 100644 --- a/src/system/locals.h +++ b/src/system/locals.h @@ -346,6 +346,8 @@ typedef enum LOCALE_EVENTFINDER_SEARCH_WITHIN_LIST, LOCALE_EVENTFINDER_SEARCHING, LOCALE_EVENTFINDER_START_SEARCH, + LOCALE_EVENTLIST_ADDITIONAL, + LOCALE_EVENTLIST_NAME, LOCALE_EVENTLISTBAR_CHANNELSWITCH, LOCALE_EVENTLISTBAR_EVENTSORT, LOCALE_EVENTLISTBAR_RECORDEVENT, @@ -557,6 +559,7 @@ typedef enum LOCALE_FONTSIZE_EPG_INFO2, LOCALE_FONTSIZE_EPG_TITLE, LOCALE_FONTSIZE_EVENTLIST_DATETIME, + LOCALE_FONTSIZE_EVENTLIST_EVENT, LOCALE_FONTSIZE_EVENTLIST_ITEMLARGE, LOCALE_FONTSIZE_EVENTLIST_ITEMSMALL, LOCALE_FONTSIZE_EVENTLIST_TITLE, @@ -792,7 +795,9 @@ typedef enum LOCALE_MENU_HINT_EPG_SAVE, LOCALE_MENU_HINT_EPG_SAVE_STANDBY, LOCALE_MENU_HINT_EVENT_TEXTCOLOR, + LOCALE_MENU_HINT_EVENTLIST_ADDITIONAL, LOCALE_MENU_HINT_EVENTLIST_FONTS, + LOCALE_MENU_HINT_EVENTLIST_SETUP, LOCALE_MENU_HINT_EXTENDED, LOCALE_MENU_HINT_FACTORY, LOCALE_MENU_HINT_FADE, diff --git a/src/system/locals_intern.h b/src/system/locals_intern.h index 5445feccb..36bf350c7 100644 --- a/src/system/locals_intern.h +++ b/src/system/locals_intern.h @@ -346,6 +346,8 @@ const char * locale_real_names[] = "eventfinder.search_within_list", "eventfinder.searching", "eventfinder.start_search", + "eventlist.additional", + "eventlist.name", "eventlistbar.channelswitch", "eventlistbar.eventsort", "eventlistbar.recordevent", @@ -557,6 +559,7 @@ const char * locale_real_names[] = "fontsize.epg_info2", "fontsize.epg_title", "fontsize.eventlist_datetime", + "fontsize.eventlist_event", "fontsize.eventlist_itemlarge", "fontsize.eventlist_itemsmall", "fontsize.eventlist_title", @@ -792,7 +795,9 @@ const char * locale_real_names[] = "menu.hint_epg_save", "menu.hint_epg_save_standby", "menu.hint_event_textcolor", + "menu.hint_eventlist_additional", "menu.hint_eventlist_fonts", + "menu.hint_eventlist_setup", "menu.hint_extended", "menu.hint_factory", "menu.hint_fade", diff --git a/src/system/settings.h b/src/system/settings.h index 6e1856b26..f02441fe3 100644 --- a/src/system/settings.h +++ b/src/system/settings.h @@ -419,6 +419,7 @@ struct SNeutrinoSettings int pip_y; int bigFonts; int big_windows; + int eventlist_additional; int channellist_additional; int channellist_epgtext_align_right; int channellist_extended; @@ -466,7 +467,7 @@ struct SNeutrinoSettings // Font sizes -#define FONT_TYPE_COUNT 24 +#define FONT_TYPE_COUNT 25 enum FONT_TYPES { FONT_TYPE_MENU = 0, FONT_TYPE_MENU_TITLE = 1, @@ -479,19 +480,20 @@ struct SNeutrinoSettings FONT_TYPE_EVENTLIST_ITEMLARGE = 8, FONT_TYPE_EVENTLIST_ITEMSMALL = 9, FONT_TYPE_EVENTLIST_DATETIME = 10, - FONT_TYPE_GAMELIST_ITEMLARGE = 11, - FONT_TYPE_GAMELIST_ITEMSMALL = 12, - FONT_TYPE_CHANNELLIST = 13, - FONT_TYPE_CHANNELLIST_DESCR = 14, - FONT_TYPE_CHANNELLIST_NUMBER = 15, - FONT_TYPE_CHANNELLIST_EVENT = 16, - FONT_TYPE_CHANNEL_NUM_ZAP = 17, - FONT_TYPE_INFOBAR_NUMBER = 18, - FONT_TYPE_INFOBAR_CHANNAME = 19, - FONT_TYPE_INFOBAR_INFO = 20, - FONT_TYPE_INFOBAR_SMALL = 21, - FONT_TYPE_FILEBROWSER_ITEM = 22, - FONT_TYPE_MENU_HINT = 23 + FONT_TYPE_EVENTLIST_EVENT = 11, + FONT_TYPE_GAMELIST_ITEMLARGE = 12, + FONT_TYPE_GAMELIST_ITEMSMALL = 13, + FONT_TYPE_CHANNELLIST = 14, + FONT_TYPE_CHANNELLIST_DESCR = 15, + FONT_TYPE_CHANNELLIST_NUMBER = 16, + FONT_TYPE_CHANNELLIST_EVENT = 17, + FONT_TYPE_CHANNEL_NUM_ZAP = 18, + FONT_TYPE_INFOBAR_NUMBER = 19, + FONT_TYPE_INFOBAR_CHANNAME = 20, + FONT_TYPE_INFOBAR_INFO = 21, + FONT_TYPE_INFOBAR_SMALL = 22, + FONT_TYPE_FILEBROWSER_ITEM = 23, + FONT_TYPE_MENU_HINT = 24 }; // lcdd From 4b624f88bd8a018a45fc94da373c1a63cbd9900e Mon Sep 17 00:00:00 2001 From: svenhoefer Date: Sat, 13 Apr 2013 11:46:06 +0200 Subject: [PATCH 28/28] - english.locale: typo --- data/locale/english.locale | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data/locale/english.locale b/data/locale/english.locale index 26fd83ed2..c7c65158e 100644 --- a/data/locale/english.locale +++ b/data/locale/english.locale @@ -751,7 +751,7 @@ menu.hint_channellist_epg_align EPG event align menu.hint_channellist_extended Show current event progress bar menu.hint_channellist_fonts Change channel list font sizes menu.hint_channellist_foot Show additional information\nin bottom box -menu.hint_channellist_setup Configure channe list GUI options +menu.hint_channellist_setup Configure channel list GUI options menu.hint_ci Conditional access menu\nto setup your CI CAM or embeded Conax card menu.hint_colors Configure GUI colors menu.hint_content_back Change GUI window background color