20 Commits

Author SHA1 Message Date
kamel5
d0c1519463 Version 1.2.7 2019-06-02 11:14:37 +02:00
kamel5
c081bc5ca1 Correct a compiler error 2019-05-04 12:59:14 +02:00
kamel5
8b1651401c Optical changes in favorites and searchtimer menu 2019-04-26 11:15:08 +02:00
kamel5
5df21a4707 Eliminate a "invalid lock sequence report" in tvguideosd.c 2019-04-23 13:44:44 +02:00
kamel5
e7753834bc Version 1.2.6 2019-04-14 13:58:22 +02:00
kamel5
d1e5e240ec Change channel icon size in cRecMenuSearchTimerEdit 2019-04-14 13:58:15 +02:00
kamel5
6e83787437 Channelgroup in cRecMenuSearchTimerEdit 2019-04-14 13:58:07 +02:00
kamel5
333a3d397f Add .gitignore 2019-04-14 13:58:01 +02:00
kamel5
80acee49e1 Changes for Rec Icon in DrawHeader 2019-04-10 16:59:22 +02:00
kamel5
6095fb4dbc Update services/epgsearch.h 2019-04-09 16:20:50 +02:00
kamel5
e01a63b29e Optimizations in setup menu 2019-04-09 15:08:16 +02:00
kamel5
0975e97519 Different setup parameter for displayTime in horizontal and vertical mode 2019-04-09 15:06:39 +02:00
kamel5
929d8db9ba Optical changes in displaymode vertical 2019-04-09 14:50:42 +02:00
kamel5
56250e3af8 Update services/epgsearch.h 2019-04-07 18:27:53 +02:00
kamel5
d825d700eb Correct an error in setup page 2019-04-07 15:58:55 +02:00
kamel5
ae206f4768 Eliminate a compiler warning in searchtimer.c 2019-04-07 12:59:55 +02:00
kamel5
c7f0131d52 Some cosmetic changes 2019-04-07 12:57:22 +02:00
kamel5
52d887d854 Some changes for VDR < 2.3.0 2019-04-07 12:57:14 +02:00
kamel5
6f7042d41f Correct an error with the recording sign in grid 2019-04-07 12:56:53 +02:00
kamel5
9009f4f385 A german DESCRIPTION 2019-04-07 12:55:44 +02:00
32 changed files with 504 additions and 316 deletions

5
.gitignore vendored Normal file
View File

