Thread: [Commits] : Tuxbox-GIT: apps branch master updated. CVS-Final-114-gdb94409
Tuxbox Sources
Brought to you by:
dbt1
|
From: Thilo G. <tux...@ne...> - 2013-04-20 14:52:31
|
Project "Tuxbox-GIT: apps":
The branch, master has been updated
via db94409e9100a7cac7f438cbd8aebce09c7b1126 (commit)
via decf127fbd8238669a220f8b8fb8eb0c347f72d0 (commit)
via 8a9877685eac6dfcb369666ee618a91566c32a87 (commit)
via 4a990011083f3edaa4766cf2fe21a2e1b92b74aa (commit)
via 14d932a2a82a2790ea5593d9319ac6b5d034fb8d (commit)
via 0bc7146dde19443cf74b25947fdad32af11ef60a (commit)
via 812420d89cfdff064a4ed95dd31672027a748c76 (commit)
via 25661a8ec03b6e358f3faedca629077f3301bfa0 (commit)
via 6dfc4a10ddee54d1243cb3d6ef0b0068054e9043 (commit)
via 8fce27f9f3bac0c2936dcb9cdf7758b812ccb741 (commit)
via aa9ed3a250e2199ae5926311bf96cf9d42edeadf (commit)
via 9d41be2229f2ddd54fdf91e70bdd1e0945d624b5 (commit)
via c71ced00b4b79a26748db8abfff073c0e2c4972b (commit)
via 0d8e87d0dd0d18733e718a672354c67f0ab23c52 (commit)
via 57fee374147866531f505b9e37980dd10cf6e9dd (commit)
via 0c6cca5f974ff1f8e1841ed9e69832a0094fa230 (commit)
via 35932730de5d5ef0a146422343614607a948e6af (commit)
via 2f44ca87959f0753f39be138bb83c04d454d8e80 (commit)
via 138640a39419b848f95aa3a1c404dcdc7df574ee (commit)
via 11be07035e47084cf84c49c08356568fca112a37 (commit)
via ffbe3fcb336710de2109934507a2c68378ac4c40 (commit)
via 9b99f1d5df316d295f3c3904eca50697bac6d92d (commit)
via fc737402d3d23b5ba0bb7dd9f4442860fa33536e (commit)
via 375f222b69f8e6a689a37b5913acd65d724f2074 (commit)
via 80ed9f3b85e299e0b8e5308ceba8133a0bac8b5c (commit)
from cf53e3b3fd4f361346e0d57cabea8cd0ffbb9622 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit db94409e9100a7cac7f438cbd8aebce09c7b1126
Author: Christian Schuett <Gau...@ho...>
Date: Fri Apr 19 22:20:56 2013 +0200
Neutrino infoviewer: remove newline from the end of infotext
this avoids paragraph sign in infotext line
Signed-off-by: Christian Schuett <Gau...@ho...>
Signed-off-by: Thilo Graf <db...@no...>
diff --git a/tuxbox/neutrino/src/gui/infoviewer.cpp b/tuxbox/neutrino/src/gui/infoviewer.cpp
index 5a75a0f..f76a6fb 100644
--- a/tuxbox/neutrino/src/gui/infoviewer.cpp
+++ b/tuxbox/neutrino/src/gui/infoviewer.cpp
@@ -1836,13 +1836,16 @@ void CInfoViewer::showInfoFile()
return;
cnt = read(fd, infotext, 79);
- if (cnt < 0) {
+ if (cnt < 1) {
fprintf(stderr, "CInfoViewer::showInfoFile: could not read from infobar.txt: %m");
close(fd);
return;
}
close(fd);
- infotext[cnt] = '\0';
+ if (infotext[cnt-1] == '\n')
+ infotext[cnt-1] = '\0';
+ else
+ infotext[cnt] = '\0';
xStart = BoxStartX + ChanWidth + 40; // right of record icon
xEnd = BoxEndX - 125; // left of progressbar
commit decf127fbd8238669a220f8b8fb8eb0c347f72d0
Author: Christian Schuett <Gau...@ho...>
Date: Thu Apr 18 21:07:32 2013 +0200
Neutrino EPG Viewer: properly encode extended information
Signed-off-by: Christian Schuett <Gau...@ho...>
Signed-off-by: Thilo Graf <db...@no...>
diff --git a/tuxbox/neutrino/src/gui/epgview.cpp b/tuxbox/neutrino/src/gui/epgview.cpp
index eaeb54b..1d9f964 100644
--- a/tuxbox/neutrino/src/gui/epgview.cpp
+++ b/tuxbox/neutrino/src/gui/epgview.cpp
@@ -552,7 +552,9 @@ int CEpgData::show(const t_channel_id channel_id, unsigned long long a_id, time_
std::vector<std::string>::iterator description;
std::vector<std::string>::iterator item;
for (description = epgData.itemDescriptions.begin(), item = epgData.items.begin(); description != epgData.itemDescriptions.end(); ++description, ++item) {
- sprintf(line, "%s: %s", (*(description)).c_str(), (*(item)).c_str());
+ sprintf(line, "%s: %s",
+ (isUTF8(*description) ? (*description) : Latin1_to_UTF8(*description)).c_str(),
+ Latin1_to_UTF8(*item).c_str());
processTextToArray(line);
}
}
commit 8a9877685eac6dfcb369666ee618a91566c32a87
Author: Christian Schuett <Gau...@ho...>
Date: Thu Apr 18 20:07:01 2013 +0200
Neutrino: fix getting width of UTF-8 strings in some classes
Signed-off-by: Christian Schuett <Gau...@ho...>
Signed-off-by: Thilo Graf <db...@no...>
diff --git a/tuxbox/neutrino/src/gui/channellist.cpp b/tuxbox/neutrino/src/gui/channellist.cpp
index addd988..27702cb 100644
--- a/tuxbox/neutrino/src/gui/channellist.cpp
+++ b/tuxbox/neutrino/src/gui/channellist.cpp
@@ -1737,7 +1737,7 @@ void CChannelList::processTextToArray(std::string text) // UTF-8
aktWord += *text_;
int aktWordWidth = g_Font[eventFont]->getRenderWidth(aktWord, true);
- if ((aktWordWidth+aktWidth)<(infozone_width - 20))
+ if ((aktWordWidth+aktWidth)<=(infozone_width - 20))
{//space ok, add
aktWidth += aktWordWidth;
aktLine += aktWord;
diff --git a/tuxbox/neutrino/src/gui/epgview.cpp b/tuxbox/neutrino/src/gui/epgview.cpp
index 7fd692c..eaeb54b 100644
--- a/tuxbox/neutrino/src/gui/epgview.cpp
+++ b/tuxbox/neutrino/src/gui/epgview.cpp
@@ -180,8 +180,8 @@ void CEpgData::processTextToArray(std::string text, int screening) // UTF-8
aktWord += *text_;
// check the wordwidth - add to this line if size ok
- int aktWordWidth = g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO2]->getRenderWidth(aktWord);
- if((aktWordWidth+aktWidth)<(ox- 10- 15))
+ int aktWordWidth = g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO2]->getRenderWidth(aktWord, true);
+ if((aktWordWidth+aktWidth)<=(ox- 15- 15))
{//space ok, add
aktWidth += aktWordWidth;
aktLine += aktWord;
diff --git a/tuxbox/neutrino/src/gui/eventlist.cpp b/tuxbox/neutrino/src/gui/eventlist.cpp
index d4a733a..91edf50 100644
--- a/tuxbox/neutrino/src/gui/eventlist.cpp
+++ b/tuxbox/neutrino/src/gui/eventlist.cpp
@@ -850,7 +850,7 @@ void EventList::showFunctionBar (bool show)
}
frameBuffer->getIconSize(icon, &iconw, &iconh);
- cellwidth = std::min(ButtonWidth, iconw + 4 + space + g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->getRenderWidth(btncaption));
+ cellwidth = std::min(ButtonWidth, iconw + 4 + space + g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->getRenderWidth(btncaption, true));
// paint 1st button
::paintButtons(frameBuffer, g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL], g_Locale, bx, by, ButtonWidth, 1, &EventListButtons[0]);
@@ -866,7 +866,7 @@ void EventList::showFunctionBar (bool show)
btncaption = g_Locale->getText(LOCALE_EVENTFINDER_SEARCH);
frameBuffer->getIconSize(icon, &iconw, &iconh);
- cellwidth = std::min(ButtonWidth, iconw + 4 + space + g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->getRenderWidth(btncaption));
+ cellwidth = std::min(ButtonWidth, iconw + 4 + space + g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->getRenderWidth(btncaption, true));
// paint second button
::paintButtons(frameBuffer, g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL], g_Locale, bx, by, ButtonWidth, 1, &EventListButtons[1]);
@@ -891,7 +891,7 @@ void EventList::showFunctionBar (bool show)
}
frameBuffer->getIconSize(icon, &iconw, &iconh);
- cellwidth = std::min(ButtonWidth, iconw + 4 + space + g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->getRenderWidth(btncaption));
+ cellwidth = std::min(ButtonWidth, iconw + 4 + space + g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->getRenderWidth(btncaption, true));
// paint 3rd button
::paintButtons(frameBuffer, g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL], g_Locale, bx, by, ButtonWidth, 1, &EventListButtons[2]);
@@ -907,7 +907,7 @@ void EventList::showFunctionBar (bool show)
btncaption = g_Locale->getText(LOCALE_EVENTLISTBAR_EVENTSORT);
frameBuffer->getIconSize(icon, &iconw, &iconh);
- cellwidth = std::min(ButtonWidth, iconw + 4 + space + g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->getRenderWidth(btncaption));
+ cellwidth = std::min(ButtonWidth, iconw + 4 + space + g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->getRenderWidth(btncaption, true));
// paint 4th button
::paintButtons(frameBuffer, g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL], g_Locale, bx, by, ButtonWidth, 1, &EventListButtons[3]);
diff --git a/tuxbox/neutrino/src/gui/filebrowser.cpp b/tuxbox/neutrino/src/gui/filebrowser.cpp
index edbd680..def4cb8 100644
--- a/tuxbox/neutrino/src/gui/filebrowser.cpp
+++ b/tuxbox/neutrino/src/gui/filebrowser.cpp
@@ -1345,13 +1345,13 @@ void CFileBrowser::paintHead()
/* too long? Leave out the "Filebrowser" or "Shoutcast" prefix
* the allocated space is sufficient since it is surely shorter than before */
- if (fnt_title->getRenderWidth(l_name) > width - 11)
+ if (fnt_title->getRenderWidth(l_name, true) > width - 11)
l = sprintf(l_name, "%s", FILESYSTEM_ENCODING_TO_UTF8_STRING(name).c_str());
if (l_name[l - 1] == '/')
l_name[--l] = '\0';
/* still too long? the last part is probably more interesting than the first part... */
- while ((fnt_title->getRenderWidth(&l_name[i]) > width - 11)
+ while ((fnt_title->getRenderWidth(&l_name[i], true) > width - 11)
&& (i < l))
i++;
@@ -1425,7 +1425,7 @@ void CFileBrowser::paintFoot()
char cKey[2] = {m_SMSKeyInput.getOldKey(), 0};
cKey[0] = toupper(cKey[0]);
int len = fnt_small->getRenderWidth(cKey);
- fnt_small->RenderString(x + width - 10 - len, by2 + foheight, len, cKey, COL_MENUHEAD, 0, true);
+ fnt_small->RenderString(x + width - 10 - len, by2 + foheight, len, cKey, COL_MENUHEAD);
}
}
diff --git a/tuxbox/neutrino/src/gui/infoviewer.cpp b/tuxbox/neutrino/src/gui/infoviewer.cpp
index bc50465..5a75a0f 100644
--- a/tuxbox/neutrino/src/gui/infoviewer.cpp
+++ b/tuxbox/neutrino/src/gui/infoviewer.cpp
@@ -1268,7 +1268,7 @@ void CInfoViewer::showMotorMoving(int duration)
strcat(text, buffer);
strcat(text, " s)");
- ShowHintUTF(LOCALE_MESSAGEBOX_INFO, text, g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getRenderWidth(text) + 10, duration); // UTF-8
+ ShowHintUTF(LOCALE_MESSAGEBOX_INFO, text, g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getRenderWidth(text, true) + 10, duration); // UTF-8
}
#ifdef ENABLE_RADIOTEXT
diff --git a/tuxbox/neutrino/src/gui/upnpbrowser.cpp b/tuxbox/neutrino/src/gui/upnpbrowser.cpp
index 06d7ff2..0600a55 100644
--- a/tuxbox/neutrino/src/gui/upnpbrowser.cpp
+++ b/tuxbox/neutrino/src/gui/upnpbrowser.cpp
@@ -917,7 +917,7 @@ void CUpnpBrowserGui::paintDevicePos(unsigned int pos)
std::string name = m_devices[pos + m_indexdevice].friendlyname;
- int w = g_Font[SNeutrinoSettings::FONT_TYPE_FILEBROWSER_ITEM]->getRenderWidth(name) + 5;
+ int w = g_Font[SNeutrinoSettings::FONT_TYPE_FILEBROWSER_ITEM]->getRenderWidth(name, true) + 5; // UTF-8
g_Font[SNeutrinoSettings::FONT_TYPE_FILEBROWSER_ITEM]->RenderString(m_x + 10, ypos + m_fheight, m_width - 30 - w,
num, color, m_fheight, true); // UTF-8
g_Font[SNeutrinoSettings::FONT_TYPE_FILEBROWSER_ITEM]->RenderString(m_x + m_width - 15 - w, ypos + m_fheight,
diff --git a/tuxbox/neutrino/src/gui/widget/textbox.cpp b/tuxbox/neutrino/src/gui/widget/textbox.cpp
index 663f2c2..585e630 100644
--- a/tuxbox/neutrino/src/gui/widget/textbox.cpp
+++ b/tuxbox/neutrino/src/gui/widget/textbox.cpp
@@ -404,7 +404,7 @@ void CTextBox::refreshTextLineArray(void)
}
aktWord = m_cText.substr(pos_prev, pos - pos_prev + 1);
- aktWordWidth = m_pcFontText->getRenderWidth(aktWord);
+ aktWordWidth = m_pcFontText->getRenderWidth(aktWord, true);
pos_prev = pos + 1;
//if(aktWord.find(""") == )
if(1)
@@ -558,7 +558,7 @@ void CTextBox::refreshText(void)
if( m_nMode & CENTER )
{
- x_center = (m_cFrameTextRel.iWidth - m_pcFontText->getRenderWidth(m_cLineArray[i]))>>1;
+ x_center = (m_cFrameTextRel.iWidth - m_pcFontText->getRenderWidth(m_cLineArray[i]), true)>>1;
}
m_pcWindow->RenderString( m_pcFontText,
commit 4a990011083f3edaa4766cf2fe21a2e1b92b74aa
Author: Christian Schuett <Gau...@ho...>
Date: Thu Apr 18 19:13:29 2013 +0200
Neutrino file browser: fix typo in SMS key input
Signed-off-by: Christian Schuett <Gau...@ho...>
Signed-off-by: Thilo Graf <db...@no...>
diff --git a/tuxbox/neutrino/src/gui/filebrowser.cpp b/tuxbox/neutrino/src/gui/filebrowser.cpp
index a1c3571..edbd680 100644
--- a/tuxbox/neutrino/src/gui/filebrowser.cpp
+++ b/tuxbox/neutrino/src/gui/filebrowser.cpp
@@ -184,7 +184,7 @@ unsigned char SMSKeyInput::handleMsg(const neutrino_msg_t msg)
else if(m_oldKey == 'r' && timeoutNotReached)
key = 's';
else if(m_oldKey == 's' && timeoutNotReached)
- key = 's';
+ key = '7';
else
key = 'p';
}
commit 14d932a2a82a2790ea5593d9319ac6b5d034fb8d
Author: Christian Schuett <Gau...@ho...>
Date: Wed Apr 17 18:37:42 2013 +0200
Neutrino infoviewer: satfind values are not UTF-8 encoded
Signed-off-by: Christian Schuett <Gau...@ho...>
Signed-off-by: Thilo Graf <db...@no...>
diff --git a/tuxbox/neutrino/src/gui/infoviewer.cpp b/tuxbox/neutrino/src/gui/infoviewer.cpp
index 43330c1..bc50465 100644
--- a/tuxbox/neutrino/src/gui/infoviewer.cpp
+++ b/tuxbox/neutrino/src/gui/infoviewer.cpp
@@ -186,24 +186,24 @@ void CInfoViewer::showSatfind()
frameBuffer->paintBoxRel(ChanInfoX, BoxEndY, BoxEndX-ChanInfoX, 30, COL_INFOBAR_PLUS_0);
sprintf (percent, "sig %d%%", sig);
- g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->RenderString(ChanInfoX+ 10, BoxEndY+ 25, BoxEndX- ChanInfoX- 10, percent, COL_INFOBAR_PLUS_0, 0, true); // UTF-8
+ g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->RenderString(ChanInfoX+ 10, BoxEndY+ 25, BoxEndX- ChanInfoX- 10, percent, COL_INFOBAR_PLUS_0);
percent_width = g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->getRenderWidth(percent);
pbsig.paintProgressBar(ChanInfoX+ 10+ percent_width+ 5, BoxEndY+ 7, 60, 15, sig, 100, 0, 0, COL_INFOBAR_PLUS_0, 0, "", COL_INFOBAR);
sprintf (percent, "snr %d%%", snr);
- g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->RenderString(ChanInfoX+ 140, BoxEndY+ 25, BoxEndX- ChanInfoX- 140, percent, COL_INFOBAR_PLUS_0, 0, true); // UTF-8
+ g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->RenderString(ChanInfoX+ 140, BoxEndY+ 25, BoxEndX- ChanInfoX- 140, percent, COL_INFOBAR_PLUS_0);
percent_width = g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->getRenderWidth(percent);
pbsnr.paintProgressBar(ChanInfoX+ 140+ percent_width+ 5, BoxEndY+ 7, 60, 15, snr, 100, 0, 0, COL_INFOBAR_PLUS_0, 0, "", COL_INFOBAR);
sprintf (percent, "ber %d%%", ber);
- g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->RenderString(ChanInfoX+ 270, BoxEndY+ 25, BoxEndX- ChanInfoX- 270, percent, COL_INFOBAR_PLUS_0, 0, true); // UTF-8
+ g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->RenderString(ChanInfoX+ 270, BoxEndY+ 25, BoxEndX- ChanInfoX- 270, percent, COL_INFOBAR_PLUS_0);
- g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->RenderString(ChanInfoX+ 350, BoxEndY+ 25, BoxEndX- ChanInfoX- 350, freq, COL_INFOBAR_PLUS_0, 0, true); // UTF-8
+ g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->RenderString(ChanInfoX+ 350, BoxEndY+ 25, BoxEndX- ChanInfoX- 350, freq, COL_INFOBAR_PLUS_0);
if (satpos != 0 && (g_info.delivery_system == DVB_S))
{
sprintf (pos, "%d.%d%c", satpos < 0 ? -satpos / 10 : satpos / 10, satpos < 0 ? -satpos % 10 : satpos % 10, satpos < 0 ? 'W' : 'E');
- g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->RenderString(BoxEndX- 60, BoxEndY+ 25, 60, pos, COL_INFOBAR_PLUS_0, 0, true); // UTF-8
+ g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->RenderString(BoxEndX- 60, BoxEndY+ 25, 60, pos, COL_INFOBAR_PLUS_0);
}
}
}
commit 0bc7146dde19443cf74b25947fdad32af11ef60a
Author: Christian Schuett <Gau...@ho...>
Date: Tue Apr 16 21:12:09 2013 +0200
sectionsd: remove unnecessary SIevent creation
Signed-off-by: Christian Schuett <Gau...@ho...>
Signed-off-by: Thilo Graf <db...@no...>
diff --git a/tuxbox/neutrino/daemons/sectionsd/sectionsd.cpp b/tuxbox/neutrino/daemons/sectionsd/sectionsd.cpp
index 0e2cdf2..0fb246a 100644
--- a/tuxbox/neutrino/daemons/sectionsd/sectionsd.cpp
+++ b/tuxbox/neutrino/daemons/sectionsd/sectionsd.cpp
@@ -706,24 +706,15 @@ static void addEvent(const SIevent &evt, const time_t zeit, bool cn = false)
if (evt.get_channel_id() == messaging_current_servicekey && // but only if it is the current channel...
(messaging_got_CN != 0x03)) { // ...and if we don't have them already.
unlockMessaging();
- SIevent *eptr = new SIevent(evt);
- if (!eptr)
- {
- printf("[sectionsd::addEvent] new SIevent1 failed.\n");
- throw std::bad_alloc();
- }
-
- SIeventPtr e(eptr);
-
writeLockEvents();
- if (e->runningStatus() > 2) { // paused or currently running
- if (!myCurrentEvent || (myCurrentEvent && (*myCurrentEvent).uniqueKey() != e->uniqueKey())) {
+ if (evt.runningStatus() > 2) { // paused or currently running
+ if (!myCurrentEvent || (myCurrentEvent && (*myCurrentEvent).uniqueKey() != evt.uniqueKey())) {
if (myCurrentEvent)
delete myCurrentEvent;
myCurrentEvent = new SIevent(evt);
writeLockMessaging();
messaging_got_CN |= 0x01;
- if (myNextEvent && (*myNextEvent).uniqueKey() == e->uniqueKey()) {
+ if (myNextEvent && (*myNextEvent).uniqueKey() == evt.uniqueKey()) {
dprintf("addevent-cn: removing next-event\n");
/* next got "promoted" to current => trigger re-read */
delete myNextEvent;
@@ -732,17 +723,17 @@ static void addEvent(const SIevent &evt, const time_t zeit, bool cn = false)
}
unlockMessaging();
dprintf("addevent-cn: added running (%d) event 0x%04x '%s'\n",
- e->runningStatus(), e->eventID, e->getName().c_str());
+ evt.runningStatus(), evt.eventID, evt.getName().c_str());
} else {
writeLockMessaging();
messaging_got_CN |= 0x01;
unlockMessaging();
dprintf("addevent-cn: not add runn. (%d) event 0x%04x '%s'\n",
- e->runningStatus(), e->eventID, e->getName().c_str());
+ evt.runningStatus(), evt.eventID, evt.getName().c_str());
}
} else {
- if ((!myNextEvent || (myNextEvent && (*myNextEvent).uniqueKey() != e->uniqueKey() && (*myNextEvent).times.begin()->startzeit < e->times.begin()->startzeit)) &&
- (!myCurrentEvent || (myCurrentEvent && (*myCurrentEvent).uniqueKey() != e->uniqueKey()))) {
+ if ((!myNextEvent || (myNextEvent && (*myNextEvent).uniqueKey() != evt.uniqueKey() && (*myNextEvent).times.begin()->startzeit < evt.times.begin()->startzeit)) &&
+ (!myCurrentEvent || (myCurrentEvent && (*myCurrentEvent).uniqueKey() != evt.uniqueKey()))) {
if (myNextEvent)
delete myNextEvent;
myNextEvent = new SIevent(evt);
@@ -750,10 +741,10 @@ static void addEvent(const SIevent &evt, const time_t zeit, bool cn = false)
messaging_got_CN |= 0x02;
unlockMessaging();
dprintf("addevent-cn: added next (%d) event 0x%04x '%s'\n",
- e->runningStatus(), e->eventID, e->getName().c_str());
+ evt.runningStatus(), evt.eventID, evt.getName().c_str());
} else {
dprintf("addevent-cn: not added next(%d) event 0x%04x '%s'\n",
- e->runningStatus(), e->eventID, e->getName().c_str());
+ evt.runningStatus(), evt.eventID, evt.getName().c_str());
writeLockMessaging();
messaging_got_CN |= 0x02;
unlockMessaging();
commit 812420d89cfdff064a4ed95dd31672027a748c76
Author: Christian Schuett <Gau...@ho...>
Date: Tue Apr 16 20:47:02 2013 +0200
Neutrino infoviewer: move global vars into class
Signed-off-by: Christian Schuett <Gau...@ho...>
Signed-off-by: Thilo Graf <db...@no...>
diff --git a/tuxbox/neutrino/src/gui/infoviewer.cpp b/tuxbox/neutrino/src/gui/infoviewer.cpp
index 2f4b427..43330c1 100644
--- a/tuxbox/neutrino/src/gui/infoviewer.cpp
+++ b/tuxbox/neutrino/src/gui/infoviewer.cpp
@@ -91,13 +91,8 @@ extern "C" int tuxtxt_start(int tpid);
extern "C" int tuxtxt_stop();
#endif
-int time_left_width;
-int time_dot_width;
-int time_width;
-int time_height;
-char old_timestr[10];
/* hack: remember the last shown event IDs to reduce flickering */
-static event_id_t last_curr_id = 0, last_next_id = 0;
+event_id_t CInfoViewer::last_curr_id = 0, CInfoViewer::last_next_id = 0;
extern CZapitClient::SatelliteList satList;
diff --git a/tuxbox/neutrino/src/gui/infoviewer.h b/tuxbox/neutrino/src/gui/infoviewer.h
index 3fbcde5..18e1520 100644
--- a/tuxbox/neutrino/src/gui/infoviewer.h
+++ b/tuxbox/neutrino/src/gui/infoviewer.h
@@ -90,6 +90,14 @@ class CInfoViewer
CSectionsdClient::CurrentNextInfo oldinfo;
t_channel_id channel_id;
+ int time_left_width;
+ int time_dot_width;
+ int time_width;
+ int time_height;
+ char old_timestr[10];
+
+ static event_id_t last_curr_id, last_next_id;
+
char aspectRatio;
uint sec_timer_id;
commit 25661a8ec03b6e358f3faedca629077f3301bfa0
Author: Christian Schuett <Gau...@ho...>
Date: Tue Apr 16 20:12:09 2013 +0200
Neutrino timer list: calculate width of time column
with smaller horizontal font scale factor the space between time
column and other infos grows unnecessary
Signed-off-by: Christian Schuett <Gau...@ho...>
Signed-off-by: Thilo Graf <db...@no...>
diff --git a/tuxbox/neutrino/src/gui/timerlist.cpp b/tuxbox/neutrino/src/gui/timerlist.cpp
index 94c1c7b..94217a9 100644
--- a/tuxbox/neutrino/src/gui/timerlist.cpp
+++ b/tuxbox/neutrino/src/gui/timerlist.cpp
@@ -439,6 +439,7 @@ int CTimerList::show()
frameBuffer->getIconSize(NEUTRINO_ICON_TIMER, &iconw, &iconh);
theight = std::max(iconh, g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->getHeight());
fheight = g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getHeight();
+ time_width = g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getRenderWidth("00.00. 00:00 ");
neutrino_msg_t msg;
neutrino_msg_data_t data;
@@ -617,12 +618,12 @@ void CTimerList::paintItem(int pos)
char zStopTime[25] = {0};
struct tm *stopTime = localtime(&(timer.stopTime));
strftime(zStopTime,20,"%d.%m. %H:%M",stopTime);
- g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->RenderString(x+10,ypos+fheight, 150, zAlarmTime, color, fheight, true); // UTF-8
+ g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->RenderString(x+10, ypos+fheight, time_width, zAlarmTime, color, fheight, true); // UTF-8
if(timer.stopTime != 0)
{
- g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->RenderString(x+10,ypos+2*fheight, 150, zStopTime, color, fheight, true); // UTF-8
+ g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->RenderString(x+10, ypos+2*fheight, time_width, zStopTime, color, fheight, true); // UTF-8
}
- g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->RenderString(x+160,ypos+fheight, (real_width-160)/2-5, convertTimerRepeat2String(timer.eventRepeat), color, fheight, true); // UTF-8
+ g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->RenderString(x+10+time_width, ypos+fheight, (real_width-10-time_width)/2-5, convertTimerRepeat2String(timer.eventRepeat), color, fheight, true); // UTF-8
if (timer.eventRepeat != CTimerd::TIMERREPEAT_ONCE)
{
@@ -633,9 +634,9 @@ void CTimerList::paintItem(int pos)
sprintf(srepeatcount,"00");
else
sprintf(srepeatcount,"%ux",timer.repeatCount);
- g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->RenderString(x+160+(real_width-300)/2,ypos+fheight, (real_width-160)/2-5, srepeatcount, color, fheight, true); // UTF-8
+ g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->RenderString(x+10+time_width+(real_width-10-time_width-140)/2, ypos+fheight, (real_width-10-time_width)/2-5, srepeatcount, color, fheight, true); // UTF-8
}
- g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->RenderString(x+160+(real_width-160)/2,ypos+fheight, (real_width-160)/2-5, convertTimerType2String(timer.eventType), color, fheight, true); // UTF-8
+ g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->RenderString(x+10+time_width+(real_width-10-time_width)/2, ypos+fheight, (real_width-10-time_width)/2-5, convertTimerType2String(timer.eventType), color, fheight, true); // UTF-8
std::string zAddData("");
switch(timer.eventType)
{
@@ -706,7 +707,7 @@ void CTimerList::paintItem(int pos)
break;
default:{}
}
- g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->RenderString(x+160,ypos+2*fheight, real_width-165, zAddData, color, fheight, true); // UTF-8
+ g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->RenderString(x+10+time_width, ypos+2*fheight, real_width-10-time_width-5, zAddData, color, fheight, true); // UTF-8
// LCD Display
if(liststart+pos==selected)
{
diff --git a/tuxbox/neutrino/src/gui/timerlist.h b/tuxbox/neutrino/src/gui/timerlist.h
index 4c62aef..716d613 100644
--- a/tuxbox/neutrino/src/gui/timerlist.h
+++ b/tuxbox/neutrino/src/gui/timerlist.h
@@ -51,6 +51,7 @@ class CTimerList : public CMenuTarget
unsigned int listmaxshow;
int fheight; //fontheight timerlist-content (text)
int theight; //fontheight timerlist-title
+ int time_width;
bool visible;
CTimerdClient *Timer;
commit 6dfc4a10ddee54d1243cb3d6ef0b0068054e9043
Author: Stefan Seyfried <se...@tu...>
Date: Mon Apr 15 17:59:50 2013 +0200
auto-enumerate FONT_TYPE_COUNT instead of defining it
Signed-off-by: GetAway <get...@t-...>
Signed-off-by: Thilo Graf <db...@no...>
diff --git a/tuxbox/neutrino/src/global.h b/tuxbox/neutrino/src/global.h
index 496bd1e..3033576 100644
--- a/tuxbox/neutrino/src/global.h
+++ b/tuxbox/neutrino/src/global.h
@@ -68,7 +68,7 @@ NEUTRINO_CPP CTimerdClient *g_Timerd;
NEUTRINO_CPP FBFontRenderClass *g_fontRenderer;
-NEUTRINO_CPP Font *g_Font[FONT_TYPE_COUNT];
+NEUTRINO_CPP Font *g_Font[SNeutrinoSettings::FONT_TYPE_COUNT];
NEUTRINO_CPP CRCInput *g_RCInput;
diff --git a/tuxbox/neutrino/src/neutrino.cpp b/tuxbox/neutrino/src/neutrino.cpp
index 904126f..7c3f292 100644
--- a/tuxbox/neutrino/src/neutrino.cpp
+++ b/tuxbox/neutrino/src/neutrino.cpp
@@ -288,7 +288,7 @@ CNeutrinoApp* CNeutrinoApp::getInstance()
}
-const font_sizes_struct neutrino_font[FONT_TYPE_COUNT] =
+const font_sizes_struct neutrino_font[SNeutrinoSettings::FONT_TYPE_COUNT] =
{
{LOCALE_FONTSIZE_MENU , 20, FONT_STYLE_BOLD , 0},
{LOCALE_FONTSIZE_MENU_TITLE , 30, FONT_STYLE_BOLD , 0},
@@ -1766,7 +1766,7 @@ void CNeutrinoApp::SetupFonts()
else
style[2] = g_fontRenderer->AddFont(font.filename[2]);
- for (int i = 0; i < FONT_TYPE_COUNT; i++)
+ for (int i = 0; i < SNeutrinoSettings::FONT_TYPE_COUNT; i++)
{
g_Font[i] = g_fontRenderer->getFont(fontname, style[neutrino_font[i].style], configfile.getInt32(locale_real_names[neutrino_font[i].name], neutrino_font[i].defaultsize) + neutrino_font[i].size_offset * font.size_offset);
}
diff --git a/tuxbox/neutrino/src/system/settings.h b/tuxbox/neutrino/src/system/settings.h
index 9b961ff..b78ecac 100644
--- a/tuxbox/neutrino/src/system/settings.h
+++ b/tuxbox/neutrino/src/system/settings.h
@@ -369,31 +369,31 @@ struct SNeutrinoSettings
// Font sizes
-#define FONT_TYPE_COUNT 23
enum FONT_TYPES {
- FONT_TYPE_MENU = 0,
- FONT_TYPE_MENU_TITLE = 1,
- FONT_TYPE_MENU_INFO = 2,
- FONT_TYPE_EPG_TITLE = 3,
- FONT_TYPE_EPG_INFO1 = 4,
- FONT_TYPE_EPG_INFO2 = 5,
- FONT_TYPE_EPG_DATE = 6,
- FONT_TYPE_EVENTLIST_TITLE = 7,
- 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 = 0,
+ FONT_TYPE_MENU_TITLE,
+ FONT_TYPE_MENU_INFO,
+ FONT_TYPE_EPG_TITLE,
+ FONT_TYPE_EPG_INFO1,
+ FONT_TYPE_EPG_INFO2,
+ FONT_TYPE_EPG_DATE,
+ FONT_TYPE_EVENTLIST_TITLE,
+ FONT_TYPE_EVENTLIST_ITEMLARGE,
+ FONT_TYPE_EVENTLIST_ITEMSMALL,
+ FONT_TYPE_EVENTLIST_DATETIME,
+ FONT_TYPE_GAMELIST_ITEMLARGE,
+ FONT_TYPE_GAMELIST_ITEMSMALL,
+ FONT_TYPE_CHANNELLIST,
+ FONT_TYPE_CHANNELLIST_DESCR,
+ FONT_TYPE_CHANNELLIST_NUMBER,
+ FONT_TYPE_CHANNELLIST_EVENT,
+ FONT_TYPE_CHANNEL_NUM_ZAP,
+ FONT_TYPE_INFOBAR_NUMBER,
+ FONT_TYPE_INFOBAR_CHANNAME,
+ FONT_TYPE_INFOBAR_INFO,
+ FONT_TYPE_INFOBAR_SMALL,
+ FONT_TYPE_FILEBROWSER_ITEM,
+ FONT_TYPE_COUNT
};
// lcdd
commit 8fce27f9f3bac0c2936dcb9cdf7758b812ccb741
Author: Christian Schuett <Gau...@ho...>
Date: Sun Apr 14 21:24:14 2013 +0200
Neutrino infoviewer: fix paint of satfind progressbars
with smaller horizontal font scale factor it looks like the progressbars
belong to the value on its right instead of its left
Signed-off-by: Christian Schuett <Gau...@ho...>
Signed-off-by: Thilo Graf <db...@no...>
diff --git a/tuxbox/neutrino/src/gui/infoviewer.cpp b/tuxbox/neutrino/src/gui/infoviewer.cpp
index 67d9eb4..2f4b427 100644
--- a/tuxbox/neutrino/src/gui/infoviewer.cpp
+++ b/tuxbox/neutrino/src/gui/infoviewer.cpp
@@ -163,6 +163,7 @@ void CInfoViewer::showSatfind()
char freq[20];
char percent[10];
char pos[6];
+ int percent_width;
int sig;
int snr;
int ber;
@@ -191,11 +192,13 @@ void CInfoViewer::showSatfind()
sprintf (percent, "sig %d%%", sig);
g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->RenderString(ChanInfoX+ 10, BoxEndY+ 25, BoxEndX- ChanInfoX- 10, percent, COL_INFOBAR_PLUS_0, 0, true); // UTF-8
- pbsig.paintProgressBar(ChanInfoX+ 72, BoxEndY+ 7, 60, 15, sig, 100, 0, 0, COL_INFOBAR_PLUS_0, 0, "", COL_INFOBAR);
+ percent_width = g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->getRenderWidth(percent);
+ pbsig.paintProgressBar(ChanInfoX+ 10+ percent_width+ 5, BoxEndY+ 7, 60, 15, sig, 100, 0, 0, COL_INFOBAR_...
[truncated message content] |