mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-28 16:01:20 +02:00
-add show infobar.txt window
git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@583 e54a6e83-5905-42d5-8d5c-058d10e6a962
This commit is contained in:
@@ -540,7 +540,7 @@ fprintf(stderr, "after showchannellogo, mode = %d ret = %d logo_ok = %d\n",g_set
|
||||
ChanNameX + 10 + ChanNumWidth, ChanNameY + time_height,
|
||||
BoxEndX - (ChanNameX + 20) - time_width - LEFT_OFFSET - 5 - ChanNumWidth,
|
||||
ChannelName, COL_INFOBAR, 0, true); // UTF-8
|
||||
|
||||
showInfoFile();
|
||||
// int ChanInfoY = BoxStartY + ChanHeight + 10;
|
||||
ButtonWidth = (BoxEndX - ChanInfoX - ICON_OFFSET) >> 2;
|
||||
|
||||
@@ -1527,6 +1527,40 @@ void CInfoViewer::show_Data (bool calledFromEvent)
|
||||
#endif
|
||||
}
|
||||
|
||||
void CInfoViewer::showInfoFile()
|
||||
{
|
||||
if (recordModeActive)
|
||||
return;
|
||||
char infotext[80];
|
||||
int fd, xStart, xEnd, height, r;
|
||||
ssize_t cnt;
|
||||
|
||||
fd = open("/tmp/infobar.txt", O_RDONLY); //Datei aus welcher der Text ausgelesen wird
|
||||
|
||||
if (fd < 0)
|
||||
return;
|
||||
|
||||
cnt = read(fd, infotext, 79);
|
||||
if (cnt < 0) {
|
||||
fprintf(stderr, "CInfoViewer::showInfoFile: could not read from infobar.txt: %m");
|
||||
close(fd);
|
||||
return;
|
||||
}
|
||||
close(fd);
|
||||
infotext[cnt] = '\0';
|
||||
|
||||
xStart = BoxStartX + ChanWidth + 140; // Abstand rechst vom Aufnahmeicon
|
||||
xEnd = BoxEndX - 225; // Abstand links von der Progressbar
|
||||
height = g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_INFO]->getHeight() + 2;
|
||||
r = height / 3;
|
||||
// background
|
||||
frameBuffer->paintBox(xStart, BoxStartY, xEnd, BoxStartY + height, COL_INFOBAR_PLUS_0, RADIUS_SMALL, CORNER_ALL); //round
|
||||
|
||||
g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_INFO]->RenderString(
|
||||
xStart + r, BoxStartY + height, xEnd - xStart - r*2, (std::string)infotext, COL_INFOBAR, height, false);
|
||||
}
|
||||
|
||||
|
||||
void CInfoViewer::showButton_Audio ()
|
||||
{
|
||||
// green, in case of several APIDs
|
||||
|
@@ -124,6 +124,7 @@ class CInfoViewer
|
||||
void showLcdPercentOver();
|
||||
int showChannelLogo(const t_channel_id logo_channel_id);
|
||||
void showSNR();
|
||||
void showInfoFile();
|
||||
|
||||
public:
|
||||
bool chanready;
|
||||
|
Reference in New Issue
Block a user