@@ -0,0 +1,5 @@
*.o
*.so
po/*.mo
po/*.pot
.dependencies

20
HISTORY
View File

@@ -167,3 +167,23 @@ Version 1.2.5
- Eliminate a seqfault in "cRecManager::DeleteSearchTimer" - Eliminate a seqfault in "cRecManager::DeleteSearchTimer"
- Show Inactive timer in DrawHeader - Show Inactive timer in DrawHeader
- Add "switchMode" to setup menu - Add "switchMode" to setup menu
Version 1.2.6
- Some changes for VDR < 2.3.0
- Changes for Rec Icon in DrawHeader and Grid
- Eliminate a compiler warning in searchtimer.c
- Correct an error in setup page
- Optical changes in displaymode vertical
- Different setup parameter for displayTime in horizontal and vertical mode
- Optimizations in setup menu
- Add .gitignore
- Channelgroup in cRecMenuSearchTimerEdit
(Create and modify of channelgroups isn't yet possible, should be done in epgsearch)
- Change channel icon size in cRecMenuSearchTimerEdit
Version 1.2.7
- Eliminate a "invalid lock sequence report" in tvguideosd.c
- Optical changes in favorites and searchtimer menu
- Changes in README

10
README
View File

@@ -1,10 +1,14 @@
This is a "plugin" for the Video Disk Recorder (VDR). This is a "plugin" for the Video Disk Recorder (VDR).
Written by: Louis Braun <louis DOT braun AT gmx DOT de> TVGuide on GitLab: https://gitlab.com/kamel5/tvguide
Project's homepage: http://projects.vdr-developer.org/projects/plg-tvguide Original Written by: Louis Braun <louis DOT braun AT gmx DOT de>
Latest version available at: http://projects.vdr-developer.org/projects/plg-tvguide/files Original Project's homepage: http://projects.vdr-developer.org/projects/plg-tvguide
Latest version available at: https://gitlab.com/kamel5/tvguide
Original version available at: http://projects.vdr-developer.org/projects/plg-tvguide/files
This program is free software; you can redistribute it and/or modify This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by it under the terms of the GNU General Public License as published by

View File

@@ -5,21 +5,11 @@ cChannelColumn::cChannelColumn(int num, const cChannel *channel, cMyTime *myTime
this->channel = channel; this->channel = channel;
this->num = num; this->num = num;
this->myTime = myTime; this->myTime = myTime;
#if VDRVERSNUM >= 20301 #if VDRVERSNUM < 20301
hasTimer = false;
const cSchedule *Schedule = NULL;
LOCK_SCHEDULES_READ;
const cSchedules* schedules = Schedules;
if (schedules) {
Schedule = schedules->GetSchedule(channel);
hasTimer = Schedule ? Schedule->HasTimer() : false;
}
#else
hasTimer = channel->HasTimer(); hasTimer = channel->HasTimer();
#endif #endif
hasSwitchTimer = SwitchTimers.ChannelInSwitchList(channel); hasSwitchTimer = SwitchTimers.ChannelInSwitchList(channel);
#if VDRVERSNUM >= 20301 #if VDRVERSNUM < 20301
#else
schedulesLock = new cSchedulesLock(false, 100); schedulesLock = new cSchedulesLock(false, 100);
#endif #endif
header = NULL; header = NULL;
@@ -29,8 +19,7 @@ cChannelColumn::~cChannelColumn(void) {
if (header) if (header)
delete header; delete header;
grids.Clear(); grids.Clear();
#if VDRVERSNUM >= 20301 #if VDRVERSNUM < 20301
#else
delete schedulesLock; delete schedulesLock;
#endif #endif
} }
@@ -383,25 +372,14 @@ cGrid *cChannelColumn::addDummyGrid(time_t start, time_t end, cGrid *firstGrid,
} }
void cChannelColumn::SetTimers() { void cChannelColumn::SetTimers() {
#if VDRVERSNUM >= 20301 #if VDRVERSNUM < 20301
hasTimer = false;
const cSchedule *Schedule = NULL;
{
LOCK_SCHEDULES_READ;
const cSchedules* schedules = Schedules;
if (schedules) {
Schedule = schedules->GetSchedule(channel);
hasTimer = Schedule ? Schedule->HasTimer() : false;
}
}
#else
hasTimer = channel->HasTimer(); hasTimer = channel->HasTimer();
#endif #endif
hasSwitchTimer = SwitchTimers.ChannelInSwitchList(channel); hasSwitchTimer = SwitchTimers.ChannelInSwitchList(channel);
for (cGrid *grid = grids.First(); grid; grid = grids.Next(grid)) { for (cGrid *grid = grids.First(); grid; grid = grids.Next(grid)) {
bool gridHadTimer = grid->HasTimer(); bool gridHadTimer = grid->HasTimer();
grid->SetTimer(); grid->SetTimer();
if (gridHadTimer != grid->HasTimer()) if (gridHadTimer || gridHadTimer != grid->HasTimer())
grid->SetDirty(); grid->SetDirty();
bool gridHadSwitchTimer = grid->HasSwitchTimer(); bool gridHadSwitchTimer = grid->HasSwitchTimer();
grid->SetSwitchTimer(); grid->SetSwitchTimer();

View File

@@ -10,6 +10,7 @@ cTvguideConfig::cTvguideConfig() {
channelCols = 5; channelCols = 5;
channelRows = 10; channelRows = 10;
displayTime = 160; displayTime = 160;
displayHorizontalTime = 160;
displayStatusHeader = 1; displayStatusHeader = 1;
displayChannelGroups = 1; displayChannelGroups = 1;
displayTimeBase = 1; displayTimeBase = 1;
@@ -257,6 +258,7 @@ bool cTvguideConfig::SetupParse(const char *Name, const char *Value) {
else if (strcmp(Name, "channelCols") == 0) channelCols = atoi(Value); else if (strcmp(Name, "channelCols") == 0) channelCols = atoi(Value);
else if (strcmp(Name, "channelRows") == 0) channelRows = atoi(Value); else if (strcmp(Name, "channelRows") == 0) channelRows = atoi(Value);
else if (strcmp(Name, "displayTime") == 0) displayTime = atoi(Value); else if (strcmp(Name, "displayTime") == 0) displayTime = atoi(Value);
else if (strcmp(Name, "displayHorizontalTime") == 0) displayHorizontalTime = atoi(Value);
else if (strcmp(Name, "hideChannelLogos") == 0) hideChannelLogos = atoi(Value); else if (strcmp(Name, "hideChannelLogos") == 0) hideChannelLogos = atoi(Value);
else if (strcmp(Name, "logoExtension") == 0) logoExtension = atoi(Value); else if (strcmp(Name, "logoExtension") == 0) logoExtension = atoi(Value);
else if (strcmp(Name, "logoWidthRatio") == 0) logoWidthRatio = atoi(Value); else if (strcmp(Name, "logoWidthRatio") == 0) logoWidthRatio = atoi(Value);

View File

@@ -58,6 +58,7 @@ class cTvguideConfig {
int channelRows; int channelRows;
int numGrids; int numGrids;
int displayTime; int displayTime;
int displayHorizontalTime;
int displayStatusHeader; int displayStatusHeader;
int displayChannelGroups; int displayChannelGroups;
int displayTimeBase; int displayTimeBase;

View File

@@ -62,22 +62,23 @@ void cEpgGrid::PositionPixmap() {
} }
void cEpgGrid::SetTimer() { void cEpgGrid::SetTimer() {
hasTimer = false;
if (tvguideConfig.useRemoteTimers && pRemoteTimers) { if (tvguideConfig.useRemoteTimers && pRemoteTimers) {
RemoteTimers_Event_v1_0 rt; RemoteTimers_Event_v1_0 rt;
rt.event = event; rt.event = event;
if (pRemoteTimers->Service("RemoteTimers::GetTimerByEvent-v1.0", &rt)) if (pRemoteTimers->Service("RemoteTimers::GetTimerByEvent-v1.0", &rt))
hasTimer = true; hasTimer = true;
else #if VDRVERSNUM >= 20301
hasTimer = false; } else {
#if VDRVERSNUM >= 30400 eTimerMatch TimerMatch = tmNone;
} else if (event->HasTimer()) { LOCK_TIMERS_READ;
hasTimer = true; const cTimers *timers = Timers;
if (timers->GetMatch(event, &TimerMatch) && (TimerMatch == tmFull))
hasTimer = true;
#else #else
} else if (column->HasTimer()) { } else if (column->HasTimer()) {
hasTimer = event->HasTimer(); hasTimer = event->HasTimer();
#endif #endif
} else {
hasTimer = false;
} }
} }

View File

@@ -29,8 +29,6 @@ bool cGeometryManager::SetGeometry(int osdWidth, int osdHeight, bool force) {
channelHeaderHeight = tvguideConfig.channelHeaderHeightPercent * osdHeight / 100; channelHeaderHeight = tvguideConfig.channelHeaderHeightPercent * osdHeight / 100;
timeLineWidth = tvguideConfig.timeLineWidthPercent * osdWidth / 100; timeLineWidth = tvguideConfig.timeLineWidthPercent * osdWidth / 100;
timeLineHeight = tvguideConfig.timeLineHeightPercent * osdHeight / 100; timeLineHeight = tvguideConfig.timeLineHeightPercent * osdHeight / 100;
clockWidth = tvFrameWidth / 3;
clockHeight = timeLineHeight;
footerHeight = tvguideConfig.footerHeightPercent * osdHeight / 100; footerHeight = tvguideConfig.footerHeightPercent * osdHeight / 100;
footerY = osdHeight - footerHeight; footerY = osdHeight - footerHeight;
@@ -43,21 +41,25 @@ bool cGeometryManager::SetGeometry(int osdWidth, int osdHeight, bool force) {
logoWidth = channelLogoWidth/2 - 15; logoWidth = channelLogoWidth/2 - 15;
logoHeight = logoWidth * tvguideConfig.logoHeightRatio / tvguideConfig.logoWidthRatio; logoHeight = logoWidth * tvguideConfig.logoHeightRatio / tvguideConfig.logoWidthRatio;
timeLineGridWidth = timeLineWidth; timeLineGridWidth = timeLineWidth;
timeLineGridHeight = minutePixel*30; timeLineGridHeight = minutePixel * 30;
dateVieverWidth = timeLineWidth; dateVieverWidth = timeLineWidth;
dateVieverHeight = channelHeaderHeight + channelGroupsHeight; dateVieverHeight = (channelHeaderHeight + channelGroupsHeight) * 2 / 3;
clockWidth = dateVieverWidth;
clockHeight = (channelHeaderHeight + channelGroupsHeight) - dateVieverHeight;
} else if (tvguideConfig.displayMode == eHorizontal) { } else if (tvguideConfig.displayMode == eHorizontal) {
colWidth = 0; colWidth = 0;
rowHeight = (osdHeight - statusHeaderHeight - timeLineHeight - footerHeight) / tvguideConfig.channelRows; rowHeight = (osdHeight - statusHeaderHeight - timeLineHeight - footerHeight) / tvguideConfig.channelRows;
minutePixel = (osdWidth - channelHeaderWidth - channelGroupsWidth) / tvguideConfig.displayTime; minutePixel = (osdWidth - channelHeaderWidth - channelGroupsWidth) / tvguideConfig.displayHorizontalTime;
channelLogoWidth = channelHeaderWidth; channelLogoWidth = channelHeaderWidth;
channelLogoHeight = rowHeight; channelLogoHeight = rowHeight;
logoWidth = channelLogoHeight * tvguideConfig.logoWidthRatio / tvguideConfig.logoHeightRatio; logoWidth = channelLogoHeight * tvguideConfig.logoWidthRatio / tvguideConfig.logoHeightRatio;
logoHeight = channelLogoHeight; logoHeight = channelLogoHeight;
timeLineGridWidth = geoManager.minutePixel*30; timeLineGridWidth = geoManager.minutePixel * 30;
timeLineGridHeight = geoManager.timeLineHeight; timeLineGridHeight = geoManager.timeLineHeight;
dateVieverWidth = channelHeaderWidth + channelGroupsWidth; dateVieverWidth = (channelHeaderWidth + channelGroupsWidth) * 3 / 5;
dateVieverHeight = timeLineHeight; dateVieverHeight = timeLineHeight;
clockWidth = (channelHeaderWidth + channelGroupsWidth) - dateVieverWidth;
clockHeight = timeLineHeight;
} }
buttonBorder = footerHeight / 6; buttonBorder = footerHeight / 6;
buttonWidth = osdWidth / 4 - 2 * buttonBorder; buttonWidth = osdWidth / 4 - 2 * buttonBorder;

View File

@@ -4,17 +4,17 @@
class cGeometryManager { class cGeometryManager {
private: private:
public: public:
cGeometryManager(void); cGeometryManager(void);
~cGeometryManager(); ~cGeometryManager();
bool SetGeometry(int osdWidth, int osdHeight, bool force = false); bool SetGeometry(int osdWidth, int osdHeight, bool force = false);
//Common //Common
int osdWidth; int osdWidth;
int osdHeight; int osdHeight;
int statusHeaderHeight; int statusHeaderHeight;
int tvFrameWidth; int tvFrameWidth;
int headerContentWidth; int headerContentWidth;
//ChannelGroups //ChannelGroups
int channelGroupsWidth; int channelGroupsWidth;
int channelGroupsHeight; int channelGroupsHeight;
//ContentHeader //ContentHeader
int channelHeaderWidth; int channelHeaderWidth;

View File

@@ -88,13 +88,12 @@ void cHeaderGrid::drawChannelVertical(const cChannel *channel) {
tw.Set(*headerText, fontManager.FontChannelHeader, geoManager.colWidth - 8); tw.Set(*headerText, fontManager.FontChannelHeader, geoManager.colWidth - 8);
int lines = tw.Lines(); int lines = tw.Lines();
int lineHeight = fontManager.FontChannelHeader->Height(); int lineHeight = fontManager.FontChannelHeader->Height();
int yStart = (geoManager.channelHeaderHeight - lines*lineHeight)/2 + 8; int yStart = (geoManager.channelHeaderHeight - lines * lineHeight) / 2 + 8;
bool logoFound = false; bool logoFound = false;
if (!tvguideConfig.hideChannelLogos) { if (!tvguideConfig.hideChannelLogos) {
cImage *logo = imgCache.GetLogo(channel); cImage *logo = imgCache.GetLogo(channel);
if (logo) { if (logo) {
const int logoheight = logo->Height(); pixmapLogo->DrawImage(cPoint((Width() - logoWidth) / 2, 6), *logo);
pixmapLogo->DrawImage(cPoint((Width() - logoWidth) / 2, (geoManager.channelHeaderHeight - lineHeight - logoheight) / 2), *logo);
logoFound = true; logoFound = true;
} }
} }
@@ -108,12 +107,12 @@ void cHeaderGrid::drawChannelVertical(const cChannel *channel) {
if (!drawText) if (!drawText)
return; return;
tColor colorTextBack = (tvguideConfig.style == eStyleFlat)?color:clrTransparent; tColor colorTextBack = (tvguideConfig.style == eStyleFlat)?color:clrTransparent;
for (int i=0; i<lines; i++) { for (int i = 0; i < lines; i++) {
int textWidth = fontManager.FontChannelHeader->Width(tw.GetLine(i)); int textWidth = fontManager.FontChannelHeader->Width(tw.GetLine(i));
int xText = (geoManager.colWidth - textWidth) / 2; int xText = (geoManager.colWidth - textWidth) / 2;
if (xText < 0) if (xText < 0)
xText = 0; xText = 0;
pixmap->DrawText(cPoint(xText, yStart + i*lineHeight), tw.GetLine(i), theme.Color(clrFontHeader), colorTextBack, fontManager.FontChannelHeader); pixmap->DrawText(cPoint(xText, yStart + i * lineHeight), tw.GetLine(i), theme.Color(clrFontHeader), colorTextBack, fontManager.FontChannelHeader);
} }
} }

View File

@@ -3,7 +3,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: vdr-tvguide 0.0.1\n" "Project-Id-Version: vdr-tvguide 0.0.1\n"
"Report-Msgid-Bugs-To: <see README>\n" "Report-Msgid-Bugs-To: <see README>\n"
"POT-Creation-Date: 2019-04-05 13:01+0200\n" "POT-Creation-Date: 2019-04-12 14:35+0200\n"
"PO-Revision-Date: 2013-09-21 17:49+0200\n" "PO-Revision-Date: 2013-09-21 17:49+0200\n"
"Last-Translator: My friend <Sampep> Thanks David <Gabychan> <gbonich@gmail.com>\n" "Last-Translator: My friend <Sampep> Thanks David <Gabychan> <gbonich@gmail.com>\n"
"Language-Team: \n" "Language-Team: \n"
@@ -366,6 +366,9 @@ msgstr "Inicia canal"
msgid "Stop Channel" msgid "Stop Channel"
msgstr "Atura canal" msgstr "Atura canal"
msgid "Channel Group"
msgstr ""
msgid "Start after" msgid "Start after"
msgstr "Comença després" msgstr "Comença després"
@@ -525,6 +528,12 @@ msgstr "coincidència exacta"
msgid "regular expression" msgid "regular expression"
msgstr "expressió regular" msgstr "expressió regular"
msgid "Interval"
msgstr ""
msgid "only FTA"
msgstr ""
msgid "General Settings" msgid "General Settings"
msgstr "Preferències" msgstr "Preferències"
@@ -783,13 +792,19 @@ msgstr ""
msgid "Use Remotetimers" msgid "Use Remotetimers"
msgstr "Utilitza temporitzadors remots" msgstr "Utilitza temporitzadors remots"
msgid "Limit channels in favorites"
msgstr ""
msgid "Use \"What's on now\" in favorites" msgid "Use \"What's on now\" in favorites"
msgstr "" msgstr ""
msgid "Use \"What's on next\" in favorites" msgid "Use \"What's on next\" in favorites"
msgstr "" msgstr ""
msgid "Use user defined time 1 in favorites" msgid "User defined times in favorites:"
msgstr ""
msgid "Use user defined time 1"
msgstr "" msgstr ""
msgid "Description" msgid "Description"
@@ -798,16 +813,13 @@ msgstr ""
msgid "Time" msgid "Time"
msgstr "" msgstr ""
msgid "Use user defined time 2 in favorites" msgid "Use user defined time 2"
msgstr "" msgstr ""
msgid "Use user defined time 3 in favorites" msgid "Use user defined time 3"
msgstr "" msgstr ""
msgid "Use user defined time 4 in favorites" msgid "Use user defined time 4"
msgstr ""
msgid "Limit channels in favorites"
msgstr "" msgstr ""
msgid "Switchtimer:" msgid "Switchtimer:"
@@ -846,6 +858,9 @@ msgstr ""
msgid "Recording Menus Icon Cache" msgid "Recording Menus Icon Cache"
msgstr "" msgstr ""
msgid "A fancy 2d EPG Viewer"
msgstr ""
msgid "No Cast available" msgid "No Cast available"
msgstr "" msgstr ""

View File

@@ -3,7 +3,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: vdr-tvguide 0.0.1\n" "Project-Id-Version: vdr-tvguide 0.0.1\n"
"Report-Msgid-Bugs-To: <see README>\n" "Report-Msgid-Bugs-To: <see README>\n"
"POT-Creation-Date: 2019-04-05 13:01+0200\n" "POT-Creation-Date: 2019-04-12 14:35+0200\n"
"PO-Revision-Date: 2012-08-25 17:49+0200\n" "PO-Revision-Date: 2012-08-25 17:49+0200\n"
"Last-Translator: Horst\n" "Last-Translator: Horst\n"
"Language-Team: \n" "Language-Team: \n"
@@ -363,6 +363,9 @@ msgstr "Startkanal"
msgid "Stop Channel" msgid "Stop Channel"
msgstr "Stopkanal" msgstr "Stopkanal"
msgid "Channel Group"
msgstr "Kanalgruppe"
msgid "Start after" msgid "Start after"
msgstr "Beginn nach" msgstr "Beginn nach"
@@ -522,6 +525,12 @@ msgstr "exakt"
msgid "regular expression" msgid "regular expression"
msgstr "Regulärer Ausdruck" msgstr "Regulärer Ausdruck"
msgid "Interval"
msgstr "Bereich"
msgid "only FTA"
msgstr "ohne PayTV"
msgid "General Settings" msgid "General Settings"
msgstr "Allgemeine Einstellungen" msgstr "Allgemeine Einstellungen"
@@ -780,14 +789,20 @@ msgstr "Verzeichnis für Sofortaufnahmen"
msgid "Use Remotetimers" msgid "Use Remotetimers"
msgstr "RemoteTimers benutzen" msgstr "RemoteTimers benutzen"
msgid "Limit channels in favorites"
msgstr "Kanäle in Favoriten beschränken"
msgid "Use \"What's on now\" in favorites" msgid "Use \"What's on now\" in favorites"
msgstr "\"Was läuft jetzt\" in Favoriten benutzen" msgstr "\"Was läuft jetzt\" in Favoriten benutzen"
msgid "Use \"What's on next\" in favorites" msgid "Use \"What's on next\" in favorites"
msgstr "\"Was läuft als nächstes\" in Favoriten benutzen" msgstr "\"Was läuft als nächstes\" in Favoriten benutzen"
msgid "Use user defined time 1 in favorites" msgid "User defined times in favorites:"
msgstr "Benutzerdef. Zeit 1 in Favoriten benutzen" msgstr "Nutzer definierte Zeiten in Favoriten:"
msgid "Use user defined time 1"
msgstr "Verw. benutzerdef. Zeit 1"
msgid "Description" msgid "Description"
msgstr "Beschreibung" msgstr "Beschreibung"
@@ -795,17 +810,14 @@ msgstr "Beschreibung"
msgid "Time" msgid "Time"
msgstr "Zeit" msgstr "Zeit"
msgid "Use user defined time 2 in favorites" msgid "Use user defined time 2"
msgstr "Benutzerdef. Zeit 2 in Favoriten benutzen" msgstr "Verw. benutzerdef. Zeit 2"
msgid "Use user defined time 3 in favorites" msgid "Use user defined time 3"
msgstr "Benutzerdef. Zeit 3 in Favoriten benutzen" msgstr "Verw. benutzerdef. Zeit 3"
msgid "Use user defined time 4 in favorites" msgid "Use user defined time 4"
msgstr "Benutzerdef. Zeit 4 in Favoriten benutzen" msgstr "Verw. benutzerdef. Zeit 4"
msgid "Limit channels in favorites"
msgstr "Kanäle in Favoriten beschränken"
msgid "Switchtimer:" msgid "Switchtimer:"
msgstr "Umschalttimer:" msgstr "Umschalttimer:"
@@ -843,6 +855,9 @@ msgstr "Kanalgruppen Cache"
msgid "Recording Menus Icon Cache" msgid "Recording Menus Icon Cache"
msgstr "Recording Menüs Icon Cache" msgstr "Recording Menüs Icon Cache"
msgid "A fancy 2d EPG Viewer"
msgstr "Eine schicke Programm Vorschau"
msgid "No Cast available" msgid "No Cast available"
msgstr "Keine Besetzung vorhanden" msgstr "Keine Besetzung vorhanden"

View File

@@ -3,7 +3,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: vdr-tvguide 0.0.1\n" "Project-Id-Version: vdr-tvguide 0.0.1\n"
"Report-Msgid-Bugs-To: <see README>\n" "Report-Msgid-Bugs-To: <see README>\n"
"POT-Creation-Date: 2019-04-05 13:01+0200\n" "POT-Creation-Date: 2019-04-12 14:35+0200\n"
"PO-Revision-Date: 2012-08-25 17:49+0200\n" "PO-Revision-Date: 2012-08-25 17:49+0200\n"
"Last-Translator: fiveten_59\n" "Last-Translator: fiveten_59\n"
"Language-Team: \n" "Language-Team: \n"
@@ -363,6 +363,9 @@ msgstr "Avvia il Canale"
msgid "Stop Channel" msgid "Stop Channel"
msgstr "Ferma il Canale" msgstr "Ferma il Canale"
msgid "Channel Group"
msgstr ""
msgid "Start after" msgid "Start after"
msgstr "Avvia dopo" msgstr "Avvia dopo"
@@ -522,6 +525,12 @@ msgstr "exakt"
msgid "regular expression" msgid "regular expression"
msgstr "Regulärer Ausdruck" msgstr "Regulärer Ausdruck"
msgid "Interval"
msgstr ""
msgid "only FTA"
msgstr ""
msgid "General Settings" msgid "General Settings"
msgstr "Allgemeine Einstellungen" msgstr "Allgemeine Einstellungen"
@@ -780,14 +789,20 @@ msgstr "Cartella per la registrazione immediata"
msgid "Use Remotetimers" msgid "Use Remotetimers"
msgstr "Usa Remotetimers" msgstr "Usa Remotetimers"
msgid "Limit channels in favorites"
msgstr "Limite dei canali nei favoriti"
msgid "Use \"What's on now\" in favorites" msgid "Use \"What's on now\" in favorites"
msgstr "Usa \"In programma ora\" nei favoriti" msgstr "Usa \"In programma ora\" nei favoriti"
msgid "Use \"What's on next\" in favorites" msgid "Use \"What's on next\" in favorites"
msgstr "Usa \"Programma prossimo\" nei favoriti" msgstr "Usa \"Programma prossimo\" nei favoriti"
msgid "Use user defined time 1 in favorites" msgid "User defined times in favorites:"
msgstr "Usa il tempo definito per l'user 1 in favoriti" msgstr ""
msgid "Use user defined time 1"
msgstr "Usa il tempo definito per l'user 1"
msgid "Description" msgid "Description"
msgstr "Descrizione" msgstr "Descrizione"
@@ -795,17 +810,14 @@ msgstr "Descrizione"
msgid "Time" msgid "Time"
msgstr "Tempo" msgstr "Tempo"
msgid "Use user defined time 2 in favorites" msgid "Use user defined time 2"
msgstr "Usa il tempo definito per l'user 2 in favoriti" msgstr "Usa il tempo definito per l'user 2"
msgid "Use user defined time 3 in favorites" msgid "Use user defined time 3"
msgstr "Usa il tempo definito per l'user 3 in favoriti" msgstr "Usa il tempo definito per l'user 3"
msgid "Use user defined time 4 in favorites" msgid "Use user defined time 4"
msgstr "Usa il tempo definito per l'user 4 in favoriti" msgstr "Usa il tempo definito per l'user 4"
msgid "Limit channels in favorites"
msgstr "Limite dei canali nei favoriti"
msgid "Switchtimer:" msgid "Switchtimer:"
msgstr "" msgstr ""
@@ -843,6 +855,9 @@ msgstr "Cache dei Gruppi Canale"
msgid "Recording Menus Icon Cache" msgid "Recording Menus Icon Cache"
msgstr "Recording Menüs Icon Cache" msgstr "Recording Menüs Icon Cache"
msgid "A fancy 2d EPG Viewer"
msgstr ""
msgid "No Cast available" msgid "No Cast available"
msgstr "Nessun cast disponibile" msgstr "Nessun cast disponibile"

View File

@@ -3,7 +3,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: vdr-tvguide 1.0.0\n" "Project-Id-Version: vdr-tvguide 1.0.0\n"
"Report-Msgid-Bugs-To: <see README>\n" "Report-Msgid-Bugs-To: <see README>\n"
"POT-Creation-Date: 2019-04-05 13:01+0200\n" "POT-Creation-Date: 2019-04-12 14:35+0200\n"
"PO-Revision-Date: 2013-09-25 17:49+0400\n" "PO-Revision-Date: 2013-09-25 17:49+0400\n"
"Last-Translator: AmiD, ilya\n" "Last-Translator: AmiD, ilya\n"
"Language-Team: Russia-Cherepovets(wm.amid@gmail.com)\n" "Language-Team: Russia-Cherepovets(wm.amid@gmail.com)\n"
@@ -363,6 +363,9 @@ msgstr "С канала"
msgid "Stop Channel" msgid "Stop Channel"
msgstr "По канал" msgstr "По канал"
msgid "Channel Group"
msgstr ""
msgid "Start after" msgid "Start after"
msgstr "С" msgstr "С"
@@ -522,6 +525,12 @@ msgstr "точное совпадение"
msgid "regular expression" msgid "regular expression"
msgstr "регулярные выражения" msgstr "регулярные выражения"
msgid "Interval"
msgstr ""
msgid "only FTA"
msgstr ""
msgid "General Settings" msgid "General Settings"
msgstr "Основные настройки" msgstr "Основные настройки"
@@ -780,13 +789,19 @@ msgstr ""
msgid "Use Remotetimers" msgid "Use Remotetimers"
msgstr "RemoteTimers benutzen" msgstr "RemoteTimers benutzen"
msgid "Limit channels in favorites"
msgstr ""
msgid "Use \"What's on now\" in favorites" msgid "Use \"What's on now\" in favorites"
msgstr "" msgstr ""
msgid "Use \"What's on next\" in favorites" msgid "Use \"What's on next\" in favorites"
msgstr "" msgstr ""
msgid "Use user defined time 1 in favorites" msgid "User defined times in favorites:"
msgstr ""
msgid "Use user defined time 1"
msgstr "" msgstr ""
msgid "Description" msgid "Description"
@@ -795,16 +810,13 @@ msgstr ""
msgid "Time" msgid "Time"
msgstr "" msgstr ""
msgid "Use user defined time 2 in favorites" msgid "Use user defined time 2"
msgstr "" msgstr ""
msgid "Use user defined time 3 in favorites" msgid "Use user defined time 3"
msgstr "" msgstr ""
msgid "Use user defined time 4 in favorites" msgid "Use user defined time 4"
msgstr ""
msgid "Limit channels in favorites"
msgstr "" msgstr ""
msgid "Switchtimer:" msgid "Switchtimer:"
@@ -843,6 +855,9 @@ msgstr ""
msgid "Recording Menus Icon Cache" msgid "Recording Menus Icon Cache"
msgstr "" msgstr ""
msgid "A fancy 2d EPG Viewer"
msgstr ""
msgid "No Cast available" msgid "No Cast available"
msgstr "" msgstr ""

View File

@@ -3,7 +3,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: vdr-tvguide 1.1.0\n" "Project-Id-Version: vdr-tvguide 1.1.0\n"
"Report-Msgid-Bugs-To: <see README>\n" "Report-Msgid-Bugs-To: <see README>\n"
"POT-Creation-Date: 2019-04-05 13:01+0200\n" "POT-Creation-Date: 2019-04-12 14:35+0200\n"
"PO-Revision-Date: 2013-09-15 00:12+0100\n" "PO-Revision-Date: 2013-09-15 00:12+0100\n"
"Last-Translator: Milan Hrala <hrala.milan@gmail.com>\n" "Last-Translator: Milan Hrala <hrala.milan@gmail.com>\n"
"Language-Team: \n" "Language-Team: \n"
@@ -363,6 +363,9 @@ msgstr "Od kan
msgid "Stop Channel" msgid "Stop Channel"
msgstr "Po kan<61>l" msgstr "Po kan<61>l"
msgid "Channel Group"
msgstr ""
msgid "Start after" msgid "Start after"
msgstr "Za<5A>iatok po" msgstr "Za<5A>iatok po"
@@ -522,6 +525,12 @@ msgstr "presn
msgid "regular expression" msgid "regular expression"
msgstr "regul<75>rny v<>raz" msgstr "regul<75>rny v<>raz"
msgid "Interval"
msgstr ""
msgid "only FTA"
msgstr ""
msgid "General Settings" msgid "General Settings"
msgstr "V<>eobecn<63> nastavenia" msgstr "V<>eobecn<63> nastavenia"
@@ -780,13 +789,19 @@ msgstr ""
msgid "Use Remotetimers" msgid "Use Remotetimers"
msgstr "Pou<6F>i<EFBFBD> vzdialen<65> pl<70>nova<76>" msgstr "Pou<6F>i<EFBFBD> vzdialen<65> pl<70>nova<76>"
msgid "Limit channels in favorites"
msgstr ""
msgid "Use \"What's on now\" in favorites" msgid "Use \"What's on now\" in favorites"
msgstr "" msgstr ""
msgid "Use \"What's on next\" in favorites" msgid "Use \"What's on next\" in favorites"
msgstr "" msgstr ""
msgid "Use user defined time 1 in favorites" msgid "User defined times in favorites:"
msgstr ""
msgid "Use user defined time 1"
msgstr "" msgstr ""
msgid "Description" msgid "Description"
@@ -795,16 +810,13 @@ msgstr ""
msgid "Time" msgid "Time"
msgstr "" msgstr ""
msgid "Use user defined time 2 in favorites" msgid "Use user defined time 2"
msgstr "" msgstr ""
msgid "Use user defined time 3 in favorites" msgid "Use user defined time 3"
msgstr "" msgstr ""
msgid "Use user defined time 4 in favorites" msgid "Use user defined time 4"
msgstr ""
msgid "Limit channels in favorites"
msgstr "" msgstr ""
msgid "Switchtimer:" msgid "Switchtimer:"
@@ -843,6 +855,9 @@ msgstr ""
msgid "Recording Menus Icon Cache" msgid "Recording Menus Icon Cache"
msgstr "" msgstr ""
msgid "A fancy 2d EPG Viewer"
msgstr ""
msgid "No Cast available" msgid "No Cast available"
msgstr "" msgstr ""

View File

@@ -50,9 +50,17 @@ bool cRecManager::CheckEventForTimer(const cEvent *event) {
pRemoteTimers->Service("RemoteTimers::GetMatch-v1.0", &rtMatch); pRemoteTimers->Service("RemoteTimers::GetMatch-v1.0", &rtMatch);
if (rtMatch.timerMatch == tmFull) if (rtMatch.timerMatch == tmFull)
hasTimer = true; hasTimer = true;
} else } else {
#if VDRVERSNUM >= 20301
eTimerMatch TimerMatch = tmNone;
LOCK_TIMERS_READ;
const cTimers *timers = Timers;
if (timers->GetMatch(event, &TimerMatch) && (TimerMatch == tmFull))
hasTimer = true;
#else
hasTimer = event->HasTimer(); hasTimer = event->HasTimer();
#endif
}
return hasTimer; return hasTimer;
} }
@@ -175,7 +183,6 @@ void cRecManager::SetTimerPath(cTimer *timer, const cEvent *event, std::string p
} }
void cRecManager::DeleteTimer(int timerID) { void cRecManager::DeleteTimer(int timerID) {
dsyslog ("%s %s %d\n", __FILE__, __func__, __LINE__);
#if VDRVERSNUM >= 20301 #if VDRVERSNUM >= 20301
cTimer *t; cTimer *t;
{ {
@@ -191,7 +198,6 @@ void cRecManager::DeleteTimer(int timerID) {
} }
void cRecManager::DeleteTimer(const cEvent *event) { void cRecManager::DeleteTimer(const cEvent *event) {
dsyslog ("%s %s %d\n", __FILE__, __func__, __LINE__);
if (!event) if (!event)
return; return;
if (tvguideConfig.useRemoteTimers && pRemoteTimers) { if (tvguideConfig.useRemoteTimers && pRemoteTimers) {
@@ -202,7 +208,6 @@ void cRecManager::DeleteTimer(const cEvent *event) {
} }
void cRecManager::DeleteLocalTimer(const cEvent *event) { void cRecManager::DeleteLocalTimer(const cEvent *event) {
dsyslog ("%s %s %d\n", __FILE__, __func__, __LINE__);
const cTimer *t; const cTimer *t;
#if VDRVERSNUM >= 20301 #if VDRVERSNUM >= 20301
{ {
@@ -218,7 +223,6 @@ void cRecManager::DeleteLocalTimer(const cEvent *event) {
} }
void cRecManager::DeleteTimer(const cTimer *timer) { void cRecManager::DeleteTimer(const cTimer *timer) {
dsyslog ("%s %s %d\n", __FILE__, __func__, __LINE__);
#if VDRVERSNUM >= 20301 #if VDRVERSNUM >= 20301
LOCK_TIMERS_WRITE; LOCK_TIMERS_WRITE;
cTimers* timers = Timers; cTimers* timers = Timers;
@@ -491,6 +495,22 @@ void cRecManager::GetSearchTimers(std::vector<cTVGuideSearchTimer> *searchTimer)
std::sort(searchTimer->begin(), searchTimer->end()); std::sort(searchTimer->begin(), searchTimer->end());
} }
void cRecManager::GetChannelGroups(std::vector<std::string> *channelGroups) {
if (!epgSearchAvailable) {
return;
}
Epgsearch_services_v1_1 *epgSearch = new Epgsearch_services_v1_1;
if (epgSearchPlugin->Service("Epgsearch-services-v1.1", epgSearch)) {
std::list<std::string> channelGroupList;
channelGroupList = epgSearch->handler->ChanGrpList();
for (std::list<std::string>::iterator it = channelGroupList.begin(); it != channelGroupList.end(); it++) {
channelGroups->push_back(*it);
}
}
std::sort(channelGroups->begin(), channelGroups->end());
}
int cRecManager::CreateSearchTimer(std::string epgSearchString) { int cRecManager::CreateSearchTimer(std::string epgSearchString) {
int timerID = -1; int timerID = -1;
if (!epgSearchAvailable) if (!epgSearchAvailable)

View File

@@ -46,6 +46,7 @@ public:
const cEvent **PerformSearch(Epgsearch_searchresults_v1_0 data, int &numResults); const cEvent **PerformSearch(Epgsearch_searchresults_v1_0 data, int &numResults);
void ReadEPGSearchTemplates(std::vector<TVGuideEPGSearchTemplate> *epgTemplates); void ReadEPGSearchTemplates(std::vector<TVGuideEPGSearchTemplate> *epgTemplates);
void GetSearchTimers(std::vector<cTVGuideSearchTimer> *timers); void GetSearchTimers(std::vector<cTVGuideSearchTimer> *timers);
void GetChannelGroups(std::vector<std::string> *channelGroups);
int CreateSearchTimer(std::string epgSearchString); int CreateSearchTimer(std::string epgSearchString);
bool SaveSearchTimer(cTVGuideSearchTimer *searchTimer); bool SaveSearchTimer(cTVGuideSearchTimer *searchTimer);
void DeleteSearchTimer(cTVGuideSearchTimer *searchTimer, bool delTimers); void DeleteSearchTimer(cTVGuideSearchTimer *searchTimer, bool delTimers);

View File

@@ -493,7 +493,8 @@ cRecMenuItemSelect::cRecMenuItemSelect(cString text,
int initialVal, int initialVal,
bool active, bool active,
int *callback, int *callback,
eRecMenuState action) { eRecMenuState action,
bool refresh) {
selectable = true; selectable = true;
this->text = text; this->text = text;
strings = Strings; strings = Strings;
@@ -504,6 +505,7 @@ cRecMenuItemSelect::cRecMenuItemSelect(cString text,
this->currentVal = initialVal; this->currentVal = initialVal;
this->active = active; this->active = active;
this->callback = callback; this->callback = callback;
this->refresh = refresh;
this->action = action; this->action = action;
height = 3 * font->Height() / 2; height = 3 * font->Height() / 2;
pixmapVal = NULL; pixmapVal = NULL;
@@ -571,14 +573,20 @@ eRecMenuState cRecMenuItemSelect::ProcessKey(eKeys Key) {
if (callback) if (callback)
*callback = currentVal; *callback = currentVal;
DrawValue(); DrawValue();
return rmsConsumed; if (refresh)
return rmsRefresh;
else
return rmsConsumed;
break; break;
case kRight: case kRight:
currentVal = (currentVal+1)%numValues; currentVal = (currentVal+1)%numValues;
if (callback) if (callback)
*callback = currentVal; *callback = currentVal;
DrawValue(); DrawValue();
return rmsConsumed; if (refresh)
return rmsRefresh;
else
return rmsConsumed;
break; break;
case kOk: case kOk:
return action; return action;
@@ -1802,13 +1810,13 @@ cRecMenuItemEvent::~cRecMenuItemEvent(void) {
void cRecMenuItemEvent::SetPixmaps(void) { void cRecMenuItemEvent::SetPixmaps(void) {
if (!pixmap) { if (!pixmap) {
pixmap = osdManager.requestPixmap(4, cRect(x, y, width, height)); pixmap = osdManager.requestPixmap(4, cRect(x, y, width, height));
pixmapText = osdManager.requestPixmap(5, cRect(x, y, width, height)); pixmapText = osdManager.requestPixmap(5, cRect(x, y, width - height / 2 - 10, height));
pixmapText->Fill(clrTransparent); pixmapText->Fill(clrTransparent);
pixmapIcons = osdManager.requestPixmap(6, cRect(x, y, width, height)); pixmapIcons = osdManager.requestPixmap(6, cRect(x, y, width, height));
pixmapIcons->Fill(clrTransparent); pixmapIcons->Fill(clrTransparent);
} else { } else {
pixmap->SetViewPort(cRect(x, y, width, height)); pixmap->SetViewPort(cRect(x, y, width, height));
pixmapText->SetViewPort(cRect(x, y, width, height)); pixmapText->SetViewPort(cRect(x, y, width - height / 2 - 10, height));
pixmapIcons->SetViewPort(cRect(x, y, width, height)); pixmapIcons->SetViewPort(cRect(x, y, width, height));
} }
} }
@@ -1861,7 +1869,7 @@ int cRecMenuItemEvent::DrawIcons(void) {
int iconY = (height - iconSize) / 2; int iconY = (height - iconSize) / 2;
std::string iconInfo; std::string iconInfo;
if (active) { if (active) {
iconInfo = (iconActive==0)?"info_active":"info_inactive"; iconInfo = (iconActive == 0) ? "info_active" : "info_inactive";
} else { } else {
iconInfo = "info_inactive"; iconInfo = "info_inactive";
} }
@@ -1871,7 +1879,6 @@ int cRecMenuItemEvent::DrawIcons(void) {
iconsX += iconSize + 5; iconsX += iconSize + 5;
} }
iconY = height - iconSize - 10;
if (event->HasTimer()) { if (event->HasTimer()) {
cImage *imgHasTimer = imgCache.GetIcon("activetimer", iconSize, iconSize); cImage *imgHasTimer = imgCache.GetIcon("activetimer", iconSize, iconSize);
if (imgHasTimer) { if (imgHasTimer) {
@@ -1919,11 +1926,7 @@ eRecMenuState cRecMenuItemEvent::ProcessKey(eKeys Key) {
// --- cRecMenuItemChannelChooser ------------------------------------------------------- // --- cRecMenuItemChannelChooser -------------------------------------------------------
cRecMenuItemChannelChooser::cRecMenuItemChannelChooser(cString text, cRecMenuItemChannelChooser::cRecMenuItemChannelChooser(cString text,
#if VDRVERSNUM >= 20301
const cChannel *initialChannel, const cChannel *initialChannel,
#else
cChannel *initialChannel,
#endif
bool active, bool active,
int *callback, int *callback,
eRecMenuState action) { eRecMenuState action) {
@@ -1984,9 +1987,9 @@ void cRecMenuItemChannelChooser::DrawValue(void) {
int logoWidth = height * tvguideConfig.logoWidthRatio / tvguideConfig.logoHeightRatio; int logoWidth = height * tvguideConfig.logoWidthRatio / tvguideConfig.logoHeightRatio;
int logoX = textX - logoWidth - 10; int logoX = textX - logoWidth - 10;
cImageLoader imgLoader; cImageLoader imgLoader;
if (imgLoader.LoadLogo(channel, logoWidth, height)) { if (imgLoader.LoadLogo(channel, logoWidth, height - 10)) {
cImage logo = imgLoader.GetImage(); cImage logo = imgLoader.GetImage();
pixmapChannel->DrawImage(cPoint(logoX, 0), logo); pixmapChannel->DrawImage(cPoint(logoX, 5), logo);
} }
} else { } else {
cString textVal = tr("all Channels"); cString textVal = tr("all Channels");
@@ -2008,29 +2011,21 @@ eRecMenuState cRecMenuItemChannelChooser::ProcessKey(eKeys Key) {
fresh = true; fresh = true;
if (!channel) if (!channel)
return rmsConsumed; return rmsConsumed;
#if VDRVERSNUM >= 20301
const cChannel *prev = channel; const cChannel *prev = channel;
LOCK_CHANNELS_READ;
const cChannel *firstChannel = Channels->First();
#else
cChannel *prev = channel;
cChannel *firstChannel = Channels.First();
#endif
if(firstChannel->GroupSep())
#if VDRVERSNUM >= 20301 #if VDRVERSNUM >= 20301
firstChannel = Channels->Next(firstChannel); LOCK_CHANNELS_READ;
const cChannels* channels = Channels;
#else #else
firstChannel = Channels.Next(firstChannel); const cChannels* channels = &Channels;
#endif #endif
const cChannel *firstChannel = channels->First();
if(firstChannel->GroupSep())
firstChannel = channels->Next(firstChannel);
if (prev == firstChannel) { if (prev == firstChannel) {
if (!initialChannelSet) if (!initialChannelSet)
channel = NULL; channel = NULL;
} else { } else {
#if VDRVERSNUM >= 20301 while (prev = channels->Prev(prev)) {
while (prev = Channels->Prev(prev)) {
#else
while (prev = Channels.Prev(prev)) {
#endif
if(!prev->GroupSep()) { if(!prev->GroupSep()) {
channel = prev; channel = prev;
break; break;
@@ -2047,30 +2042,20 @@ eRecMenuState cRecMenuItemChannelChooser::ProcessKey(eKeys Key) {
return rmsConsumed; return rmsConsumed;
break; } break; }
case kRight: { case kRight: {
fresh = true;
#if VDRVERSNUM >= 20301 #if VDRVERSNUM >= 20301
LOCK_CHANNELS_READ; LOCK_CHANNELS_READ;
const cChannels* channels = Channels;
#else
const cChannels* channels = &Channels;
#endif #endif
fresh = true;
if (!channel) { if (!channel) {
#if VDRVERSNUM >= 20301 channel = channels->First();
channel = Channels->First();
#else
channel = Channels.First();
#endif
if(channel->GroupSep()) if(channel->GroupSep())
#if VDRVERSNUM >= 20301 channel = channels->Next(channel);
channel = Channels->Next(channel);
#else
channel = Channels.Next(channel);
#endif
} else { } else {
#if VDRVERSNUM >= 20301
const cChannel *next = channel; const cChannel *next = channel;
while (next = Channels->Next(next)) { while (next = channels->Next(next)) {
#else
cChannel *next = channel;
while (next = Channels.Next(next)) {
#endif
if(!next->GroupSep()) { if(!next->GroupSep()) {
channel = next; channel = next;
break; break;
@@ -2096,7 +2081,7 @@ eRecMenuState cRecMenuItemChannelChooser::ProcessKey(eKeys Key) {
LOCK_CHANNELS_READ; LOCK_CHANNELS_READ;
const cChannel *chanNew = Channels->GetByNumber(channelNumber); const cChannel *chanNew = Channels->GetByNumber(channelNumber);
#else #else
cChannel *chanNew = Channels.GetByNumber(channelNumber); const cChannel *chanNew = Channels.GetByNumber(channelNumber);
#endif #endif
if (chanNew) { if (chanNew) {
channel = chanNew; channel = chanNew;
@@ -2291,7 +2276,7 @@ void cRecMenuItemRecording::Draw(void) {
LOCK_CHANNELS_READ; LOCK_CHANNELS_READ;
const cChannel *channel = Channels->GetByChannelID(recInfo->ChannelID()); const cChannel *channel = Channels->GetByChannelID(recInfo->ChannelID());
#else #else
cChannel *channel = Channels.GetByChannelID(recInfo->ChannelID()); const cChannel *channel = Channels.GetByChannelID(recInfo->ChannelID());
#endif #endif
cString channelName = tr("unknown channel"); cString channelName = tr("unknown channel");
if (channel) if (channel)
@@ -2708,18 +2693,19 @@ void cRecMenuItemSearchTimer::SetPixmaps(void) {
void cRecMenuItemSearchTimer::Draw(void) { void cRecMenuItemSearchTimer::Draw(void) {
int textX = DrawIcons(); int textX = DrawIcons();
bool timerIsActive = timer.Active();
pixmapText->Fill(clrTransparent); pixmapText->Fill(clrTransparent);
textX += 20; textX += 20;
cString label; cString label = cString::sprintf("\"%s\"", timer.SearchString().c_str());
if (timer.Active()) { cString inactive = cString::sprintf("(%s)", tr("inactive"));
label = cString::sprintf("\"%s\"", timer.SearchString().c_str());
} else {
label = cString::sprintf("\"%s\" (%s)", timer.SearchString().c_str(), tr("inactive"));
}
int numTimersActive = timer.GetNumTimers(); int numTimersActive = timer.GetNumTimers();
int numRecordings = timer.GetNumRecordings(); int numRecordings = timer.GetNumRecordings();
cString info = cString::sprintf("%s: %d, %s: %d", tr("active timers"), numTimersActive, tr("recordings done"), numRecordings); cString info = cString::sprintf("%s: %d, %s: %d", tr("active timers"), numTimersActive, tr("recordings done"), numRecordings);
pixmapText->DrawText(cPoint(textX, 5 + (height/2 - font->Height())/2), *label, colorText, clrTransparent, font); pixmapText->DrawText(cPoint(textX, 5 + (height/2 - font->Height()) / 2), *label, colorText, clrTransparent, font);
if (!timerIsActive) {
pixmapText->DrawText(cPoint(textX, 5 + (height - font->Height()) / 2), *inactive, colorText, clrTransparent, font, width - textX - 20, 0, taRight);
}
pixmapText->DrawText(cPoint(textX, height/2 + (height/2 - fontSmall->Height())/2), *info, colorText, clrTransparent, fontSmall); pixmapText->DrawText(cPoint(textX, height/2 + (height/2 - fontSmall->Height())/2), *info, colorText, clrTransparent, fontSmall);
} }

View File

@@ -247,6 +247,7 @@ private:
cString text; cString text;
int currentVal; int currentVal;
int *callback; int *callback;
bool refresh;
std::vector<std::string> strings; std::vector<std::string> strings;
int numValues; int numValues;
cPixmap *pixmapVal; cPixmap *pixmapVal;
@@ -257,7 +258,8 @@ public:
int initialVal, int initialVal,
bool active = false, bool active = false,
int *callback = NULL, int *callback = NULL,
eRecMenuState action = rmsNotConsumed); eRecMenuState action = rmsNotConsumed,
bool refresh = false);
virtual ~cRecMenuItemSelect(void); virtual ~cRecMenuItemSelect(void);
void SetPixmaps(void); void SetPixmaps(void);
void Hide(void); void Hide(void);
@@ -489,11 +491,7 @@ public:
class cRecMenuItemChannelChooser : public cRecMenuItem { class cRecMenuItemChannelChooser : public cRecMenuItem {
private: private:
cString text; cString text;
#if VDRVERSNUM >= 20301
const cChannel *channel; const cChannel *channel;
#else
cChannel *channel;
#endif
int channelNumber; int channelNumber;
int *callback; int *callback;
bool initialChannelSet; bool initialChannelSet;
@@ -502,11 +500,7 @@ private:
void DrawValue(void); void DrawValue(void);
public: public:
cRecMenuItemChannelChooser (cString text, cRecMenuItemChannelChooser (cString text,
#if VDRVERSNUM >= 20301
const cChannel *initialChannel, const cChannel *initialChannel,
#else
cChannel *initialChannel,
#endif
bool active = false, bool active = false,
int *callback = NULL, int *callback = NULL,
eRecMenuState action = rmsNotConsumed); eRecMenuState action = rmsNotConsumed);

View File

@@ -311,7 +311,9 @@ eOSState cRecMenuManager::StateMachine(eRecMenuState nextState) {
if (epgSearchTemplates.size() > 0) { if (epgSearchTemplates.size() > 0) {
activeMenu = new cRecMenuSearchTimerTemplates(searchTimer, epgSearchTemplates); activeMenu = new cRecMenuSearchTimerTemplates(searchTimer, epgSearchTemplates);
} else { } else {
activeMenu = new cRecMenuSearchTimerEdit(searchTimer, false); std::vector<std::string> channelGroups;
recManager->GetChannelGroups(&channelGroups);
activeMenu = new cRecMenuSearchTimerEdit(searchTimer, false, channelGroups);
} }
} }
activeMenu->Display(); activeMenu->Display();
@@ -329,12 +331,14 @@ eOSState cRecMenuManager::StateMachine(eRecMenuState nextState) {
searchTimer = menu->GetSearchTimer(); searchTimer = menu->GetSearchTimer();
} else if (cRecMenuSearchTimerEdit *menu = dynamic_cast<cRecMenuSearchTimerEdit*>(activeMenu)) { } else if (cRecMenuSearchTimerEdit *menu = dynamic_cast<cRecMenuSearchTimerEdit*>(activeMenu)) {
searchTimer = menu->GetSearchTimer(); searchTimer = menu->GetSearchTimer();
advancedOptions = (nextState == rmsSearchTimerEditAdvanced)?true:false; advancedOptions = (nextState == rmsSearchTimerEditAdvanced) ? true : false;
} else if (cRecMenuSearchTimerTemplates *menu = dynamic_cast<cRecMenuSearchTimerTemplates*>(activeMenu)) { } else if (cRecMenuSearchTimerTemplates *menu = dynamic_cast<cRecMenuSearchTimerTemplates*>(activeMenu)) {
searchTimer = menu->GetSearchTimer(); searchTimer = menu->GetSearchTimer();
} else break; } else break;
delete activeMenu; delete activeMenu;
activeMenu = new cRecMenuSearchTimerEdit(searchTimer, advancedOptions); std::vector<std::string> channelGroups;
recManager->GetChannelGroups(&channelGroups);
activeMenu = new cRecMenuSearchTimerEdit(searchTimer, advancedOptions, channelGroups);
activeMenu->Display(); activeMenu->Display();
break; } break; }
case rmsSearchTimerTest: { case rmsSearchTimerTest: {

View File

@@ -722,10 +722,11 @@ int cRecMenuSearchTimers::GetTotalNumMenuItems(void) {
} }
// --- cRecMenuSearchTimerEdit --------------------------------------------------------- // --- cRecMenuSearchTimerEdit ---------------------------------------------------------
cRecMenuSearchTimerEdit::cRecMenuSearchTimerEdit(cTVGuideSearchTimer searchTimer, bool advancedOptions) { cRecMenuSearchTimerEdit::cRecMenuSearchTimerEdit(cTVGuideSearchTimer searchTimer, bool advancedOptions, std::vector<std::string> channelGroups) {
deleteMenuItems = false; deleteMenuItems = false;
this->advancedOptions = advancedOptions; this->advancedOptions = advancedOptions;
this->searchTimer = searchTimer; this->searchTimer = searchTimer;
this->channelGroups = channelGroups;
strncpy(searchString, searchTimer.SearchString().c_str(), TEXTINPUTLENGTH); strncpy(searchString, searchTimer.SearchString().c_str(), TEXTINPUTLENGTH);
timerActive = searchTimer.Active(); timerActive = searchTimer.Active();
mode = searchTimer.SearchMode(); mode = searchTimer.SearchMode();
@@ -735,6 +736,8 @@ cRecMenuSearchTimerEdit::cRecMenuSearchTimerEdit(cTVGuideSearchTimer searchTimer
useChannel = searchTimer.UseChannel(); useChannel = searchTimer.UseChannel();
startChannel = searchTimer.StartChannel(); startChannel = searchTimer.StartChannel();
stopChannel = searchTimer.StopChannel(); stopChannel = searchTimer.StopChannel();
channelGroup = searchTimer.ChannelGroup();
channelgroupIndex = -1;
useTime = searchTimer.UseTime(); useTime = searchTimer.UseTime();
startTime = searchTimer.StartTime(); startTime = searchTimer.StartTime();
stopTime = searchTimer.StopTime(); stopTime = searchTimer.StopTime();
@@ -780,6 +783,10 @@ cRecMenuSearchTimerEdit::~cRecMenuSearchTimerEdit(void) {
delete *it; delete *it;
} }
useChannelSubMenu.clear(); useChannelSubMenu.clear();
for (std::vector<cRecMenuItem*>::iterator it = useGroupSubMenu.begin(); it != useGroupSubMenu.end(); it++) {
delete *it;
}
useGroupSubMenu.clear();
for (std::vector<cRecMenuItem*>::iterator it = useTimeSubMenu.begin(); it != useTimeSubMenu.end(); it++) { for (std::vector<cRecMenuItem*>::iterator it = useTimeSubMenu.begin(); it != useTimeSubMenu.end(); it++) {
delete *it; delete *it;
} }
@@ -795,22 +802,45 @@ cRecMenuSearchTimerEdit::~cRecMenuSearchTimerEdit(void) {
currentMenuItems.clear(); currentMenuItems.clear();
} }
int cRecMenuSearchTimerEdit::SplitChannelGroups(std::vector<std::string> *channelGroups, std::vector<std::string> *channelgroups) {
int i = 0;
int j = 0;
for (std::vector<std::string>::iterator it = channelGroups->begin(); it != channelGroups->end(); it++) {
std::string a = *it;
splitstring s(a.c_str());
std::vector<std::string> value = s.split('|', 0);
dsyslog ("%s %s %d %s\n", __FILE__, __func__, __LINE__, s.c_str());
std::vector<std::string>::iterator ito = value.begin();
channelgroups->push_back(*ito);
std::string b = *ito;
if (b.compare(channelGroup) == 0)
j = i;
i++;
}
return j;
}
void cRecMenuSearchTimerEdit::InitMenuItems(void) { void cRecMenuSearchTimerEdit::InitMenuItems(void) {
dsyslog ("%s %s %d\n", __FILE__, __func__, __LINE__);
useChannelPos = 6; useChannelPos = 6;
useTimePos = 7; useTimePos = 7;
useDayOfWeekPos = 8; useDayOfWeekPos = 8;
avoidRepeatsPos = 14; avoidRepeatsPos = 14;
mainMenuItems.push_back(new cRecMenuItemText(tr("Search String"), searchString, TEXTINPUTLENGTH, false, searchString));
mainMenuItems.push_back(new cRecMenuItemBool(tr("Active"), timerActive, false, false, &timerActive, rmsSearchTimerSave));
std::vector<std::string> searchModes; std::vector<std::string> searchModes;
searchTimer.GetSearchModes(&searchModes); searchTimer.GetSearchModes(&searchModes);
std::vector<std::string> useChannelModes;
searchTimer.GetUseChannelModes(&useChannelModes);
channelgroupIndex = SplitChannelGroups(&channelGroups, &channelgroups);
mainMenuItems.push_back(new cRecMenuItemText(tr("Search String"), searchString, TEXTINPUTLENGTH, false, searchString));
mainMenuItems.push_back(new cRecMenuItemBool(tr("Active"), timerActive, false, false, &timerActive, rmsSearchTimerSave));
mainMenuItems.push_back(new cRecMenuItemSelect(tr("Search Mode"), searchModes, mode, false, &mode, rmsSearchTimerSave)); mainMenuItems.push_back(new cRecMenuItemSelect(tr("Search Mode"), searchModes, mode, false, &mode, rmsSearchTimerSave));
mainMenuItems.push_back(new cRecMenuItemBool(tr("Use Title"), useTitle, false, false, &useTitle, rmsSearchTimerSave)); mainMenuItems.push_back(new cRecMenuItemBool(tr("Use Title"), useTitle, false, false, &useTitle, rmsSearchTimerSave));
mainMenuItems.push_back(new cRecMenuItemBool(tr("Use Subtitle"), useSubtitle, false, false, &useSubtitle, rmsSearchTimerSave)); mainMenuItems.push_back(new cRecMenuItemBool(tr("Use Subtitle"), useSubtitle, false, false, &useSubtitle, rmsSearchTimerSave));
mainMenuItems.push_back(new cRecMenuItemBool(tr("Use Description"), useDescription, false, false, &useDescription, rmsSearchTimerSave)); mainMenuItems.push_back(new cRecMenuItemBool(tr("Use Description"), useDescription, false, false, &useDescription, rmsSearchTimerSave));
mainMenuItems.push_back(new cRecMenuItemBool(tr("Limit Channels"), useChannel, true, false, &useChannel, rmsSearchTimerSave)); mainMenuItems.push_back(new cRecMenuItemSelect(tr("Limit Channels"), useChannelModes, useChannel, false, &useChannel, rmsSearchTimerSave, true));
mainMenuItems.push_back(new cRecMenuItemBool(tr("Use Time"), useTime, true, false, &useTime, rmsSearchTimerSave)); mainMenuItems.push_back(new cRecMenuItemBool(tr("Use Time"), useTime, true, false, &useTime, rmsSearchTimerSave));
if (!advancedOptions) { if (!advancedOptions) {
mainMenuItems.push_back(new cRecMenuItemButton(tr("Display advanced Options"), rmsSearchTimerEditAdvanced, false)); mainMenuItems.push_back(new cRecMenuItemButton(tr("Display advanced Options"), rmsSearchTimerEditAdvanced, false));
@@ -842,6 +872,8 @@ void cRecMenuSearchTimerEdit::InitMenuItems(void) {
useChannelSubMenu.push_back(new cRecMenuItemChannelChooser(tr("Stop Channel"), Channels.GetByNumber(stopChannel), false, &stopChannel, rmsSearchTimerSave)); useChannelSubMenu.push_back(new cRecMenuItemChannelChooser(tr("Stop Channel"), Channels.GetByNumber(stopChannel), false, &stopChannel, rmsSearchTimerSave));
#endif #endif
useGroupSubMenu.push_back(new cRecMenuItemSelect(tr("Channel Group"), channelgroups, channelgroupIndex, false, &channelgroupIndex, rmsSearchTimerSave));
useTimeSubMenu.push_back(new cRecMenuItemTime(tr("Start after"), startTime, false, &startTime, rmsSearchTimerSave)); useTimeSubMenu.push_back(new cRecMenuItemTime(tr("Start after"), startTime, false, &startTime, rmsSearchTimerSave));
useTimeSubMenu.push_back(new cRecMenuItemTime(tr("Start before"), stopTime, false, &stopTime, rmsSearchTimerSave)); useTimeSubMenu.push_back(new cRecMenuItemTime(tr("Start before"), stopTime, false, &stopTime, rmsSearchTimerSave));
@@ -856,6 +888,7 @@ void cRecMenuSearchTimerEdit::InitMenuItems(void) {
void cRecMenuSearchTimerEdit::CreateMenuItems(void) { void cRecMenuSearchTimerEdit::CreateMenuItems(void) {
dsyslog ("%s %s %d\n", __FILE__, __func__, __LINE__);
bool reDraw = false; bool reDraw = false;
if (GetCurrentNumMenuItems() > 0) { if (GetCurrentNumMenuItems() > 0) {
InitMenu(false); InitMenu(false);
@@ -867,8 +900,10 @@ void cRecMenuSearchTimerEdit::CreateMenuItems(void) {
for (int i = 0; i < numMainMenuItems; i++) { for (int i = 0; i < numMainMenuItems; i++) {
currentMenuItems.push_back(mainMenuItems[i]); currentMenuItems.push_back(mainMenuItems[i]);
if ((i == useChannelPos) && useChannel) if ((i == useChannelPos) && (useChannel == 1))
AddSubMenu(&useChannelSubMenu); AddSubMenu(&useChannelSubMenu);
else if ((i == useChannelPos) && (useChannel == 2) && (channelgroups.size() > 0))
AddSubMenu(&useGroupSubMenu);
else if ((i == useTimePos) && useTime) else if ((i == useTimePos) && useTime)
AddSubMenu(&useTimeSubMenu); AddSubMenu(&useTimeSubMenu);
else if (advancedOptions && (i == useDayOfWeekPos) && useDayOfWeek) else if (advancedOptions && (i == useDayOfWeekPos) && useDayOfWeek)
@@ -901,17 +936,26 @@ void cRecMenuSearchTimerEdit::AddSubMenu(std::vector<cRecMenuItem*> *subMenu) {
cTVGuideSearchTimer cRecMenuSearchTimerEdit::GetSearchTimer(void) { cTVGuideSearchTimer cRecMenuSearchTimerEdit::GetSearchTimer(void) {
dsyslog ("%s %s %d\n", __FILE__, __func__, __LINE__);
searchTimer.SetSearchString(searchString); searchTimer.SetSearchString(searchString);
searchTimer.SetActive(timerActive); searchTimer.SetActive(timerActive);
searchTimer.SetSearchMode(mode); searchTimer.SetSearchMode(mode);
searchTimer.SetUseTitle(useTitle); searchTimer.SetUseTitle(useTitle);
searchTimer.SetUseSubtitle(useSubtitle); searchTimer.SetUseSubtitle(useSubtitle);
searchTimer.SetUseDesription(useDescription); searchTimer.SetUseDesription(useDescription);
searchTimer.SetUseChannel(useChannel); if (useChannel == 1) {
if (useChannel) {
searchTimer.SetStartChannel(startChannel); searchTimer.SetStartChannel(startChannel);
searchTimer.SetStopChannel(stopChannel); searchTimer.SetStopChannel(stopChannel);
} }
if (useChannel == 2) {
if (channelgroups.size() > 0) {
std::string & channelGroup = channelgroups[channelgroupIndex];
searchTimer.SetChannelGroup(channelGroup);
} else {
useChannel = 0;
}
}
searchTimer.SetUseChannel(useChannel);
searchTimer.SetUseTime(useTime); searchTimer.SetUseTime(useTime);
if (useTime) { if (useTime) {
searchTimer.SetStartTime(startTime); searchTimer.SetStartTime(startTime);

View File

@@ -209,8 +209,10 @@ class cRecMenuSearchTimerEdit: public cRecMenu {
private: private:
bool advancedOptions; bool advancedOptions;
cTVGuideSearchTimer searchTimer; cTVGuideSearchTimer searchTimer;
std::vector<std::string> channelGroups;
std::vector<cRecMenuItem*> mainMenuItems; std::vector<cRecMenuItem*> mainMenuItems;
std::vector<cRecMenuItem*> useChannelSubMenu; std::vector<cRecMenuItem*> useChannelSubMenu;
std::vector<cRecMenuItem*> useGroupSubMenu;
std::vector<cRecMenuItem*> useTimeSubMenu; std::vector<cRecMenuItem*> useTimeSubMenu;
std::vector<cRecMenuItem*> useDayOfWeekSubMenu; std::vector<cRecMenuItem*> useDayOfWeekSubMenu;
std::vector<cRecMenuItem*> avoidRepeatSubMenu; std::vector<cRecMenuItem*> avoidRepeatSubMenu;
@@ -226,9 +228,12 @@ private:
bool useTitle; bool useTitle;
bool useSubtitle; bool useSubtitle;
bool useDescription; bool useDescription;
bool useChannel; int useChannel;
int startChannel; int startChannel;
int stopChannel; int stopChannel;
std::string channelGroup;
std::vector<std::string> channelgroups;
int channelgroupIndex;
bool useTime; bool useTime;
int startTime; int startTime;
int stopTime; int stopTime;
@@ -249,8 +254,9 @@ private:
bool useInFavorites; bool useInFavorites;
void InitMenuItems(void); void InitMenuItems(void);
void AddSubMenu(std::vector<cRecMenuItem*> *subMenu); void AddSubMenu(std::vector<cRecMenuItem*> *subMenu);
int SplitChannelGroups(std::vector<std::string> *channelGroups, std::vector<std::string> *channelgroups);
public: public:
cRecMenuSearchTimerEdit(cTVGuideSearchTimer searchTimer, bool advancedOptions); cRecMenuSearchTimerEdit(cTVGuideSearchTimer searchTimer, bool advancedOptions, std::vector<std::string> channelGroups);
void CreateMenuItems(void); void CreateMenuItems(void);
virtual ~cRecMenuSearchTimerEdit(void); virtual ~cRecMenuSearchTimerEdit(void);
cTVGuideSearchTimer GetSearchTimer(void); cTVGuideSearchTimer GetSearchTimer(void);

View File

@@ -210,31 +210,31 @@ bool cTVGuideSearchTimer::Parse(bool readTemplate) {
return false; return false;
for (int value = 0; value < numValues; value++) { for (int value = 0; value < numValues; value++) {
switch (value) { switch (value) {
case 0: case 0:
if (!readTemplate) if (!readTemplate)
ID = atoi(values[value].c_str()); ID = atoi(values[value].c_str());
break; break;
case 1: case 1:
if (!readTemplate) { if (!readTemplate) {
std::string searchStringMasked = values[value]; std::string searchStringMasked = values[value];
std::replace(searchStringMasked.begin(), searchStringMasked.end(), '|', ':'); std::replace(searchStringMasked.begin(), searchStringMasked.end(), '|', ':');
searchString = searchStringMasked; searchString = searchStringMasked;
} }
break; break;
case 2: case 2:
useTime = atoi(values[value].c_str()); useTime = atoi(values[value].c_str());
break; break;
case 3: case 3:
if (useTime) { if (useTime) {
startTime = atoi(values[value].c_str()); startTime = atoi(values[value].c_str());
} }
break; break;
case 4: case 4:
if (useTime) { if (useTime) {
stopTime = atoi(values[value].c_str()); stopTime = atoi(values[value].c_str());
} }
break; break;
case 5: case 5:
useChannel = atoi(values[value].c_str()); useChannel = atoi(values[value].c_str());
break; break;
case 6: case 6:
@@ -242,39 +242,44 @@ bool cTVGuideSearchTimer::Parse(bool readTemplate) {
channelMin = NULL; channelMin = NULL;
channelMax = NULL; channelMax = NULL;
} else if (useChannel == 1) { } else if (useChannel == 1) {
char *channelMinbuffer = NULL; int minNum = 0, maxNum = 0;
char *channelMaxbuffer = NULL; int fields = sscanf(values[value].c_str(), "%d-%d", &minNum, &maxNum);
int channels = sscanf(values[value].c_str(), "%a[^|]|%a[^|]", &channelMinbuffer, &channelMaxbuffer); if (fields == 0) { // stored with ID
char *channelMinbuffer = NULL;
char *channelMaxbuffer = NULL;
int channels = sscanf(values[value].c_str(), "%m[^|]|%m[^|]", &channelMinbuffer, &channelMaxbuffer);
#if VDRVERSNUM >= 20301 #if VDRVERSNUM >= 20301
LOCK_CHANNELS_READ; LOCK_CHANNELS_READ;
channelMin = Channels->GetByChannelID(tChannelID::FromString(channelMinbuffer), true, true); channelMin = Channels->GetByChannelID(tChannelID::FromString(channelMinbuffer), true, true);
#else #else
channelMin = Channels.GetByChannelID(tChannelID::FromString(channelMinbuffer), true, true); channelMin = Channels.GetByChannelID(tChannelID::FromString(channelMinbuffer), true, true);
#endif #endif
if (!channelMin) { if (!channelMin) {
channelMin = channelMax = NULL; esyslog("ERROR: channel '%s' not defined", channelMinbuffer);
useChannel = 0;
}
if (channels == 1)
channelMax = channelMin;
else {
#if VDRVERSNUM >= 20301
channelMax = Channels->GetByChannelID(tChannelID::FromString(channelMaxbuffer), true, true);
#else
channelMax = Channels.GetByChannelID(tChannelID::FromString(channelMaxbuffer), true, true);
#endif
if (!channelMax) {
channelMin = channelMax = NULL; channelMin = channelMax = NULL;
useChannel = 0; useChannel = 0;
} }
if (channels == 1)
channelMax = channelMin;
else {
#if VDRVERSNUM >= 20301
channelMax = Channels->GetByChannelID(tChannelID::FromString(channelMaxbuffer), true, true);
#else
channelMax = Channels.GetByChannelID(tChannelID::FromString(channelMaxbuffer), true, true);
#endif
if (!channelMax) {
esyslog("ERROR: channel '%s' not defined", channelMaxbuffer);
channelMin = channelMax = NULL;
useChannel = 0;
}
}
free(channelMinbuffer);
free(channelMaxbuffer);
} }
free(channelMinbuffer); } else if (useChannel == 2)
free(channelMaxbuffer); channelGroup = values[value];
} else if (useChannel == 2) {
channelGroup = values[value];
}
break; break;
case 7: case 7:
useCase = atoi(values[value].c_str()); useCase = atoi(values[value].c_str());
break; break;
case 8: case 8:
@@ -572,7 +577,6 @@ void cTVGuideSearchTimer::GetSearchModes(std::vector<std::string> *searchModes)
searchModes->push_back(tr("regular expression")); searchModes->push_back(tr("regular expression"));
} }
void cTVGuideSearchTimer::Dump(void) { void cTVGuideSearchTimer::Dump(void) {
esyslog("tvguide searchtimer: strTimer: %s", strTimer.c_str()); esyslog("tvguide searchtimer: strTimer: %s", strTimer.c_str());
esyslog("tvguide searchtimer: ID: %d", ID); esyslog("tvguide searchtimer: ID: %d", ID);
@@ -612,3 +616,10 @@ void cTVGuideSearchTimer::SetStopChannel(int stopChannel)
channelMax = Channels.GetByNumber(stopChannel); channelMax = Channels.GetByNumber(stopChannel);
#endif #endif
}; };
void cTVGuideSearchTimer::GetUseChannelModes(std::vector<std::string> *useChannelModes) {
useChannelModes->push_back(tr("No"));
useChannelModes->push_back(tr("Interval"));
useChannelModes->push_back(tr("Channel Group"));
useChannelModes->push_back(tr("only FTA"));
}

View File

@@ -82,9 +82,10 @@ public:
bool UseSubtitle(void) { return useSubtitle; }; bool UseSubtitle(void) { return useSubtitle; };
bool UseDescription(void) { return useDescription; }; bool UseDescription(void) { return useDescription; };
int SearchMode(void) { return mode; }; int SearchMode(void) { return mode; };
bool UseChannel(void) { return useChannel; }; int UseChannel(void) { return useChannel; };
int StartChannel(void) { return (channelMin)?channelMin->Number():0; }; int StartChannel(void) { return (channelMin)?channelMin->Number():0; };
int StopChannel(void) { return (channelMax)?channelMax->Number():0; }; int StopChannel(void) { return (channelMax)?channelMax->Number():0; };
std::string ChannelGroup(void) { return channelGroup; };
bool UseTime(void) { return useTime; }; bool UseTime(void) { return useTime; };
int StartTime(void) { return startTime; }; int StartTime(void) { return startTime; };
int StopTime(void) { return stopTime; }; int StopTime(void) { return stopTime; };
@@ -110,9 +111,10 @@ public:
void SetUseTitle(bool useTitle) { this->useTitle = useTitle; }; void SetUseTitle(bool useTitle) { this->useTitle = useTitle; };
void SetUseSubtitle(bool useSubtitle) { this->useSubtitle = useSubtitle; }; void SetUseSubtitle(bool useSubtitle) { this->useSubtitle = useSubtitle; };
void SetUseDesription(bool useDescription) { this->useDescription = useDescription; }; void SetUseDesription(bool useDescription) { this->useDescription = useDescription; };
void SetUseChannel(bool useChannel) { this->useChannel = useChannel; }; void SetUseChannel(int useChannel) { this->useChannel = useChannel; };
void SetStartChannel(int startChannel); void SetStartChannel(int startChannel);
void SetStopChannel(int stopChannel); void SetStopChannel(int stopChannel);
void SetChannelGroup(std::string channelGroup) { this->channelGroup = channelGroup; };
void SetUseTime(bool useTime) { this->useTime = useTime; }; void SetUseTime(bool useTime) { this->useTime = useTime; };
void SetStartTime(int startTime) { this->startTime = startTime; }; void SetStartTime(int startTime) { this->startTime = startTime; };
void SetStopTime(int stopTime) { this->stopTime = stopTime; }; void SetStopTime(int stopTime) { this->stopTime = stopTime; };
@@ -135,6 +137,7 @@ public:
int GetNumTimers(void); int GetNumTimers(void);
int GetNumRecordings(void); int GetNumRecordings(void);
void GetSearchModes(std::vector<std::string> *searchModes); void GetSearchModes(std::vector<std::string> *searchModes);
void GetUseChannelModes(std::vector<std::string> *useChannelModes);
void Dump(void); void Dump(void);
}; };

View File

@@ -154,7 +154,11 @@ public:
struct Epgsearch_services_v1_0 { struct Epgsearch_services_v1_0 {
// in/out // in/out
#if __cplusplus < 201103L
std::auto_ptr<cServiceHandler> handler;
#else
std::unique_ptr<cServiceHandler> handler; std::unique_ptr<cServiceHandler> handler;
#endif
}; };
// Data structures for service "Epgsearch-services-v1.1" // Data structures for service "Epgsearch-services-v1.1"
@@ -169,7 +173,11 @@ public:
struct Epgsearch_services_v1_1 { struct Epgsearch_services_v1_1 {
// in/out // in/out
#if __cplusplus < 201103L
std::auto_ptr<cServiceHandler_v1_1> handler;
#else
std::unique_ptr<cServiceHandler_v1_1> handler; std::unique_ptr<cServiceHandler_v1_1> handler;
#endif
}; };
// Data structures for service "Epgsearch-services-v1.2" // Data structures for service "Epgsearch-services-v1.2"
@@ -184,7 +192,11 @@ public:
struct Epgsearch_services_v1_2 { struct Epgsearch_services_v1_2 {
// in/out // in/out
#if __cplusplus < 201103L
std::auto_ptr<cServiceHandler_v1_2> handler;
#else
std::unique_ptr<cServiceHandler_v1_2> handler; std::unique_ptr<cServiceHandler_v1_2> handler;
#endif
}; };
#endif #endif

114
setup.c
View File

@@ -77,6 +77,7 @@ void cTvguideSetup::Store(void) {
SetupStore("channelCols", tvguideConfig.channelCols); SetupStore("channelCols", tvguideConfig.channelCols);
SetupStore("channelRows", tvguideConfig.channelRows); SetupStore("channelRows", tvguideConfig.channelRows);
SetupStore("displayTime", tvguideConfig.displayTime); SetupStore("displayTime", tvguideConfig.displayTime);
SetupStore("displayHorizontalTime", tvguideConfig.displayHorizontalTime);
SetupStore("bigStepHours", tvguideConfig.bigStepHours); SetupStore("bigStepHours", tvguideConfig.bigStepHours);
SetupStore("hugeStepHours", tvguideConfig.hugeStepHours); SetupStore("hugeStepHours", tvguideConfig.hugeStepHours);
SetupStore("channelJumpMode", tvguideConfig.channelJumpMode); SetupStore("channelJumpMode", tvguideConfig.channelJumpMode);
@@ -155,7 +156,7 @@ void cTvguideSetup::Store(void) {
SetupStore("limitLogoCache", tvguideConfig.limitLogoCache); SetupStore("limitLogoCache", tvguideConfig.limitLogoCache);
} }
cMenuSetupSubMenu::cMenuSetupSubMenu(const char* Title, cTvguideConfig* data) : cOsdMenu(Title, 30) { cMenuSetupSubMenu::cMenuSetupSubMenu(const char* Title, cTvguideConfig* data) : cOsdMenu(Title, 40) {
tmpTvguideConfig = data; tmpTvguideConfig = data;
indent = " "; indent = " ";
} }
@@ -209,7 +210,11 @@ void cMenuSetupGeneral::Set(void) {
if (themes.NumThemes()) if (themes.NumThemes())
Add(new cMenuEditStraItem(cString::sprintf("%s%s", *indent, tr("Theme")), &tmpTvguideConfig->themeIndex, themes.NumThemes(), themes.Descriptions())); Add(new cMenuEditStraItem(cString::sprintf("%s%s", *indent, tr("Theme")), &tmpTvguideConfig->themeIndex, themes.NumThemes(), themes.Descriptions()));
} }
Add(new cMenuEditIntItem(tr("Time to display in minutes"), &tmpTvguideConfig->displayTime, 60, 320)); if (tmpTvguideConfig->displayMode == eVertical) {
Add(new cMenuEditIntItem(tr("Time to display in minutes"), &tmpTvguideConfig->displayTime, 60, 320));
} else if (tmpTvguideConfig->displayMode == eHorizontal) {
Add(new cMenuEditIntItem(tr("Time to display in minutes"), &tmpTvguideConfig->displayHorizontalTime, 60, 320));
}
Add(new cMenuEditBoolItem(tr("Rounded Corners"), &tmpTvguideConfig->roundedCorners)); Add(new cMenuEditBoolItem(tr("Rounded Corners"), &tmpTvguideConfig->roundedCorners));
Add(new cMenuEditStraItem(tr("Channel Jump Mode (Keys Green / Yellow)"), &tmpTvguideConfig->channelJumpMode, 2, jumpMode)); Add(new cMenuEditStraItem(tr("Channel Jump Mode (Keys Green / Yellow)"), &tmpTvguideConfig->channelJumpMode, 2, jumpMode));
@@ -231,11 +236,16 @@ void cMenuSetupGeneral::Set(void) {
} }
eOSState cMenuSetupGeneral::ProcessKey(eKeys Key) { eOSState cMenuSetupGeneral::ProcessKey(eKeys Key) {
bool olduseNopacityTheme = tmpTvguideConfig->useNopacityTheme;
bool olddisplayRerunsDetailEPGView = tmpTvguideConfig->displayRerunsDetailEPGView;
eOSState state = cOsdMenu::ProcessKey(Key); eOSState state = cOsdMenu::ProcessKey(Key);
if (Key == kOk) { if (Key == kOk) {
state = osBack; state = osBack;
} else if (Key != kNone) { } else if (Key != kNone) {
Set(); if (tmpTvguideConfig->useNopacityTheme != olduseNopacityTheme ||
tmpTvguideConfig->displayRerunsDetailEPGView != olddisplayRerunsDetailEPGView) {
Set();
}
} }
return state; return state;
} }
@@ -312,11 +322,22 @@ void cMenuSetupScreenLayout::Set(void) {
} }
eOSState cMenuSetupScreenLayout::ProcessKey(eKeys Key) { eOSState cMenuSetupScreenLayout::ProcessKey(eKeys Key) {
int olddisplayMode = tmpTvguideConfig->displayMode;
bool olddisplayStatusHeader = tmpTvguideConfig->displayStatusHeader;
bool olddisplayChannelGroups = tmpTvguideConfig->displayChannelGroups;
int oldhideChannelLogos = tmpTvguideConfig->hideChannelLogos;
int oldhideEpgImages = tmpTvguideConfig->hideEpgImages;
eOSState state = cOsdMenu::ProcessKey(Key); eOSState state = cOsdMenu::ProcessKey(Key);
if (Key == kOk) { if (Key == kOk) {
state = osBack; state = osBack;
} else if (Key != kNone) { } else if (Key != kNone) {
Set(); if (tmpTvguideConfig->displayMode != olddisplayMode ||
tmpTvguideConfig->displayStatusHeader != olddisplayStatusHeader ||
tmpTvguideConfig->displayChannelGroups != olddisplayChannelGroups ||
tmpTvguideConfig->hideChannelLogos != oldhideChannelLogos ||
tmpTvguideConfig->hideEpgImages != oldhideEpgImages) {
Set();
}
} }
return state; return state;
} }
@@ -397,33 +418,34 @@ void cMenuSetupFavorites::Set(void) {
if (pRemoteTimers) if (pRemoteTimers)
Add(new cMenuEditBoolItem(tr("Use Remotetimers"), &tmpTvguideConfig->useRemoteTimers)); Add(new cMenuEditBoolItem(tr("Use Remotetimers"), &tmpTvguideConfig->useRemoteTimers));
Add(new cMenuEditBoolItem(tr("Use \"What's on now\" in favorites"), &tmpTvguideConfig->favWhatsOnNow));
Add(new cMenuEditBoolItem(tr("Use \"What's on next\" in favorites"), &tmpTvguideConfig->favWhatsOnNext));
Add(new cMenuEditBoolItem(tr("Use user defined time 1 in favorites"), &tmpTvguideConfig->favUseTime1));
if (tmpTvguideConfig->favUseTime1) {
Add(new cMenuEditStrItem(cString::sprintf("%s%s", *indent, tr("Description")), description1, sizeof(description1), trVDR(FileNameChars)));
Add(new cMenuEditTimeItem(cString::sprintf("%s%s", *indent, tr("Time")), &tmpTvguideConfig->favTime1));
}
Add(new cMenuEditBoolItem(tr("Use user defined time 2 in favorites"), &tmpTvguideConfig->favUseTime2));
if (tmpTvguideConfig->favUseTime2) {
Add(new cMenuEditStrItem(cString::sprintf("%s%s", *indent, tr("Description")), description2, sizeof(description2), trVDR(FileNameChars)));
Add(new cMenuEditTimeItem(cString::sprintf("%s%s", *indent, tr("Time")), &tmpTvguideConfig->favTime2));
}
Add(new cMenuEditBoolItem(tr("Use user defined time 3 in favorites"), &tmpTvguideConfig->favUseTime3));
if (tmpTvguideConfig->favUseTime3) {
Add(new cMenuEditStrItem(cString::sprintf("%s%s", *indent, tr("Description")), description3, sizeof(description3), trVDR(FileNameChars)));
Add(new cMenuEditTimeItem(cString::sprintf("%s%s", *indent, tr("Time")), &tmpTvguideConfig->favTime3));
}
Add(new cMenuEditBoolItem(tr("Use user defined time 4 in favorites"), &tmpTvguideConfig->favUseTime4));
if (tmpTvguideConfig->favUseTime4) {
Add(new cMenuEditStrItem(cString::sprintf("%s%s", *indent, tr("Description")), description4, sizeof(description4), trVDR(FileNameChars)));
Add(new cMenuEditTimeItem(cString::sprintf("%s%s", *indent, tr("Time")), &tmpTvguideConfig->favTime4));
}
Add(new cMenuEditBoolItem(tr("Limit channels in favorites"), &tmpTvguideConfig->favLimitChannels)); Add(new cMenuEditBoolItem(tr("Limit channels in favorites"), &tmpTvguideConfig->favLimitChannels));
if (tmpTvguideConfig->favLimitChannels) { if (tmpTvguideConfig->favLimitChannels) {
Add(new cMenuEditChanItem(tr("Start Channel"), &tmpTvguideConfig->favStartChannel)); Add(new cMenuEditChanItem(tr("Start Channel"), &tmpTvguideConfig->favStartChannel));
Add(new cMenuEditChanItem(tr("Stop Channel"), &tmpTvguideConfig->favStopChannel)); Add(new cMenuEditChanItem(tr("Stop Channel"), &tmpTvguideConfig->favStopChannel));
} }
Add(new cMenuEditBoolItem(tr("Use \"What's on now\" in favorites"), &tmpTvguideConfig->favWhatsOnNow));
Add(new cMenuEditBoolItem(tr("Use \"What's on next\" in favorites"), &tmpTvguideConfig->favWhatsOnNext));
Add(new cOsdItem(tr("User defined times in favorites:"), osUnknown, false));
Add(new cMenuEditBoolItem(tr("Use user defined time 1"), &tmpTvguideConfig->favUseTime1));
if (tmpTvguideConfig->favUseTime1) {
Add(new cMenuEditStrItem(cString::sprintf("%s%s", *indent, tr("Description")), description1, sizeof(description1), trVDR(FileNameChars)));
Add(new cMenuEditTimeItem(cString::sprintf("%s%s", *indent, tr("Time")), &tmpTvguideConfig->favTime1));
}
Add(new cMenuEditBoolItem(tr("Use user defined time 2"), &tmpTvguideConfig->favUseTime2));
if (tmpTvguideConfig->favUseTime2) {
Add(new cMenuEditStrItem(cString::sprintf("%s%s", *indent, tr("Description")), description2, sizeof(description2), trVDR(FileNameChars)));
Add(new cMenuEditTimeItem(cString::sprintf("%s%s", *indent, tr("Time")), &tmpTvguideConfig->favTime2));
}
Add(new cMenuEditBoolItem(tr("Use user defined time 3"), &tmpTvguideConfig->favUseTime3));
if (tmpTvguideConfig->favUseTime3) {
Add(new cMenuEditStrItem(cString::sprintf("%s%s", *indent, tr("Description")), description3, sizeof(description3), trVDR(FileNameChars)));
Add(new cMenuEditTimeItem(cString::sprintf("%s%s", *indent, tr("Time")), &tmpTvguideConfig->favTime3));
}
Add(new cMenuEditBoolItem(tr("Use user defined time 4"), &tmpTvguideConfig->favUseTime4));
if (tmpTvguideConfig->favUseTime4) {
Add(new cMenuEditStrItem(cString::sprintf("%s%s", *indent, tr("Description")), description4, sizeof(description4), trVDR(FileNameChars)));
Add(new cMenuEditTimeItem(cString::sprintf("%s%s", *indent, tr("Time")), &tmpTvguideConfig->favTime4));
}
Add(new cOsdItem(tr("Switchtimer:"), osUnknown, false)); Add(new cOsdItem(tr("Switchtimer:"), osUnknown, false));
Add(new cMenuEditStraItem(tr("Switch Mode"), &tmpTvguideConfig->switchMode, 3, switchModeItems)); Add(new cMenuEditStraItem(tr("Switch Mode"), &tmpTvguideConfig->switchMode, 3, switchModeItems));
Add(new cMenuEditIntItem(tr("Switch (x)min before start of the show"), &tmpTvguideConfig->switchMinsBefore, 0, 10)); Add(new cMenuEditIntItem(tr("Switch (x)min before start of the show"), &tmpTvguideConfig->switchMinsBefore, 0, 10));
@@ -434,32 +456,42 @@ void cMenuSetupFavorites::Set(void) {
} }
eOSState cMenuSetupFavorites::ProcessKey(eKeys Key) { eOSState cMenuSetupFavorites::ProcessKey(eKeys Key) {
int tmpFavUseTime1 = tmpTvguideConfig->favUseTime1; int tmpFavUseTime1 = tmpTvguideConfig->favUseTime1;
int tmpFavUseTime2 = tmpTvguideConfig->favUseTime2; int tmpFavUseTime2 = tmpTvguideConfig->favUseTime2;
int tmpFavUseTime3 = tmpTvguideConfig->favUseTime3; int tmpFavUseTime3 = tmpTvguideConfig->favUseTime3;
int tmpFavUseTime4 = tmpTvguideConfig->favUseTime4; int tmpFavUseTime4 = tmpTvguideConfig->favUseTime4;
int tmpFavLimitChannels = tmpTvguideConfig->favLimitChannels; int tmpFavLimitChannels = tmpTvguideConfig->favLimitChannels;
int tmpFolderMode = tmpTvguideConfig->instRecFolderMode; int tmpFolderMode = tmpTvguideConfig->instRecFolderMode;
eOSState state = cOsdMenu::ProcessKey(Key); eOSState state = cOsdMenu::ProcessKey(Key);
if (Key == kOk) {
tmpTvguideConfig->descUser1 = description1; if ((tmpFavUseTime1 != tmpTvguideConfig->favUseTime1) ||
tmpTvguideConfig->descUser2 = description2; (tmpFavUseTime2 != tmpTvguideConfig->favUseTime2) ||
tmpTvguideConfig->descUser3 = description3; (tmpFavUseTime3 != tmpTvguideConfig->favUseTime3) ||
tmpTvguideConfig->descUser4 = description4; (tmpFavUseTime4 != tmpTvguideConfig->favUseTime4) ||
tmpTvguideConfig->instRecFixedFolder = fixedFolder; (tmpFavLimitChannels != tmpTvguideConfig->favLimitChannels) ||
} else if ((Key == kLeft)||(Key == kRight)) { (tmpFolderMode != tmpTvguideConfig->instRecFolderMode) ) {
if ((tmpFavUseTime1 != tmpTvguideConfig->favUseTime1) || Set();
(tmpFavUseTime2 != tmpTvguideConfig->favUseTime2) || Display();
(tmpFavUseTime3 != tmpTvguideConfig->favUseTime3) ||
(tmpFavUseTime4 != tmpTvguideConfig->favUseTime4) ||
(tmpFavLimitChannels != tmpTvguideConfig->favLimitChannels) ||
(tmpFolderMode != tmpTvguideConfig->instRecFolderMode) )
Set();
} }
if (state == osUnknown) {
switch (Key) {
case kOk: {
tmpTvguideConfig->descUser1 = cString::sprintf("%s", description1);
tmpTvguideConfig->descUser2 = cString::sprintf("%s", description2);
tmpTvguideConfig->descUser3 = cString::sprintf("%s", description3);
tmpTvguideConfig->descUser4 = cString::sprintf("%s", description4);
return osBack; }
default:
break;
}
}
return state; return state;
} }
//-----Image Caching------------------------------------------------------------------------------------------------------------- //-----Image Caching-------------------------------------------------------------------------------------------------------------
cMenuSetupImageCache::cMenuSetupImageCache(cTvguideConfig* data) : cMenuSetupSubMenu(tr("Image Loading and Caching"), data) { cMenuSetupImageCache::cMenuSetupImageCache(cTvguideConfig* data) : cMenuSetupSubMenu(tr("Image Loading and Caching"), data) {
Set(); Set();

View File

@@ -58,10 +58,7 @@ void cStatusHeader::ScaleVideo(void) {
void cStatusHeader::DrawInfoText(cGrid *grid) { void cStatusHeader::DrawInfoText(cGrid *grid) {
int border = 10; int border = 10;
int textWidth = 0; int textWidth = 0;
if (tvguideConfig.displayMode == eVertical) textWidth = width - 2 * border;
textWidth = width - 2 * border - geoManager.clockWidth - 2;
else
textWidth = width - 2 * border;
tColor colorTextBack = (tvguideConfig.style == eStyleFlat)?color:clrTransparent; tColor colorTextBack = (tvguideConfig.style == eStyleFlat)?color:clrTransparent;
pixmapText->Fill(clrTransparent); pixmapText->Fill(clrTransparent);
int x = border; int x = border;

View File

@@ -5,7 +5,7 @@ cTimeLine::cTimeLine(cMyTime *myTime) {
this->myTime = myTime; this->myTime = myTime;
if (tvguideConfig.displayMode == eVertical) { if (tvguideConfig.displayMode == eVertical) {
dateViewer = new cStyledPixmap(osdManager.requestPixmap(1, cRect(0, dateViewer = new cStyledPixmap(osdManager.requestPixmap(1, cRect(0,
geoManager.statusHeaderHeight, geoManager.statusHeaderHeight + geoManager.clockHeight,
geoManager.dateVieverWidth, geoManager.dateVieverWidth,
geoManager.dateVieverHeight))); geoManager.dateVieverHeight)));
timeline = osdManager.requestPixmap(2, cRect(0, timeline = osdManager.requestPixmap(2, cRect(0,
@@ -23,7 +23,7 @@ cTimeLine::cTimeLine(cMyTime *myTime) {
} else if (tvguideConfig.displayMode == eHorizontal) { } else if (tvguideConfig.displayMode == eHorizontal) {
dateViewer = new cStyledPixmap(osdManager.requestPixmap(1, cRect(geoManager.clockWidth, dateViewer = new cStyledPixmap(osdManager.requestPixmap(1, cRect(geoManager.clockWidth,
geoManager.statusHeaderHeight, geoManager.statusHeaderHeight,
geoManager.dateVieverWidth - geoManager.clockWidth, geoManager.dateVieverWidth,
geoManager.dateVieverHeight))); geoManager.dateVieverHeight)));
timeline = osdManager.requestPixmap(2, cRect(geoManager.channelHeaderWidth + geoManager.channelGroupsWidth, timeline = osdManager.requestPixmap(2, cRect(geoManager.channelHeaderWidth + geoManager.channelGroupsWidth,
geoManager.statusHeaderHeight, geoManager.statusHeaderHeight,
@@ -42,13 +42,8 @@ cTimeLine::cTimeLine(cMyTime *myTime) {
int clockY; int clockY;
int clockX; int clockX;
if (tvguideConfig.displayMode == eVertical) { if (tvguideConfig.displayMode == eVertical) {
clockY = 10; clockY = geoManager.statusHeaderHeight;
if (tvguideConfig.scaleVideo) { clockX = 0;
clockX = geoManager.osdWidth - geoManager.tvFrameWidth - geoManager.clockWidth - 4;
}
else {
clockX = geoManager.osdWidth - geoManager.clockWidth - 10;
}
} }
else { else {
clockY = geoManager.statusHeaderHeight; clockY = geoManager.statusHeaderHeight;
@@ -83,18 +78,20 @@ void cTimeLine::drawDateViewer() {
dateViewer->Fill(clrTransparent); dateViewer->Fill(clrTransparent);
} }
tColor colorFont = theme.Color(clrButtonYellow); tColor colorFont = theme.Color(clrButtonYellow);
tColor colorFontBack = (tvguideConfig.style == eStyleFlat)?theme.Color(clrHeader):clrTransparent; tColor colorFontBack = (tvguideConfig.style == eStyleFlat) ? theme.Color(clrHeader) : clrTransparent;
if (tvguideConfig.displayMode == eVertical) { if (tvguideConfig.displayMode == eVertical) {
int textHeight = fontManager.FontTimeLineWeekday->Height(); int textHeightWeekday = fontManager.FontTimeLineWeekday->Height();
int textHeightDate = fontManager.FontTimeLineDate->Height();
int weekdayWidth = fontManager.FontTimeLineWeekday->Width(*weekDay); int weekdayWidth = fontManager.FontTimeLineWeekday->Width(*weekDay);
int dateWidth = fontManager.FontTimeLineDate->Width(*date); int dateWidth = fontManager.FontTimeLineDate->Width(*date);
dateViewer->DrawText(cPoint((geoManager.timeLineWidth-weekdayWidth)/2, (geoManager.channelHeaderHeight + geoManager.channelGroupsHeight -2*textHeight)/2), *weekDay, colorFont, colorFontBack, fontManager.FontTimeLineWeekday); int y = ((geoManager.dateVieverHeight - textHeightWeekday - textHeightDate) / 2);
dateViewer->DrawText(cPoint((geoManager.timeLineWidth-dateWidth)/2, (geoManager.channelHeaderHeight + geoManager.channelGroupsHeight -2*textHeight)/2 + textHeight + 5), *date, colorFont, colorFontBack, fontManager.FontTimeLineDate); dateViewer->DrawText(cPoint((geoManager.timeLineWidth - weekdayWidth) / 2, y), *weekDay, colorFont, colorFontBack, fontManager.FontTimeLineWeekday);
dateViewer->DrawText(cPoint((geoManager.timeLineWidth - dateWidth) / 2, y + textHeightWeekday), *date, colorFont, colorFontBack, fontManager.FontTimeLineDate);
} else if (tvguideConfig.displayMode == eHorizontal) { } else if (tvguideConfig.displayMode == eHorizontal) {
cString strDate = cString::sprintf("%s %s", *weekDay, *date); cString strDate = cString::sprintf("%s %s", *weekDay, *date);
int x = ((dateViewer->Width() - fontManager.FontTimeLineDateHorizontal->Width(*strDate)) / 2); int x = ((dateViewer->Width() - fontManager.FontTimeLineDateHorizontal->Width(*strDate)) / 2);
int y = (dateViewer->Height() - fontManager.FontTimeLineDateHorizontal->Height())/2; int y = ((dateViewer->Height() - fontManager.FontTimeLineDateHorizontal->Height()) / 2);
dateViewer->DrawText(cPoint(x, y), *strDate, colorFont, colorFontBack, fontManager.FontTimeLineDateHorizontal); dateViewer->DrawText(cPoint(x, y), *strDate, colorFont, colorFontBack, fontManager.FontTimeLineDateHorizontal);
} }
} }

View File

@@ -26,8 +26,8 @@
#error "VDR-2.0.0 API version or greater is required!" #error "VDR-2.0.0 API version or greater is required!"
#endif #endif
static const char *VERSION = "1.2.5"; static const char *VERSION = "1.2.7";
static const char *DESCRIPTION = "A fancy 2d EPG Viewer"; static const char *DESCRIPTION = tr("A fancy 2d EPG Viewer");
static const char *MAINMENUENTRY = "Tvguide"; static const char *MAINMENUENTRY = "Tvguide";
class cPluginTvguide : public cPlugin { class cPluginTvguide : public cPlugin {
@@ -35,7 +35,7 @@ public:
cPluginTvguide(void); cPluginTvguide(void);
virtual ~cPluginTvguide(); virtual ~cPluginTvguide();
virtual const char *Version(void) { return VERSION; } virtual const char *Version(void) { return VERSION; }
virtual const char *Description(void) { return DESCRIPTION; } virtual const char *Description(void) { return tr(DESCRIPTION); }
virtual const char *CommandLineHelp(void); virtual const char *CommandLineHelp(void);
virtual bool ProcessArgs(int argc, char *argv[]); virtual bool ProcessArgs(int argc, char *argv[]);
virtual bool Initialize(void); virtual bool Initialize(void);

View File

@@ -139,11 +139,15 @@ void cTvGuideOsd::readChannels(const cChannel *channelStart) {
if (!channelStart) if (!channelStart)
return; return;
#if VDRVERSNUM >= 20301 #if VDRVERSNUM >= 20301
const cChannels *channels;
{
LOCK_CHANNELS_READ; LOCK_CHANNELS_READ;
for (const cChannel *channel = channelStart; channel; channel = Channels->Next(channel)) { channels = Channels;
}
#else #else
for (const cChannel *channel = channelStart; channel; channel = Channels.Next(channel)) { cChannels *channels = &Channels;
#endif #endif
for (const cChannel *channel = channelStart; channel; channel = channels->Next(channel)) {
if (!channel->GroupSep()) { if (!channel->GroupSep()) {
if (channelGroups->IsInLastGroup(channel)) { if (channelGroups->IsInLastGroup(channel)) {
break; break;
@@ -165,11 +169,7 @@ void cTvGuideOsd::readChannels(const cChannel *channelStart) {
int numCurrent = columns.Count(); int numCurrent = columns.Count();
int numBack = tvguideConfig.numGrids - numCurrent; int numBack = tvguideConfig.numGrids - numCurrent;
int newChannelNumber = columns.First()->getChannel()->Number() - numBack; int newChannelNumber = columns.First()->getChannel()->Number() - numBack;
#if VDRVERSNUM >= 20301 const cChannel *newStart = channels->GetByNumber(newChannelNumber);
const cChannel *newStart = Channels->GetByNumber(newChannelNumber);
#else
const cChannel *newStart = Channels.GetByNumber(newChannelNumber);
#endif
readChannels(newStart); readChannels(newStart);
} }
} }
@@ -238,13 +238,16 @@ void cTvGuideOsd::channelForward() {
bool colAdded = false; bool colAdded = false;
if (!colRight) { if (!colRight) {
const cChannel *channelRight = activeGrid->column->getChannel(); const cChannel *channelRight = activeGrid->column->getChannel();
const cChannels *channels;
#if VDRVERSNUM >= 20301 #if VDRVERSNUM >= 20301
{ {
LOCK_CHANNELS_READ; LOCK_CHANNELS_READ;
while (channelRight = Channels->Next(channelRight)) { channels = Channels;
}
#else #else
while (channelRight = Channels.Next(channelRight)) { channels = &Channels;
#endif #endif
while (channelRight = channels->Next(channelRight)) {
if (!channelRight->GroupSep()) { if (!channelRight->GroupSep()) {
if (channelGroups->IsInLastGroup(channelRight)) { if (channelGroups->IsInLastGroup(channelRight)) {
break; break;
@@ -258,9 +261,6 @@ void cTvGuideOsd::channelForward() {
} }
} }
} }
#if VDRVERSNUM >= 20301
} //LOCK_CHANNELS_READ
#endif
if (colRight) { if (colRight) {
colAdded = true; colAdded = true;
if (columns.Count() == tvguideConfig.numGrids) { if (columns.Count() == tvguideConfig.numGrids) {
@@ -297,13 +297,16 @@ void cTvGuideOsd::channelBack() {
bool colAdded = false; bool colAdded = false;
if (!colLeft) { if (!colLeft) {
const cChannel *channelLeft = activeGrid->column->getChannel(); const cChannel *channelLeft = activeGrid->column->getChannel();
const cChannels *channels;
#if VDRVERSNUM >= 20301 #if VDRVERSNUM >= 20301
{ {
LOCK_CHANNELS_READ; LOCK_CHANNELS_READ;
while (channelLeft = Channels->Prev(channelLeft)) { channels = Channels;
}
#else #else
while (channelLeft = Channels.Prev(channelLeft)) { channels = &Channels;
#endif #endif
while (channelLeft = channels->Prev(channelLeft)) {
if (!channelLeft->GroupSep()) { if (!channelLeft->GroupSep()) {
colLeft = new cChannelColumn(0, channelLeft, myTime); colLeft = new cChannelColumn(0, channelLeft, myTime);
if (colLeft->readGrids()) { if (colLeft->readGrids()) {
@@ -314,9 +317,6 @@ void cTvGuideOsd::channelBack() {
} }
} }
} }
#if VDRVERSNUM >= 20301
} //LOCK_CHANNELS_READ
#endif
if (colLeft) { if (colLeft) {
colAdded = true; colAdded = true;
if (columns.Count() == tvguideConfig.numGrids) { if (columns.Count() == tvguideConfig.numGrids) {

9
view.c
View File

@@ -16,7 +16,6 @@ cView::cView(void) {
pixmapBackground = NULL; pixmapBackground = NULL;
pixmapHeader = NULL; pixmapHeader = NULL;
pixmapHeaderLogo = NULL; pixmapHeaderLogo = NULL;
pixmapHeaderIcon = NULL;
pixmapContent = NULL; pixmapContent = NULL;
pixmapTabs = NULL; pixmapTabs = NULL;
pixmapScrollbar = NULL; pixmapScrollbar = NULL;
@@ -47,8 +46,6 @@ cView::~cView(void) {
delete pixmapHeader; delete pixmapHeader;
if (pixmapHeaderLogo) if (pixmapHeaderLogo)
osdManager.releasePixmap(pixmapHeaderLogo); osdManager.releasePixmap(pixmapHeaderLogo);
if (pixmapHeaderIcon)
osdManager.releasePixmap(pixmapHeaderIcon);
if (pixmapContent) if (pixmapContent)
osdManager.releasePixmap(pixmapContent); osdManager.releasePixmap(pixmapContent);
if (pixmapTabs) if (pixmapTabs)
@@ -157,10 +154,8 @@ void cView::DrawHeader(void) {
int height = fontManager.FontDetailHeader->Height() + 10; int height = fontManager.FontDetailHeader->Height() + 10;
int posX = headerWidth - widthIcon - 25; int posX = headerWidth - widthIcon - 25;
int posY = ySubtitle - 5; int posY = ySubtitle - 5;
if (!pixmapHeaderIcon) pixmapHeader->DrawRectangle( cRect(posX, posY, widthIcon, height), iconColor);
pixmapHeaderIcon = osdManager.requestPixmap(7, cRect(posX, posY, widthIcon, height)); pixmapHeader->DrawText(cPoint(posX + 5, posY + 5), *recIconText, theme.Color(clrFont), iconColor, fontManager.FontDetailHeader);
pixmapHeaderIcon->DrawRectangle(cRect(0, 0, widthIcon, height), iconColor);
pixmapHeaderIcon->DrawText(cPoint(5, 5), *recIconText, theme.Color(clrFont), iconColor, fontManager.FontDetailHeader);
} }
} }

1
view.h
View File

@@ -35,7 +35,6 @@ protected:
cPixmap *pixmapBackground; cPixmap *pixmapBackground;
cStyledPixmap *pixmapHeader; cStyledPixmap *pixmapHeader;
cPixmap *pixmapHeaderLogo; cPixmap *pixmapHeaderLogo;
cPixmap *pixmapHeaderIcon;
cPixmap *pixmapContent; cPixmap *pixmapContent;
cPixmap *pixmapScrollbar; cPixmap *pixmapScrollbar;
cPixmap *pixmapScrollbarBack; cPixmap *pixmapScrollbarBack;