26 Commits

Author SHA1 Message Date
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
kamel5
b70112ae50 Version 1.2.5 2019-04-05 13:23:09 +02:00
kamel5
9df447454c Add switchMode to setup menu 2019-04-05 13:20:17 +02:00
kamel5
8ae5d34bef Inactive timer in DrawHeader 2019-04-03 14:00:05 +02:00
kamel5
7d44c8f91f Correct Warnung: Variable »ti« gesetzt 2019-04-01 17:05:07 +02:00
kamel5
e399518900 Some changes for VDR < 2.3.0 2019-04-01 17:04:23 +02:00
kamel5
dfb2c2b031 Eliminate a seqfault in cRecManager::DeleteSearchTimer 2019-04-01 17:00:44 +02:00
kamel5
060089548a Fixed a "invalid lock sequence report" in "cRecManager::PerformSearchTimerSearch" 2019-04-01 17:00:16 +02:00
kamel5
56014ea736 Correct x position in EPG grid view 2019-03-28 18:21:32 +01:00
kamel5
f56219c93c Correct x position in cRecMenuItemEvent::Draw 2019-03-28 18:21:32 +01:00
kamel5
7ca598f64e Compile again with VDR < 2.3.0 2019-03-28 18:20:20 +01:00
35 changed files with 631 additions and 539 deletions

5
.gitignore vendored Normal file
View File

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

23
HISTORY
View File

@@ -158,3 +158,26 @@ Version 1.2.4
- Eliminate some warnings
- Center channel logos in favorite view
- Update "services/epgsearch.h"
Version 1.2.5
- Compile again with VDR < 2.3.0
- Correct some x positions in EPG grid
- Fixed a "invalid lock sequence report" in "cRecManager::PerformSearchTimerSearch"
- Eliminate a seqfault in "cRecManager::DeleteSearchTimer"
- Show Inactive timer in DrawHeader
- 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

View File

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

View File

@@ -10,6 +10,7 @@ cTvguideConfig::cTvguideConfig() {
channelCols = 5;
channelRows = 10;
displayTime = 160;
displayHorizontalTime = 160;
displayStatusHeader = 1;
displayChannelGroups = 1;
displayTimeBase = 1;
@@ -64,6 +65,7 @@ cTvguideConfig::cTvguideConfig() {
favLimitChannels = 0;
favStartChannel = 0;
favStopChannel = 0;
switchMode = 0;
switchMinsBefore = 2;
fontIndex = 0;
fontNameDefault = "VDRSymbols Sans:Book";
@@ -256,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, "channelRows") == 0) channelRows = 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, "logoExtension") == 0) logoExtension = atoi(Value);
else if (strcmp(Name, "logoWidthRatio") == 0) logoWidthRatio = atoi(Value);
@@ -300,6 +303,7 @@ bool cTvguideConfig::SetupParse(const char *Name, const char *Value) {
else if (strcmp(Name, "favLimitChannels") == 0) favLimitChannels = atoi(Value);
else if (strcmp(Name, "favStartChannel") == 0) favStartChannel = atoi(Value);
else if (strcmp(Name, "favStopChannel") == 0) favStopChannel = atoi(Value);
else if (strcmp(Name, "switchMode") == 0) switchMode = atoi(Value);
else if (strcmp(Name, "switchMinsBefore") == 0) switchMinsBefore = atoi(Value);
else if (strcmp(Name, "fontIndex") == 0) fontIndex = atoi(Value);
else if (strcmp(Name, "FontButtonDelta") == 0) FontButtonDelta = atoi(Value);

View File

@@ -58,6 +58,7 @@ class cTvguideConfig {
int channelRows;
int numGrids;
int displayTime;
int displayHorizontalTime;
int displayStatusHeader;
int displayChannelGroups;
int displayTimeBase;
@@ -118,6 +119,7 @@ class cTvguideConfig {
int favLimitChannels;
int favStartChannel;
int favStopChannel;
int switchMode;
int switchMinsBefore;
int fontIndex;
const char *fontNameDefault;

View File

@@ -62,22 +62,23 @@ void cEpgGrid::PositionPixmap() {
}
void cEpgGrid::SetTimer() {
hasTimer = false;
if (tvguideConfig.useRemoteTimers && pRemoteTimers) {
RemoteTimers_Event_v1_0 rt;
rt.event = event;
if (pRemoteTimers->Service("RemoteTimers::GetTimerByEvent-v1.0", &rt))
hasTimer = true;
else
hasTimer = false;
#if VDRVERSNUM >= 30400
} else if (event->HasTimer()) {
hasTimer = true;
#if VDRVERSNUM >= 20301
} else {
eTimerMatch TimerMatch = tmNone;
LOCK_TIMERS_READ;
const cTimers *timers = Timers;
if (timers->GetMatch(event, &TimerMatch) && (TimerMatch == tmFull))
hasTimer = true;
#else
} else if (column->HasTimer()) {
hasTimer = event->HasTimer();
#endif
} else {
hasTimer = false;
}
}
@@ -145,12 +146,16 @@ void cEpgGrid::drawText() {
drawIcon("Switch", theme.Color(clrButtonYellow));
if (hasTimer) {
const cTimer *timer = NULL;
#if VDRVERSNUM >= 20301
{
LOCK_TIMERS_READ;
timer = Timers->GetMatch(event);
}
#else
timer = Timers.GetMatch(event);
#endif
if (timer)
#ifdef USE_SWITCHONLY
#ifdef SWITCHONLYPATCH
if (timer->HasFlags(tfSwitchOnly))
drawIcon("Switch", theme.Color(clrButtonYellow));
else if (timer->HasFlags(tfActive))

View File

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

View File

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

View File

@@ -48,9 +48,9 @@ void cHeaderGrid::drawChannel(const cChannel *channel) {
void cHeaderGrid::drawChannelHorizontal(const cChannel *channel) {
int logoWidth = geoManager.logoWidth;
int logoX = tvguideConfig.displayChannelName?2:(Width()-logoWidth)/2;
int logoX = tvguideConfig.displayChannelName ? 5 : (Width() - logoWidth) / 2;
int textX = 5;
int textY = (Height() - fontManager.FontChannelHeaderHorizontal->Height())/2;
int textY = (Height() - fontManager.FontChannelHeaderHorizontal->Height()) / 2;
bool logoFound = false;
if (!tvguideConfig.hideChannelLogos) {
cImage *logo = imgCache.GetLogo(channel);
@@ -64,10 +64,11 @@ void cHeaderGrid::drawChannelHorizontal(const cChannel *channel) {
int textWidthMax = Width() - 10;
if (!logoFound) {
drawText = true;
} else if (tvguideConfig.displayChannelName) {
}
if (tvguideConfig.displayChannelName) {
drawText = true;
textX += logoWidth;
textWidthMax -= logoWidth;
textX += logoWidth + 5;
textWidthMax -= textX;
}
if (drawText) {
tColor colorTextBack = (tvguideConfig.style == eStyleFlat)?color:clrTransparent;
@@ -87,13 +88,12 @@ void cHeaderGrid::drawChannelVertical(const cChannel *channel) {
tw.Set(*headerText, fontManager.FontChannelHeader, geoManager.colWidth - 8);
int lines = tw.Lines();
int lineHeight = fontManager.FontChannelHeader->Height();
int yStart = (geoManager.channelHeaderHeight - lines*lineHeight)/2 + 8;
int yStart = (geoManager.channelHeaderHeight - lines * lineHeight) / 2 + 8;
bool logoFound = false;
if (!tvguideConfig.hideChannelLogos) {
cImage *logo = imgCache.GetLogo(channel);
if (logo) {
const int logoheight = logo->Height();
pixmapLogo->DrawImage(cPoint((Width() - logoWidth) / 2, (geoManager.channelHeaderHeight - lineHeight - logoheight) / 2), *logo);
pixmapLogo->DrawImage(cPoint((Width() - logoWidth) / 2, 6), *logo);
logoFound = true;
}
}
@@ -107,12 +107,12 @@ void cHeaderGrid::drawChannelVertical(const cChannel *channel) {
if (!drawText)
return;
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 xText = (geoManager.colWidth - textWidth) / 2;
if (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 ""
"Project-Id-Version: vdr-tvguide 0.0.1\n"
"Report-Msgid-Bugs-To: <see README>\n"
"POT-Creation-Date: 2014-05-10 17:24+0200\n"
"POT-Creation-Date: 2019-04-12 14:35+0200\n"
"PO-Revision-Date: 2013-09-21 17:49+0200\n"
"Last-Translator: My friend <Sampep> Thanks David <Gabychan> <gbonich@gmail.com>\n"
"Language-Team: \n"
@@ -366,6 +366,9 @@ msgstr "Inicia canal"
msgid "Stop Channel"
msgstr "Atura canal"
msgid "Channel Group"
msgstr ""
msgid "Start after"
msgstr "Comença després"
@@ -525,6 +528,12 @@ msgstr "coincidència exacta"
msgid "regular expression"
msgstr "expressió regular"
msgid "Interval"
msgstr ""
msgid "only FTA"
msgstr ""
msgid "General Settings"
msgstr "Preferències"
@@ -783,13 +792,19 @@ msgstr ""
msgid "Use Remotetimers"
msgstr "Utilitza temporitzadors remots"
msgid "Limit channels in favorites"
msgstr ""
msgid "Use \"What's on now\" in favorites"
msgstr ""
msgid "Use \"What's on next\" in favorites"
msgstr ""
msgid "Use user defined time 1 in favorites"
msgid "User defined times in favorites:"
msgstr ""
msgid "Use user defined time 1"
msgstr ""
msgid "Description"
@@ -798,16 +813,19 @@ msgstr ""
msgid "Time"
msgstr ""
msgid "Use user defined time 2 in favorites"
msgid "Use user defined time 2"
msgstr ""
msgid "Use user defined time 3 in favorites"
msgid "Use user defined time 3"
msgstr ""
msgid "Use user defined time 4 in favorites"
msgid "Use user defined time 4"
msgstr ""
msgid "Limit channels in favorites"
msgid "Switchtimer:"
msgstr ""
msgid "Switch (x)min before start of the show"
msgstr ""
msgid "Create Log Messages for image loading"
@@ -840,6 +858,9 @@ msgstr ""
msgid "Recording Menus Icon Cache"
msgstr ""
msgid "A fancy 2d EPG Viewer"
msgstr ""
msgid "No Cast available"
msgstr ""

View File

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

View File

@@ -3,7 +3,7 @@ msgid ""
msgstr ""
"Project-Id-Version: vdr-tvguide 0.0.1\n"
"Report-Msgid-Bugs-To: <see README>\n"
"POT-Creation-Date: 2014-05-10 17:24+0200\n"
"POT-Creation-Date: 2019-04-12 14:35+0200\n"
"PO-Revision-Date: 2012-08-25 17:49+0200\n"
"Last-Translator: fiveten_59\n"
"Language-Team: \n"
@@ -363,6 +363,9 @@ msgstr "Avvia il Canale"
msgid "Stop Channel"
msgstr "Ferma il Canale"
msgid "Channel Group"
msgstr ""
msgid "Start after"
msgstr "Avvia dopo"
@@ -522,6 +525,12 @@ msgstr "exakt"
msgid "regular expression"
msgstr "Regulärer Ausdruck"
msgid "Interval"
msgstr ""
msgid "only FTA"
msgstr ""
msgid "General Settings"
msgstr "Allgemeine Einstellungen"
@@ -780,14 +789,20 @@ msgstr "Cartella per la registrazione immediata"
msgid "Use Remotetimers"
msgstr "Usa Remotetimers"
msgid "Limit channels in favorites"
msgstr "Limite dei canali nei favoriti"
msgid "Use \"What's on now\" in favorites"
msgstr "Usa \"In programma ora\" nei favoriti"
msgid "Use \"What's on next\" in favorites"
msgstr "Usa \"Programma prossimo\" nei favoriti"
msgid "Use user defined time 1 in favorites"
msgstr "Usa il tempo definito per l'user 1 in favoriti"
msgid "User defined times in favorites:"
msgstr ""
msgid "Use user defined time 1"
msgstr "Usa il tempo definito per l'user 1"
msgid "Description"
msgstr "Descrizione"
@@ -795,17 +810,20 @@ msgstr "Descrizione"
msgid "Time"
msgstr "Tempo"
msgid "Use user defined time 2 in favorites"
msgstr "Usa il tempo definito per l'user 2 in favoriti"
msgid "Use user defined time 2"
msgstr "Usa il tempo definito per l'user 2"
msgid "Use user defined time 3 in favorites"
msgstr "Usa il tempo definito per l'user 3 in favoriti"
msgid "Use user defined time 3"
msgstr "Usa il tempo definito per l'user 3"
msgid "Use user defined time 4 in favorites"
msgstr "Usa il tempo definito per l'user 4 in favoriti"
msgid "Use user defined time 4"
msgstr "Usa il tempo definito per l'user 4"
msgid "Limit channels in favorites"
msgstr "Limite dei canali nei favoriti"
msgid "Switchtimer:"
msgstr ""
msgid "Switch (x)min before start of the show"
msgstr ""
msgid "Create Log Messages for image loading"
msgstr "Log Nachrichten für das Laden der Bilder erzeugen"
@@ -837,6 +855,9 @@ msgstr "Cache dei Gruppi Canale"
msgid "Recording Menus Icon Cache"
msgstr "Recording Menüs Icon Cache"
msgid "A fancy 2d EPG Viewer"
msgstr ""
msgid "No Cast available"
msgstr "Nessun cast disponibile"
@@ -938,4 +959,3 @@ msgstr "TheMovieDB Popularità"
msgid "TheMovieDB Vote Average"
msgstr "Voto medio di TheMovieDB"

View File

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

View File

@@ -3,7 +3,7 @@ msgid ""
msgstr ""
"Project-Id-Version: vdr-tvguide 1.1.0\n"
"Report-Msgid-Bugs-To: <see README>\n"
"POT-Creation-Date: 2014-05-10 17:24+0200\n"
"POT-Creation-Date: 2019-04-12 14:35+0200\n"
"PO-Revision-Date: 2013-09-15 00:12+0100\n"
"Last-Translator: Milan Hrala <hrala.milan@gmail.com>\n"
"Language-Team: \n"
@@ -363,6 +363,9 @@ msgstr "Od kan
msgid "Stop Channel"
msgstr "Po kan<61>l"
msgid "Channel Group"
msgstr ""
msgid "Start after"
msgstr "Za<5A>iatok po"
@@ -522,6 +525,12 @@ msgstr "presn
msgid "regular expression"
msgstr "regul<75>rny v<>raz"
msgid "Interval"
msgstr ""
msgid "only FTA"
msgstr ""
msgid "General Settings"
msgstr "V<>eobecn<63> nastavenia"
@@ -780,13 +789,19 @@ msgstr ""
msgid "Use Remotetimers"
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"
msgstr ""
msgid "Use \"What's on next\" in favorites"
msgstr ""
msgid "Use user defined time 1 in favorites"
msgid "User defined times in favorites:"
msgstr ""
msgid "Use user defined time 1"
msgstr ""
msgid "Description"
@@ -795,16 +810,19 @@ msgstr ""
msgid "Time"
msgstr ""
msgid "Use user defined time 2 in favorites"
msgid "Use user defined time 2"
msgstr ""
msgid "Use user defined time 3 in favorites"
msgid "Use user defined time 3"
msgstr ""
msgid "Use user defined time 4 in favorites"
msgid "Use user defined time 4"
msgstr ""
msgid "Limit channels in favorites"
msgid "Switchtimer:"
msgstr ""
msgid "Switch (x)min before start of the show"
msgstr ""
msgid "Create Log Messages for image loading"
@@ -837,6 +855,9 @@ msgstr ""
msgid "Recording Menus Icon Cache"
msgstr ""
msgid "A fancy 2d EPG Viewer"
msgstr ""
msgid "No Cast available"
msgstr ""

View File

@@ -50,32 +50,35 @@ bool cRecManager::CheckEventForTimer(const cEvent *event) {
pRemoteTimers->Service("RemoteTimers::GetMatch-v1.0", &rtMatch);
if (rtMatch.timerMatch == tmFull)
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();
#endif
}
return hasTimer;
}
#if VDRVERSNUM >= 20301
const cTimer *cRecManager::GetTimerForEvent(const cEvent *event) {
const cTimer *timer = NULL;
#else
cTimer *cRecManager::GetTimerForEvent(const cEvent *event) {
cTimer *timer = NULL;
#endif
if (tvguideConfig.useRemoteTimers && pRemoteTimers) {
RemoteTimers_GetMatch_v1_0 rtMatch;
rtMatch.event = event;
pRemoteTimers->Service("RemoteTimers::GetMatch-v1.0", &rtMatch);
timer = rtMatch.timer;
#if VDRVERSNUM >= 20301
return timer;
}
#if VDRVERSNUM >= 20301
LOCK_TIMERS_READ;
timer = Timers->GetMatch(event);
#else
} else
timer = Timers.GetMatch(event);
timer = Timers.GetMatch(event);
#endif
return timer;
}
@@ -180,7 +183,6 @@ void cRecManager::SetTimerPath(cTimer *timer, const cEvent *event, std::string p
}
void cRecManager::DeleteTimer(int timerID) {
dsyslog ("%s %s %d\n", __FILE__, __func__, __LINE__);
#if VDRVERSNUM >= 20301
cTimer *t;
{
@@ -196,7 +198,6 @@ void cRecManager::DeleteTimer(int timerID) {
}
void cRecManager::DeleteTimer(const cEvent *event) {
dsyslog ("%s %s %d\n", __FILE__, __func__, __LINE__);
if (!event)
return;
if (tvguideConfig.useRemoteTimers && pRemoteTimers) {
@@ -207,42 +208,41 @@ void cRecManager::DeleteTimer(const cEvent *event) {
}
void cRecManager::DeleteLocalTimer(const cEvent *event) {
dsyslog ("%s %s %d\n", __FILE__, __func__, __LINE__);
const cTimer *t;
#if VDRVERSNUM >= 20301
cTimer *t;
{
LOCK_TIMERS_WRITE;
LOCK_TIMERS_READ;
t = Timers->GetMatch(event);
}
#else
cTimer *t = Timers.GetMatch(event);
t = Timers.GetMatch(event);
#endif
if (!t)
return;
DeleteTimer(t);
}
void cRecManager::DeleteTimer(cTimer *timer) {
dsyslog ("%s %s %d\n", __FILE__, __func__, __LINE__);
void cRecManager::DeleteTimer(const cTimer *timer) {
#if VDRVERSNUM >= 20301
LOCK_TIMERS_WRITE;
cTimers* timers = Timers;
cTimer* t = timers->GetTimer(timer);
#else
cTimers* timers = &Timers;
cTimer* t = timers->GetTimer((cTimer*)timer);
#endif
if (timer->Recording()) {
timer->Skip();
if (t->Recording()) {
t->Skip();
#if VDRVERSNUM >= 20301
cRecordControls::Process(Timers, time(NULL));
cRecordControls::Process(timers, time(NULL));
#else
cRecordControls::Process(time(NULL));
#endif
}
isyslog("timer %s deleted", *timer->ToDescr());
#if VDRVERSNUM >= 20301
Timers->Del(timer, true);
Timers->SetModified();
#else
Timers.Del(timer, true);
Timers.SetModified();
#endif
}
isyslog("timer %s deleted", *t->ToDescr());
timers->Del(t, true);
timers->SetModified();
}
void cRecManager::DeleteRemoteTimer(const cEvent *event) {
@@ -259,19 +259,17 @@ void cRecManager::DeleteRemoteTimer(const cEvent *event) {
}
}
#if VDRVERSNUM >= 20301
void cRecManager::SaveTimer(const cTimer *t, cTimer newTimerSettings) {
if (!t)
#else
void cRecManager::SaveTimer(cTimer *timer, cTimer newTimerSettings) {
if (!timer)
#endif
return;
#if VDRVERSNUM >= 20301
LOCK_TIMERS_WRITE;
cTimer *timer = Timers->GetTimer(t);
#else
cTimer *timer = Timers.GetTimer((cTimer*)t);
#endif
bool active = newTimerSettings.HasFlags(tfActive);
int prio = newTimerSettings.Priority();
int lifetime = newTimerSettings.Lifetime();
@@ -409,12 +407,14 @@ const cEvent **cRecManager::PerformSearchTimerSearch(std::string epgSearchString
numResults = results.size();
if (numResults > 0) {
searchResults = new const cEvent *[numResults];
const cSchedules *schedules;
#if VDRVERSNUM >= 20301
{
LOCK_SCHEDULES_READ;
const cSchedules* schedules = Schedules;
schedules = Schedules;
}
#else
cSchedulesLock schedulesLock;
const cSchedules *schedules;
schedules = cSchedules::Schedules(schedulesLock);
#endif
const cEvent *event = NULL;
@@ -426,11 +426,14 @@ const cEvent **cRecManager::PerformSearchTimerSearch(std::string epgSearchString
int eventID = atoi(flds[1].c_str());
std::string channelID = flds[7];
tChannelID chanID = tChannelID::FromString(channelID.c_str());
const cChannel *channel;
#if VDRVERSNUM >= 20301
{
LOCK_CHANNELS_READ;
const cChannel *channel = Channels->GetByChannelID(chanID);
channel = Channels->GetByChannelID(chanID);
}
#else
cChannel *channel = Channels.GetByChannelID(chanID);
channel = Channels.GetByChannelID(chanID);
#endif
if (channel) {
const cSchedule *Schedule = NULL;
@@ -492,6 +495,22 @@ void cRecManager::GetSearchTimers(std::vector<cTVGuideSearchTimer> *searchTimer)
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 timerID = -1;
if (!epgSearchAvailable)
@@ -538,45 +557,33 @@ void cRecManager::DeleteSearchTimer(cTVGuideSearchTimer *searchTimer, bool delTi
return;
int searchTimerID = searchTimer->GetID();
if (delTimers) {
cTimers* timers;
#if VDRVERSNUM >= 20301
{
LOCK_TIMERS_WRITE;
cTimer *timer = Timers->First();
timers = Timers;
}
#else
cTimer *timer = Timers.First();
timers = &Timers;
#endif
cTimer *timer = timers->First();
while(timer) {
if (!timer->Recording()) {
char* searchID = GetAuxValue(timer, "s-id");
if (searchID) {
if (searchTimerID == atoi(searchID)) {
#if VDRVERSNUM >= 20301
cTimer* timerNext = Timers->Next(timer);
#else
cTimer* timerNext = Timers.Next(timer);
#endif
cTimer* timerNext = timers->Next(timer);
DeleteTimer(timer);
timer = timerNext;
} else {
#if VDRVERSNUM >= 20301
timer = Timers->Next(timer);
#else
timer = Timers.Next(timer);
#endif
timer = timers->Next(timer);
}
free(searchID);
} else {
#if VDRVERSNUM >= 20301
timer = Timers->Next(timer);
#else
timer = Timers.Next(timer);
#endif
timer = timers->Next(timer);
}
} else {
#if VDRVERSNUM >= 20301
timer = Timers->Next(timer);
#else
timer = Timers.Next(timer);
#endif
timer = timers->Next(timer);
}
}
}
@@ -599,14 +606,14 @@ void cRecManager::UpdateSearchTimers(void) {
}
}
// announceOnly: 0 = switch, 1 = announce only, 2 = ask for switch
// switchMode: 0 = switch, 1 = announce only, 2 = ask for switch
bool cRecManager::CreateSwitchTimer(const cEvent *event, cSwitchTimer switchTimer) {
if (epgSearchAvailable && event) {
Epgsearch_switchtimer_v1_0 data;
data.event = event;
data.mode = 1;
data.switchMinsBefore = switchTimer.switchMinsBefore;
data.announceOnly = switchTimer.announceOnly;
data.announceOnly = switchTimer.switchMode;
data.success = false;
epgSearchPlugin->Service("Epgsearch-switchtimer-v1.0", &data);
cSwitchTimer *t = new cSwitchTimer(event);
@@ -629,24 +636,20 @@ void cRecManager::DeleteSwitchTimer(const cEvent *event) {
}
}
#if VDRVERSNUM >= 20301
const cRecording **cRecManager::SearchForRecordings(std::string searchString, int &numResults) {
const cRecording **matchingRecordings = NULL;
#else
cRecording **cRecManager::SearchForRecordings(std::string searchString, int &numResults) {
cRecording **matchingRecordings = NULL;
#endif
int num = 0;
numResults = 0;
#if VDRVERSNUM >= 20301
LOCK_RECORDINGS_READ;
for (const cRecording *recording = Recordings->First(); recording; recording = Recordings->Next(recording)) {
const cRecordings* recordings = Recordings;
#else
for (cRecording *recording = Recordings.First(); recording; recording = Recordings.Next(recording)) {
const cRecordings* recordings = &Recordings;
#endif
for (const cRecording *recording = recordings->First(); recording; recording = recordings->Next(recording)) {
std::string s1 = recording->Name();
std::string s2 = searchString;
if (s1.empty() || s2.empty()) continue;
@@ -677,11 +680,7 @@ cRecording **cRecManager::SearchForRecordings(std::string searchString, int &num
}
if (match) {
#if VDRVERSNUM >= 20301
matchingRecordings = (const cRecording **)realloc(matchingRecordings, (num + 1) * sizeof(cRecording *));
#else
matchingRecordings = (cRecording **)realloc(matchingRecordings, (num + 1) * sizeof(cRecording *));
#endif
matchingRecordings[num++] = recording;
}
}

View File

@@ -28,25 +28,17 @@ public:
bool EpgSearchAvailable(void) {return epgSearchAvailable;};
bool RefreshRemoteTimers(void);
bool CheckEventForTimer(const cEvent *event);
#if VDRVERSNUM >= 20301
const cTimer *GetTimerForEvent(const cEvent *event);
#else
cTimer *GetTimerForEvent(const cEvent *event);
#endif
cTimer *createTimer(const cEvent *event, std::string path = "");
cTimer *createLocalTimer(const cEvent *event, std::string path);
cTimer *createRemoteTimer(const cEvent *event, std::string path);
void SetTimerPath(cTimer *timer, const cEvent *event, std::string path);
void DeleteTimer(cTimer *timer);
void DeleteTimer(const cTimer *timer);
void DeleteTimer(int timerID);
void DeleteTimer(const cEvent *event);
void DeleteLocalTimer(const cEvent *event);
void DeleteRemoteTimer(const cEvent *event);
#if VDRVERSNUM >= 20301
void SaveTimer(const cTimer *timer, cTimer newTimerSettings);
#else
void SaveTimer(cTimer *timer, cTimer newTimerSettings);
#endif
bool IsRecorded(const cEvent *event);
cTVGuideTimerConflicts *CheckTimerConflict(void);
void CreateSeriesTimer(cTimer *seriesTimer);
@@ -54,17 +46,14 @@ public:
const cEvent **PerformSearch(Epgsearch_searchresults_v1_0 data, int &numResults);
void ReadEPGSearchTemplates(std::vector<TVGuideEPGSearchTemplate> *epgTemplates);
void GetSearchTimers(std::vector<cTVGuideSearchTimer> *timers);
void GetChannelGroups(std::vector<std::string> *channelGroups);
int CreateSearchTimer(std::string epgSearchString);
bool SaveSearchTimer(cTVGuideSearchTimer *searchTimer);
void DeleteSearchTimer(cTVGuideSearchTimer *searchTimer, bool delTimers);
void UpdateSearchTimers(void);
bool CreateSwitchTimer(const cEvent *event, cSwitchTimer switchTimer);
void DeleteSwitchTimer(const cEvent *event);
#if VDRVERSNUM >= 20301
const cRecording **SearchForRecordings(std::string searchString, int &numResults);
#else
cRecording **SearchForRecordings(std::string searchString, int &numResults);
#endif
const cEvent **LoadReruns(const cEvent *event, int &numResults);
void GetFavorites(std::vector<cTVGuideSearchTimer> *favorites);
const cEvent **WhatsOnNow(bool nowOrNext, int &numResults);

View File

@@ -493,7 +493,8 @@ cRecMenuItemSelect::cRecMenuItemSelect(cString text,
int initialVal,
bool active,
int *callback,
eRecMenuState action) {
eRecMenuState action,
bool refresh) {
selectable = true;
this->text = text;
strings = Strings;
@@ -504,6 +505,7 @@ cRecMenuItemSelect::cRecMenuItemSelect(cString text,
this->currentVal = initialVal;
this->active = active;
this->callback = callback;
this->refresh = refresh;
this->action = action;
height = 3 * font->Height() / 2;
pixmapVal = NULL;
@@ -571,14 +573,20 @@ eRecMenuState cRecMenuItemSelect::ProcessKey(eKeys Key) {
if (callback)
*callback = currentVal;
DrawValue();
return rmsConsumed;
if (refresh)
return rmsRefresh;
else
return rmsConsumed;
break;
case kRight:
currentVal = (currentVal+1)%numValues;
if (callback)
*callback = currentVal;
DrawValue();
return rmsConsumed;
if (refresh)
return rmsRefresh;
else
return rmsConsumed;
break;
case kOk:
return action;
@@ -1832,8 +1840,9 @@ void cRecMenuItemEvent::Draw(void) {
if (imgLoader.LoadLogo(channel, logoWidth, height)) {
cImage logo = imgLoader.GetImage();
pixmapText->DrawImage(cPoint(logoX, (height - logo.Height()) / 2), logo);
logoX += logoWidth + 5;
// logoX += logoWidth + 5;
}
logoX += logoWidth + 5;
}
int textX = logoX;
@@ -1918,11 +1927,7 @@ eRecMenuState cRecMenuItemEvent::ProcessKey(eKeys Key) {
// --- cRecMenuItemChannelChooser -------------------------------------------------------
cRecMenuItemChannelChooser::cRecMenuItemChannelChooser(cString text,
#if VDRVERSNUM >= 20301
const cChannel *initialChannel,
#else
cChannel *initialChannel,
#endif
bool active,
int *callback,
eRecMenuState action) {
@@ -1983,9 +1988,9 @@ void cRecMenuItemChannelChooser::DrawValue(void) {
int logoWidth = height * tvguideConfig.logoWidthRatio / tvguideConfig.logoHeightRatio;
int logoX = textX - logoWidth - 10;
cImageLoader imgLoader;
if (imgLoader.LoadLogo(channel, logoWidth, height)) {
if (imgLoader.LoadLogo(channel, logoWidth, height - 10)) {
cImage logo = imgLoader.GetImage();
pixmapChannel->DrawImage(cPoint(logoX, 0), logo);
pixmapChannel->DrawImage(cPoint(logoX, 5), logo);
}
} else {
cString textVal = tr("all Channels");
@@ -2007,29 +2012,21 @@ eRecMenuState cRecMenuItemChannelChooser::ProcessKey(eKeys Key) {
fresh = true;
if (!channel)
return rmsConsumed;
#if VDRVERSNUM >= 20301
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
firstChannel = Channels->Next(firstChannel);
LOCK_CHANNELS_READ;
const cChannels* channels = Channels;
#else
firstChannel = Channels.Next(firstChannel);
const cChannels* channels = &Channels;
#endif
const cChannel *firstChannel = channels->First();
if(firstChannel->GroupSep())
firstChannel = channels->Next(firstChannel);
if (prev == firstChannel) {
if (!initialChannelSet)
channel = NULL;
} else {
#if VDRVERSNUM >= 20301
while (prev = Channels->Prev(prev)) {
#else
while (prev = Channels.Prev(prev)) {
#endif
while (prev = channels->Prev(prev)) {
if(!prev->GroupSep()) {
channel = prev;
break;
@@ -2046,30 +2043,20 @@ eRecMenuState cRecMenuItemChannelChooser::ProcessKey(eKeys Key) {
return rmsConsumed;
break; }
case kRight: {
fresh = true;
#if VDRVERSNUM >= 20301
LOCK_CHANNELS_READ;
const cChannels* channels = Channels;
#else
const cChannels* channels = &Channels;
#endif
fresh = true;
if (!channel) {
#if VDRVERSNUM >= 20301
channel = Channels->First();
#else
channel = Channels.First();
#endif
channel = channels->First();
if(channel->GroupSep())
#if VDRVERSNUM >= 20301
channel = Channels->Next(channel);
#else
channel = Channels.Next(channel);
#endif
channel = channels->Next(channel);
} else {
#if VDRVERSNUM >= 20301
const cChannel *next = channel;
while (next = Channels->Next(next)) {
#else
cChannel *next = channel;
while (next = Channels.Next(next)) {
#endif
while (next = channels->Next(next)) {
if(!next->GroupSep()) {
channel = next;
break;
@@ -2095,7 +2082,7 @@ eRecMenuState cRecMenuItemChannelChooser::ProcessKey(eKeys Key) {
LOCK_CHANNELS_READ;
const cChannel *chanNew = Channels->GetByNumber(channelNumber);
#else
cChannel *chanNew = Channels.GetByNumber(channelNumber);
const cChannel *chanNew = Channels.GetByNumber(channelNumber);
#endif
if (chanNew) {
channel = chanNew;
@@ -2258,11 +2245,7 @@ eRecMenuState cRecMenuItemDayChooser::ProcessKey(eKeys Key) {
}
// --- cRecMenuItemRecording -------------------------------------------------------
#if VDRVERSNUM >= 20301
cRecMenuItemRecording::cRecMenuItemRecording(const cRecording *recording, bool active) {
#else
cRecMenuItemRecording::cRecMenuItemRecording(cRecording *recording, bool active) {
#endif
selectable = true;
this->recording = recording;
this->active = active;
@@ -2294,7 +2277,7 @@ void cRecMenuItemRecording::Draw(void) {
LOCK_CHANNELS_READ;
const cChannel *channel = Channels->GetByChannelID(recInfo->ChannelID());
#else
cChannel *channel = Channels.GetByChannelID(recInfo->ChannelID());
const cChannel *channel = Channels.GetByChannelID(recInfo->ChannelID());
#endif
cString channelName = tr("unknown channel");
if (channel)
@@ -2510,11 +2493,7 @@ void cRecMenuItemTimelineHeader::Show(void) {
// --- cRecMenuItemTimelineTimer -------------------------------------------------------
#if VDRVERSNUM >= 20301
cRecMenuItemTimelineTimer::cRecMenuItemTimelineTimer(const cTimer *timer, time_t start, time_t stop, std::vector<cTVGuideTimerConflict*> conflictsToday, cRecMenuItemTimelineHeader *header, bool active) {
#else
cRecMenuItemTimelineTimer::cRecMenuItemTimelineTimer(cTimer *timer, time_t start, time_t stop, std::vector<cTVGuideTimerConflict*> conflictsToday, cRecMenuItemTimelineHeader *header, bool active) {
#endif
conflicts = conflictsToday;
defaultBackground = false;
pixmapBack = NULL;
@@ -2661,11 +2640,7 @@ void cRecMenuItemTimelineTimer::Show(void) {
if (pixmapTimerConflicts) pixmapTimerConflicts->SetLayer(6);
}
#if VDRVERSNUM >= 20301
const cTimer *cRecMenuItemTimelineTimer::GetTimerValue(void) {
#else
cTimer *cRecMenuItemTimelineTimer::GetTimerValue(void) {
#endif
return timer;
}

View File

@@ -123,11 +123,7 @@ public:
virtual bool GetBoolValue(void) { return false; };
virtual cString GetStringValue(void) { return cString(""); };
virtual const cEvent *GetEventValue(void) { return NULL; };
#if VDRVERSNUM >= 20301
virtual const cTimer *GetTimerValue(void) { return NULL; };
#else
virtual cTimer *GetTimerValue(void) { return NULL; };
#endif
virtual eRecMenuState ProcessKey(eKeys Key) { return rmsNotConsumed; };
};
@@ -251,6 +247,7 @@ private:
cString text;
int currentVal;
int *callback;
bool refresh;
std::vector<std::string> strings;
int numValues;
cPixmap *pixmapVal;
@@ -261,7 +258,8 @@ public:
int initialVal,
bool active = false,
int *callback = NULL,
eRecMenuState action = rmsNotConsumed);
eRecMenuState action = rmsNotConsumed,
bool refresh = false);
virtual ~cRecMenuItemSelect(void);
void SetPixmaps(void);
void Hide(void);
@@ -493,11 +491,7 @@ public:
class cRecMenuItemChannelChooser : public cRecMenuItem {
private:
cString text;
#if VDRVERSNUM >= 20301
const cChannel *channel;
#else
cChannel *channel;
#endif
int channelNumber;
int *callback;
bool initialChannelSet;
@@ -506,11 +500,7 @@ private:
void DrawValue(void);
public:
cRecMenuItemChannelChooser (cString text,
#if VDRVERSNUM >= 20301
const cChannel *initialChannel,
#else
cChannel *initialChannel,
#endif
bool active = false,
int *callback = NULL,
eRecMenuState action = rmsNotConsumed);
@@ -560,18 +550,10 @@ public:
// --- cRecMenuItemRecording -------------------------------------------------------
class cRecMenuItemRecording : public cRecMenuItem {
private:
#if VDRVERSNUM >= 20301
const cRecording *recording;
#else
cRecording *recording;
#endif
cPixmap *pixmapText;
public:
#if VDRVERSNUM >= 20301
cRecMenuItemRecording(const cRecording *recording, bool active);
#else
cRecMenuItemRecording(cRecording *recording, bool active);
#endif
virtual ~cRecMenuItemRecording(void);
void SetPixmaps(void);
void Hide(void);
@@ -583,11 +565,7 @@ public:
class cRecMenuItemTimelineHeader : public cRecMenuItem {
private:
time_t day;
#if VDRVERSNUM >= 20301
const cTimer *timer;
#else
cTimer *timer;
#endif
std::vector<cTVGuideTimerConflict*> conflicts;
cPixmap *pixmapTimeline;
cPixmap *pixmapTimerInfo;
@@ -603,11 +581,7 @@ public:
virtual ~cRecMenuItemTimelineHeader(void);
void SetDay(time_t day) { this->day = day; };
void SetPixmaps(void);
#if VDRVERSNUM >= 20301
void SetCurrentTimer(const cTimer *timer) { this->timer = timer; };
#else
void SetCurrentTimer(cTimer *timer) { this->timer = timer; };
#endif
void UnsetCurrentTimer(void) { timer = NULL; };
void RefreshTimerDisplay(void);
void Hide(void);
@@ -618,11 +592,7 @@ public:
// --- cRecMenuItemTimelineTimer -------------------------------------------------------
class cRecMenuItemTimelineTimer : public cRecMenuItem {
private:
#if VDRVERSNUM >= 20301
const cTimer *timer;
#else
cTimer *timer;
#endif
std::vector<cTVGuideTimerConflict*> conflicts;
cPixmap *pixmapBack;
cPixmap *pixmapTimerConflicts;
@@ -637,11 +607,7 @@ private:
void DrawTimerConflicts(void);
void DrawNoTimerInfo(void);
public:
#if VDRVERSNUM >= 20301
cRecMenuItemTimelineTimer(const cTimer *timer, time_t start, time_t stop, std::vector<cTVGuideTimerConflict*> conflictsToday, cRecMenuItemTimelineHeader *header, bool active);
#else
cRecMenuItemTimelineTimer(cTimer *timer, time_t start, time_t stop, std::vector<cTVGuideTimerConflict*> conflictsToday, cRecMenuItemTimelineHeader *header, bool active);
#endif
virtual ~cRecMenuItemTimelineTimer(void);
void setActive(void);
void setInactive(void);
@@ -649,11 +615,7 @@ public:
void Hide(void);
void Show(void);
void Draw(void);
#if VDRVERSNUM >= 20301
const cTimer *GetTimerValue(void);
#else
cTimer *GetTimerValue(void);
#endif
eRecMenuState ProcessKey(eKeys Key);
};
@@ -721,4 +683,4 @@ public:
eRecMenuState ProcessKey(eKeys Key);
};
#endif //__TVGUIDE_RECMENUITEM_H
#endif //__TVGUIDE_RECMENUITEM_H

View File

@@ -166,7 +166,7 @@ eOSState cRecMenuManager::StateMachine(eRecMenuState nextState) {
LOCK_TIMERS_READ;
const cTimer *timer = Timers->Get(timerID);
#else
cTimer *timer = Timers.Get(timerID);
const cTimer *timer = Timers.Get(timerID);
#endif
if (timer) {
delete activeMenu;
@@ -178,11 +178,7 @@ eOSState cRecMenuManager::StateMachine(eRecMenuState nextState) {
//caller: cRecMenuEditTimer
//save timer from current timer conflict
cTimer timerModified;
#if VDRVERSNUM >= 20301
const cTimer *originalTimer;
#else
cTimer *originalTimer;
#endif
if (cRecMenuEditTimer *menu = dynamic_cast<cRecMenuEditTimer*>(activeMenu)) {
timerModified = menu->GetTimer();
originalTimer = menu->GetOriginalTimer();
@@ -216,14 +212,14 @@ eOSState cRecMenuManager::StateMachine(eRecMenuState nextState) {
break;
case rmsEditTimer: {
//edit timer for active event
#if VDRVERSNUM >= 20301
const cTimer *timer;
#if VDRVERSNUM >= 20301
{
LOCK_TIMERS_READ;
timer = recManager->GetTimerForEvent(event);
}
#else
cTimer *timer = recManager->GetTimerForEvent(event);
timer = recManager->GetTimerForEvent(event);
#endif
if (timer) {
delete activeMenu;
@@ -235,11 +231,7 @@ eOSState cRecMenuManager::StateMachine(eRecMenuState nextState) {
//caller: cRecMenuEditTimer
//save timer for active event
cTimer timerModified;
#if VDRVERSNUM >= 20301
const cTimer *originalTimer;
#else
cTimer *originalTimer;
#endif
if (cRecMenuEditTimer *menu = dynamic_cast<cRecMenuEditTimer*>(activeMenu)) {
timerModified = menu->GetTimer();
originalTimer = menu->GetOriginalTimer();
@@ -319,7 +311,9 @@ eOSState cRecMenuManager::StateMachine(eRecMenuState nextState) {
if (epgSearchTemplates.size() > 0) {
activeMenu = new cRecMenuSearchTimerTemplates(searchTimer, epgSearchTemplates);
} else {
activeMenu = new cRecMenuSearchTimerEdit(searchTimer, false);
std::vector<std::string> channelGroups;
recManager->GetChannelGroups(&channelGroups);
activeMenu = new cRecMenuSearchTimerEdit(searchTimer, false, channelGroups);
}
}
activeMenu->Display();
@@ -337,12 +331,14 @@ eOSState cRecMenuManager::StateMachine(eRecMenuState nextState) {
searchTimer = menu->GetSearchTimer();
} else if (cRecMenuSearchTimerEdit *menu = dynamic_cast<cRecMenuSearchTimerEdit*>(activeMenu)) {
searchTimer = menu->GetSearchTimer();
advancedOptions = (nextState == rmsSearchTimerEditAdvanced)?true:false;
advancedOptions = (nextState == rmsSearchTimerEditAdvanced) ? true : false;
} else if (cRecMenuSearchTimerTemplates *menu = dynamic_cast<cRecMenuSearchTimerTemplates*>(activeMenu)) {
searchTimer = menu->GetSearchTimer();
} else break;
delete activeMenu;
activeMenu = new cRecMenuSearchTimerEdit(searchTimer, advancedOptions);
std::vector<std::string> channelGroups;
recManager->GetChannelGroups(&channelGroups);
activeMenu = new cRecMenuSearchTimerEdit(searchTimer, advancedOptions, channelGroups);
activeMenu->Display();
break; }
case rmsSearchTimerTest: {
@@ -505,11 +501,7 @@ eOSState cRecMenuManager::StateMachine(eRecMenuState nextState) {
activeMenu = new cRecMenuRecordingSearch(searchString);
} else {
int numSearchResults = 0;
#if VDRVERSNUM >= 20301
const cRecording **searchResult = recManager->SearchForRecordings(searchString, numSearchResults);
#else
cRecording **searchResult = recManager->SearchForRecordings(searchString, numSearchResults);
#endif
if (numSearchResults == 0) {
activeMenu = new cRecMenuRecordingSearchNotFound(searchString);
} else {
@@ -721,11 +713,7 @@ eOSState cRecMenuManager::StateMachine(eRecMenuState nextState) {
activeMenu->Display();
break; }
case rmsTimelineTimerEdit: {
#if VDRVERSNUM >= 20301
const cTimer *timer;
#else
cTimer *timer;
#endif
if (cRecMenuTimeline *menu = dynamic_cast<cRecMenuTimeline*>(activeMenu)) {
timer = menu->GetTimer();
} else break;
@@ -737,11 +725,7 @@ eOSState cRecMenuManager::StateMachine(eRecMenuState nextState) {
break;}
case rmsTimelineTimerSave: {
cTimer timerModified;
#if VDRVERSNUM >= 20301
const cTimer *originalTimer;
#else
cTimer *originalTimer;
#endif
if (cRecMenuEditTimer *menu = dynamic_cast<cRecMenuEditTimer*>(activeMenu)) {
timerModified = menu->GetTimer();
originalTimer = menu->GetOriginalTimer();
@@ -756,18 +740,18 @@ eOSState cRecMenuManager::StateMachine(eRecMenuState nextState) {
activeMenu->Display();
break; }
case rmsTimelineTimerDelete: {
#if VDRVERSNUM >= 20301
const cTimer *timer;
#else
cTimer *timer;
#endif
if (cRecMenuEditTimer *menu = dynamic_cast<cRecMenuEditTimer*>(activeMenu)) {
timer = menu->GetOriginalTimer();
} else break;
#if VDRVERSNUM >= 20301
{
LOCK_TIMERS_WRITE;
recManager->DeleteTimer(Timers->GetTimer(timer));
}
#else
recManager->DeleteTimer(Timers.GetTimer((cTimer*)timer));
#endif
delete activeMenu;
if (timerConflicts) {
delete timerConflicts;
@@ -880,15 +864,13 @@ void cRecMenuManager::DisplaySearchTimerList(void) {
activeMenu->Display();
}
#if VDRVERSNUM >= 20301
bool cRecMenuManager::DisplayTimerConflict(const cTimer *timer) {
int timerID = 0;
#if VDRVERSNUM >= 20301
LOCK_TIMERS_READ;
for (const cTimer *t = Timers->First(); t; t = Timers->Next(t)) {
#else
bool cRecMenuManager::DisplayTimerConflict(cTimer *timer) {
int timerID = 0;
for (cTimer *t = Timers.First(); t; t = Timers.Next(t)) {
for (const cTimer *t = Timers.First(); t; t = Timers.Next(t)) {
#endif
if (t == timer)
return DisplayTimerConflict(timerID);

View File

@@ -15,6 +15,7 @@ private:
cRecMenu *activeMenuBuffer;
cRecMenu *activeMenuBuffer2;
const cEvent *event;
const cEvent *displayEvent;
cRecManager *recManager;
cTVGuideTimerConflicts *timerConflicts;
cDetailView *detailView;
@@ -23,14 +24,11 @@ private:
void SetBackground(void);
void DeleteBackground(void);
void DisplaySearchTimerList(void);
#if VDRVERSNUM >= 20301
bool DisplayTimerConflict(const cTimer *timer);
#else
bool DisplayTimerConflict(cTimer *timer);
#endif
bool DisplayTimerConflict(int timerID);
void DisplayDetailedView(const cEvent *ev);
void DisplayFavoriteResults(std::string header, const cEvent **result, int numResults);
eOSState StateMachine(eRecMenuState nextState);
public:
cRecMenuManager(void);
virtual ~cRecMenuManager(void);
@@ -39,8 +37,7 @@ public:
void Start(const cEvent *event);
void StartFavorites(void);
void Close(void);
eOSState StateMachine(eRecMenuState nextState);
eOSState ProcessKey(eKeys Key);
};
#endif //__TVGUIDE_RECMENUMANAGER_H
#endif //__TVGUIDE_RECMENUMANAGER_H

View File

@@ -111,7 +111,7 @@ cRecMenuConfirmTimer::cRecMenuConfirmTimer(const cEvent *event) {
LOCK_CHANNELS_READ;
const cString channelName = Channels->GetByChannelID(event->ChannelID())->Name();
#else
cString channelName = Channels.GetByChannelID(event->ChannelID())->Name();
const cString channelName = Channels.GetByChannelID(event->ChannelID())->Name();
#endif
cString message;
bool eventHasTimer = false;
@@ -155,7 +155,7 @@ cRecMenuConfirmDeleteTimer::cRecMenuConfirmDeleteTimer(const cEvent *event) {
LOCK_CHANNELS_READ;
const cString channelName = Channels->GetByChannelID(event->ChannelID())->Name();
#else
cString channelName = Channels.GetByChannelID(event->ChannelID())->Name();
const cString channelName = Channels.GetByChannelID(event->ChannelID())->Name();
#endif
cString text = cString::sprintf("%s\n%s\n%s %s - %s\n%s",
tr("Timer deleted"),
@@ -183,7 +183,7 @@ cRecMenuAskDeleteTimer::cRecMenuAskDeleteTimer(const cEvent *event) {
LOCK_CHANNELS_READ;
const cString channelName = Channels->GetByChannelID(event->ChannelID())->Name();
#else
cString channelName = Channels.GetByChannelID(event->ChannelID())->Name();
const cString channelName = Channels.GetByChannelID(event->ChannelID())->Name();
#endif
cString text = cString::sprintf("%s \"%s, %s\" %s",
tr("Timer"),
@@ -387,8 +387,8 @@ cRecMenuConfirmRerunUsed::cRecMenuConfirmRerunUsed(const cEvent *original, const
const cString channelOrig = Channels->GetByChannelID(original->ChannelID())->Name();
const cString channelReplace = Channels->GetByChannelID(replace->ChannelID())->Name();
#else
cString channelOrig = Channels.GetByChannelID(original->ChannelID())->Name();
cString channelReplace = Channels.GetByChannelID(replace->ChannelID())->Name();
const cString channelOrig = Channels.GetByChannelID(original->ChannelID())->Name();
const cString channelReplace = Channels.GetByChannelID(replace->ChannelID())->Name();
#endif
cString message1 = tr("Timer for");
cString message2 = tr("replaced by rerun");
@@ -413,12 +413,7 @@ cRecMenuConfirmRerunUsed::cRecMenuConfirmRerunUsed(const cEvent *original, const
}
// --- cRecMenuEditTimer ---------------------------------------------------------
#if VDRVERSNUM >= 20301
cRecMenuEditTimer::cRecMenuEditTimer(const cTimer *timer, eRecMenuState nextState) {
// const cTimer *originalTimer;
#else
cRecMenuEditTimer::cRecMenuEditTimer(cTimer *timer, eRecMenuState nextState) {
#endif
SetWidthPercent(70);
if (!timer)
return;
@@ -475,11 +470,7 @@ cRecMenuEditTimer::cRecMenuEditTimer(cTimer *timer, eRecMenuState nextState) {
Arrange();
}
#if VDRVERSNUM >= 20301
const cTimer *cRecMenuEditTimer::GetOriginalTimer(void) {
#else
cTimer *cRecMenuEditTimer::GetOriginalTimer(void) {
#endif
return originalTimer;
}
@@ -517,11 +508,7 @@ cTimer cRecMenuEditTimer::GetTimer(void) {
******************************************************************************************/
// --- cRecMenuSeriesTimer ---------------------------------------------------------
#if VDRVERSNUM >= 20301
cRecMenuSeriesTimer::cRecMenuSeriesTimer(const cChannel *initialChannel, const cEvent *event, std::string folder) {
#else
cRecMenuSeriesTimer::cRecMenuSeriesTimer(cChannel *initialChannel, const cEvent *event, std::string folder) {
#endif
if (!initialChannel)
return;
timerActive = true;
@@ -540,7 +527,11 @@ cRecMenuSeriesTimer::cRecMenuSeriesTimer(cChannel *initialChannel, const cEvent
SetHeader(infoItem);
AddMenuItem(new cRecMenuItemBool(tr("Timer Active"), timerActive, false, false, &timerActive));
#if VDRVERSNUM >= 20301
AddMenuItem(new cRecMenuItemChannelChooser(tr("Channel"), initialChannel, false, &channel));
#else
AddMenuItem(new cRecMenuItemChannelChooser(tr("Channel"), (cChannel*)initialChannel, false, &channel));
#endif
AddMenuItem(new cRecMenuItemTime(tr("Series Timer start time"), start, false, &start));
AddMenuItem(new cRecMenuItemTime(tr("Series Timer stop time"), stop, false, &stop));
AddMenuItem(new cRecMenuItemDayChooser(tr("Days to record"), dayOfWeek, false, &dayOfWeek));
@@ -731,10 +722,11 @@ int cRecMenuSearchTimers::GetTotalNumMenuItems(void) {
}
// --- cRecMenuSearchTimerEdit ---------------------------------------------------------
cRecMenuSearchTimerEdit::cRecMenuSearchTimerEdit(cTVGuideSearchTimer searchTimer, bool advancedOptions) {
cRecMenuSearchTimerEdit::cRecMenuSearchTimerEdit(cTVGuideSearchTimer searchTimer, bool advancedOptions, std::vector<std::string> channelGroups) {
deleteMenuItems = false;
this->advancedOptions = advancedOptions;
this->searchTimer = searchTimer;
this->channelGroups = channelGroups;
strncpy(searchString, searchTimer.SearchString().c_str(), TEXTINPUTLENGTH);
timerActive = searchTimer.Active();
mode = searchTimer.SearchMode();
@@ -744,6 +736,8 @@ cRecMenuSearchTimerEdit::cRecMenuSearchTimerEdit(cTVGuideSearchTimer searchTimer
useChannel = searchTimer.UseChannel();
startChannel = searchTimer.StartChannel();
stopChannel = searchTimer.StopChannel();
channelGroup = searchTimer.ChannelGroup();
channelgroupIndex = -1;
useTime = searchTimer.UseTime();
startTime = searchTimer.StartTime();
stopTime = searchTimer.StopTime();
@@ -789,6 +783,10 @@ cRecMenuSearchTimerEdit::~cRecMenuSearchTimerEdit(void) {
delete *it;
}
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++) {
delete *it;
}
@@ -804,22 +802,45 @@ cRecMenuSearchTimerEdit::~cRecMenuSearchTimerEdit(void) {
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) {
dsyslog ("%s %s %d\n", __FILE__, __func__, __LINE__);
useChannelPos = 6;
useTimePos = 7;
useDayOfWeekPos = 8;
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;
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 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 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));
if (!advancedOptions) {
mainMenuItems.push_back(new cRecMenuItemButton(tr("Display advanced Options"), rmsSearchTimerEditAdvanced, false));
@@ -851,6 +872,8 @@ void cRecMenuSearchTimerEdit::InitMenuItems(void) {
useChannelSubMenu.push_back(new cRecMenuItemChannelChooser(tr("Stop Channel"), Channels.GetByNumber(stopChannel), false, &stopChannel, rmsSearchTimerSave));
#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 before"), stopTime, false, &stopTime, rmsSearchTimerSave));
@@ -865,6 +888,7 @@ void cRecMenuSearchTimerEdit::InitMenuItems(void) {
void cRecMenuSearchTimerEdit::CreateMenuItems(void) {
dsyslog ("%s %s %d\n", __FILE__, __func__, __LINE__);
bool reDraw = false;
if (GetCurrentNumMenuItems() > 0) {
InitMenu(false);
@@ -876,15 +900,17 @@ void cRecMenuSearchTimerEdit::CreateMenuItems(void) {
for (int i = 0; i < numMainMenuItems; i++) {
currentMenuItems.push_back(mainMenuItems[i]);
if ((i == useChannelPos) && useChannel)
if ((i == useChannelPos) && (useChannel == 1))
AddSubMenu(&useChannelSubMenu);
else if ((i == useChannelPos) && (useChannel == 2) && (channelgroups.size() > 0))
AddSubMenu(&useGroupSubMenu);
else if ((i == useTimePos) && useTime)
AddSubMenu(&useTimeSubMenu);
else if (advancedOptions && (i == useDayOfWeekPos) && useDayOfWeek)
AddSubMenu(&useDayOfWeekSubMenu);
else if (advancedOptions && (i == avoidRepeatsPos) && avoidRepeats)
AddSubMenu(&avoidRepeatSubMenu);
}
}
int numMenuItemsAll = currentMenuItems.size();
int start = GetStartIndex();
@@ -910,17 +936,26 @@ void cRecMenuSearchTimerEdit::AddSubMenu(std::vector<cRecMenuItem*> *subMenu) {
cTVGuideSearchTimer cRecMenuSearchTimerEdit::GetSearchTimer(void) {
dsyslog ("%s %s %d\n", __FILE__, __func__, __LINE__);
searchTimer.SetSearchString(searchString);
searchTimer.SetActive(timerActive);
searchTimer.SetSearchMode(mode);
searchTimer.SetUseTitle(useTitle);
searchTimer.SetUseSubtitle(useSubtitle);
searchTimer.SetUseDesription(useDescription);
searchTimer.SetUseChannel(useChannel);
if (useChannel) {
if (useChannel == 1) {
searchTimer.SetStartChannel(startChannel);
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);
if (useTime) {
searchTimer.SetStartTime(startTime);
@@ -1110,7 +1145,7 @@ cRecMenuSearchTimerNothingFound::cRecMenuSearchTimerNothingFound(std::string sea
// --- cRecMenuSwitchTimer ---------------------------------------------------------
cRecMenuSwitchTimer::cRecMenuSwitchTimer(void) {
switchMinsBefore = tvguideConfig.switchMinsBefore;
announceOnly = 0;
switchMode = tvguideConfig.switchMode;
SetWidthPercent(60);
@@ -1120,11 +1155,11 @@ cRecMenuSwitchTimer::cRecMenuSwitchTimer(void) {
AddMenuItem(infoItem);
AddMenuItem(new cRecMenuItemInt(tr("Minutes before switching"), switchMinsBefore, 0, 10, false, &switchMinsBefore));
std::vector<std::string> switchModes;
switchModes.push_back(tr("switch"));
switchModes.push_back(tr("announce only"));
switchModes.push_back(tr("ask for switch"));
AddMenuItem(new cRecMenuItemSelect(tr("Switch Mode"), switchModes, announceOnly, false, &announceOnly));
std::vector<std::string> switchModeItems;
switchModeItems.push_back(tr("switch"));
switchModeItems.push_back(tr("announce only"));
switchModeItems.push_back(tr("ask for switch"));
AddMenuItem(new cRecMenuItemSelect(tr("Switch Mode"), switchModeItems, switchMode, false, &switchMode));
AddMenuItem(new cRecMenuItemButtonYesNo(tr("Create"), tr("Cancel"), rmsSwitchTimerCreate, rmsClose, true));
@@ -1136,7 +1171,7 @@ cRecMenuSwitchTimer::cRecMenuSwitchTimer(void) {
cSwitchTimer cRecMenuSwitchTimer::GetSwitchTimer(void) {
cSwitchTimer st;
st.switchMinsBefore = switchMinsBefore;
st.announceOnly = announceOnly;
st.switchMode = switchMode;
return st;
}
@@ -1277,7 +1312,7 @@ cRecMenuSearchConfirmTimer::cRecMenuSearchConfirmTimer(const cEvent *event, eRec
LOCK_CHANNELS_READ;
const cString channelName = Channels->GetByChannelID(event->ChannelID())->Name();
#else
cString channelName = Channels.GetByChannelID(event->ChannelID())->Name();
const cString channelName = Channels.GetByChannelID(event->ChannelID())->Name();
#endif
cString message = tr("Timer created");
cString text = cString::sprintf("%s\n%s\n%s %s - %s\n%s",
@@ -1343,11 +1378,7 @@ cRecMenuRecordingSearch::cRecMenuRecordingSearch(std::string search) {
}
// --- cRecMenuRecordingSearchResults ---------------------------------------------------------
#if VDRVERSNUM >= 20301
cRecMenuRecordingSearchResults::cRecMenuRecordingSearchResults(std::string searchString, const cRecording **searchResults, int numResults) {
#else
cRecMenuRecordingSearchResults::cRecMenuRecordingSearchResults(std::string searchString, cRecording **searchResults, int numResults) {
#endif
this->searchString = searchString;
this->searchResults = searchResults;
SetWidthPercent(80);
@@ -1364,8 +1395,8 @@ cRecMenuRecordingSearchResults::cRecMenuRecordingSearchResults(std::string searc
cRecMenuItem *buttons = new cRecMenuItemButtonYesNo(tr("Adapt Search"), tr("Close"), rmsRecordingSearch, rmsClose, false);
SetFooter(buttons);
if (searchResults && (numResults > 0)) {
for (int i=0; i<numResults; i++) {
if (!AddMenuItemInitial(new cRecMenuItemRecording(searchResults[i], (i==0)?true:false)))
for (int i = 0; i < numResults; i++) {
if (!AddMenuItemInitial(new cRecMenuItemRecording(searchResults[i], (i == 0) ? true : false)))
break;
}
}
@@ -1436,7 +1467,7 @@ void cRecMenuTimeline::GetTimersForDay(void) {
// const cTimers* timers = Timers;
for (const cTimer *t = Timers->First(); t; t = Timers->Next(t)) {
#else
for (cTimer *t = Timers.First(); t; t = Timers.Next(t)) {
for (const cTimer *t = Timers.First(); t; t = Timers.Next(t)) {
#endif
if (((t->StartTime() > timeStart) && (t->StartTime() <= timeStop)) || ((t->StopTime() > timeStart) && (t->StopTime() <= timeStop))) {
timersToday.push_back(t);
@@ -1511,11 +1542,7 @@ void cRecMenuTimeline::ClearMenu(void) {
header->UnsetCurrentTimer();
}
#if VDRVERSNUM >= 20301
const cTimer *cRecMenuTimeline::GetTimer(void) {
#else
cTimer *cRecMenuTimeline::GetTimer(void) {
#endif
if (cRecMenuItemTimelineTimer *activeItem = dynamic_cast<cRecMenuItemTimelineTimer*>(GetActiveMenuItem()))
return activeItem->GetTimerValue();
return NULL;

View File

@@ -115,11 +115,7 @@ public:
// --- cRecMenuEditTimer ---------------------------------------------------------
class cRecMenuEditTimer: public cRecMenu {
private:
#if VDRVERSNUM >= 20301
const cTimer *originalTimer;
#else
cTimer *originalTimer;
#endif
bool timerActive;
time_t day;
int start;
@@ -128,13 +124,8 @@ private:
int lifetime;
char folder[TEXTINPUTLENGTH];
public:
#if VDRVERSNUM >= 20301
cRecMenuEditTimer(const cTimer *timer, eRecMenuState nextState);
const cTimer *GetOriginalTimer(void);
#else
cRecMenuEditTimer(cTimer *timer, eRecMenuState nextState);
cTimer *GetOriginalTimer(void);
#endif
virtual ~cRecMenuEditTimer(void) {};
cTimer GetTimer(void);
};
@@ -157,11 +148,7 @@ class cRecMenuSeriesTimer: public cRecMenu {
int lifetime;
void CalculateTimes(const cEvent *event);
public:
#if VDRVERSNUM >= 20301
cRecMenuSeriesTimer(const cChannel *initialChannel, const cEvent *event, std::string folder);
#else
cRecMenuSeriesTimer(cChannel *initialChannel, const cEvent *event, std::string folder);
#endif
virtual ~cRecMenuSeriesTimer(void) {};
cTimer *GetTimer(void);
};
@@ -222,8 +209,10 @@ class cRecMenuSearchTimerEdit: public cRecMenu {
private:
bool advancedOptions;
cTVGuideSearchTimer searchTimer;
std::vector<std::string> channelGroups;
std::vector<cRecMenuItem*> mainMenuItems;
std::vector<cRecMenuItem*> useChannelSubMenu;
std::vector<cRecMenuItem*> useGroupSubMenu;
std::vector<cRecMenuItem*> useTimeSubMenu;
std::vector<cRecMenuItem*> useDayOfWeekSubMenu;
std::vector<cRecMenuItem*> avoidRepeatSubMenu;
@@ -239,9 +228,12 @@ private:
bool useTitle;
bool useSubtitle;
bool useDescription;
bool useChannel;
int useChannel;
int startChannel;
int stopChannel;
std::string channelGroup;
std::vector<std::string> channelgroups;
int channelgroupIndex;
bool useTime;
int startTime;
int stopTime;
@@ -262,8 +254,9 @@ private:
bool useInFavorites;
void InitMenuItems(void);
void AddSubMenu(std::vector<cRecMenuItem*> *subMenu);
int SplitChannelGroups(std::vector<std::string> *channelGroups, std::vector<std::string> *channelgroups);
public:
cRecMenuSearchTimerEdit(cTVGuideSearchTimer searchTimer, bool advancedOptions);
cRecMenuSearchTimerEdit(cTVGuideSearchTimer searchTimer, bool advancedOptions, std::vector<std::string> channelGroups);
void CreateMenuItems(void);
virtual ~cRecMenuSearchTimerEdit(void);
cTVGuideSearchTimer GetSearchTimer(void);
@@ -332,7 +325,7 @@ public:
class cRecMenuSwitchTimer: public cRecMenu {
private:
int switchMinsBefore;
int announceOnly;
int switchMode;
public:
cRecMenuSwitchTimer(void);
virtual ~cRecMenuSwitchTimer(void) {};
@@ -425,18 +418,10 @@ public:
class cRecMenuRecordingSearchResults: public cRecMenu {
private:
std::string searchString;
#if VDRVERSNUM >= 20301
const cRecording **searchResults;
#else
cRecording **searchResults;
#endif
int numResults;
public:
#if VDRVERSNUM >= 20301
cRecMenuRecordingSearchResults(std::string searchString, const cRecording **searchResults, int numResults);
#else
cRecMenuRecordingSearchResults(std::string searchString, cRecording **searchResults, int numResults);
#endif
cRecMenuItem *GetMenuItem(int number);
int GetTotalNumMenuItems(void);
virtual ~cRecMenuRecordingSearchResults(void) {
@@ -459,11 +444,7 @@ public:
// --- cRecMenuTimeline ---------------------------------------------------------
class cRecMenuTimeline: public cRecMenu {
private:
#if VDRVERSNUM >= 20301
std::vector<const cTimer*> timersToday;
#else
std::vector<cTimer*> timersToday;
#endif
int numTimersToday;
time_t today;
time_t timeStart;
@@ -479,16 +460,11 @@ private:
void ClearMenu(void);
public:
cRecMenuTimeline(cTVGuideTimerConflicts *timerConflicts);
virtual ~cRecMenuTimeline(void) {};
cRecMenuItem *GetMenuItem(int number);
int GetTotalNumMenuItems(void);
virtual ~cRecMenuTimeline(void) {
};
eRecMenuState ProcessKey(eKeys Key);
#if VDRVERSNUM >= 20301
const cTimer *GetTimer(void);
#else
cTimer *GetTimer(void);
#endif
};
/******************************************************************************************
@@ -511,4 +487,4 @@ public:
virtual ~cRecMenuFavorites(void);
};
#endif //__TVGUIDE_RECMENUS_H
#endif //__TVGUIDE_RECMENUS_H

View File

@@ -210,31 +210,31 @@ bool cTVGuideSearchTimer::Parse(bool readTemplate) {
return false;
for (int value = 0; value < numValues; value++) {
switch (value) {
case 0:
case 0:
if (!readTemplate)
ID = atoi(values[value].c_str());
break;
case 1:
case 1:
if (!readTemplate) {
std::string searchStringMasked = values[value];
std::replace(searchStringMasked.begin(), searchStringMasked.end(), '|', ':');
searchString = searchStringMasked;
}
break;
case 2:
case 2:
useTime = atoi(values[value].c_str());
break;
case 3:
if (useTime) {
startTime = atoi(values[value].c_str());
}
break;
startTime = atoi(values[value].c_str());
}
break;
case 4:
if (useTime) {
stopTime = atoi(values[value].c_str());
}
break;
case 5:
stopTime = atoi(values[value].c_str());
}
break;
case 5:
useChannel = atoi(values[value].c_str());
break;
case 6:
@@ -242,39 +242,44 @@ bool cTVGuideSearchTimer::Parse(bool readTemplate) {
channelMin = NULL;
channelMax = NULL;
} else if (useChannel == 1) {
char *channelMinbuffer = NULL;
char *channelMaxbuffer = NULL;
int channels = sscanf(values[value].c_str(), "%a[^|]|%a[^|]", &channelMinbuffer, &channelMaxbuffer);
int minNum = 0, maxNum = 0;
int fields = sscanf(values[value].c_str(), "%d-%d", &minNum, &maxNum);
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
LOCK_CHANNELS_READ;
channelMin = Channels->GetByChannelID(tChannelID::FromString(channelMinbuffer), true, true);
LOCK_CHANNELS_READ;
channelMin = Channels->GetByChannelID(tChannelID::FromString(channelMinbuffer), true, true);
#else
channelMin = Channels.GetByChannelID(tChannelID::FromString(channelMinbuffer), true, true);
channelMin = Channels.GetByChannelID(tChannelID::FromString(channelMinbuffer), true, true);
#endif
if (!channelMin) {
channelMin = channelMax = NULL;
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) {
if (!channelMin) {
esyslog("ERROR: channel '%s' not defined", channelMinbuffer);
channelMin = channelMax = NULL;
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);
free(channelMaxbuffer);
} else if (useChannel == 2) {
channelGroup = values[value];
}
} else if (useChannel == 2)
channelGroup = values[value];
break;
case 7:
case 7:
useCase = atoi(values[value].c_str());
break;
case 8:
@@ -572,7 +577,6 @@ void cTVGuideSearchTimer::GetSearchModes(std::vector<std::string> *searchModes)
searchModes->push_back(tr("regular expression"));
}
void cTVGuideSearchTimer::Dump(void) {
esyslog("tvguide searchtimer: strTimer: %s", strTimer.c_str());
esyslog("tvguide searchtimer: ID: %d", ID);
@@ -612,3 +616,10 @@ void cTVGuideSearchTimer::SetStopChannel(int stopChannel)
channelMax = Channels.GetByNumber(stopChannel);
#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 UseDescription(void) { return useDescription; };
int SearchMode(void) { return mode; };
bool UseChannel(void) { return useChannel; };
int UseChannel(void) { return useChannel; };
int StartChannel(void) { return (channelMin)?channelMin->Number():0; };
int StopChannel(void) { return (channelMax)?channelMax->Number():0; };
std::string ChannelGroup(void) { return channelGroup; };
bool UseTime(void) { return useTime; };
int StartTime(void) { return startTime; };
int StopTime(void) { return stopTime; };
@@ -110,9 +111,10 @@ public:
void SetUseTitle(bool useTitle) { this->useTitle = useTitle; };
void SetUseSubtitle(bool useSubtitle) { this->useSubtitle = useSubtitle; };
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 SetStopChannel(int stopChannel);
void SetChannelGroup(std::string channelGroup) { this->channelGroup = channelGroup; };
void SetUseTime(bool useTime) { this->useTime = useTime; };
void SetStartTime(int startTime) { this->startTime = startTime; };
void SetStopTime(int stopTime) { this->stopTime = stopTime; };
@@ -135,6 +137,7 @@ public:
int GetNumTimers(void);
int GetNumRecordings(void);
void GetSearchModes(std::vector<std::string> *searchModes);
void GetUseChannelModes(std::vector<std::string> *useChannelModes);
void Dump(void);
};

View File

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

122
setup.c
View File

@@ -77,6 +77,7 @@ void cTvguideSetup::Store(void) {
SetupStore("channelCols", tvguideConfig.channelCols);
SetupStore("channelRows", tvguideConfig.channelRows);
SetupStore("displayTime", tvguideConfig.displayTime);
SetupStore("displayHorizontalTime", tvguideConfig.displayHorizontalTime);
SetupStore("bigStepHours", tvguideConfig.bigStepHours);
SetupStore("hugeStepHours", tvguideConfig.hugeStepHours);
SetupStore("channelJumpMode", tvguideConfig.channelJumpMode);
@@ -121,6 +122,7 @@ void cTvguideSetup::Store(void) {
SetupStore("favLimitChannels", tvguideConfig.favLimitChannels);
SetupStore("favStartChannel", tvguideConfig.favStartChannel);
SetupStore("favStopChannel", tvguideConfig.favStopChannel);
SetupStore("switchMode", tvguideConfig.switchMode);
SetupStore("switchMinsBefore", tvguideConfig.switchMinsBefore);
SetupStore("fontIndex", tvguideConfig.fontIndex);
SetupStore("FontButtonDelta", tvguideConfig.FontButtonDelta);
@@ -154,7 +156,7 @@ void cTvguideSetup::Store(void) {
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;
indent = " ";
}
@@ -208,7 +210,11 @@ void cMenuSetupGeneral::Set(void) {
if (themes.NumThemes())
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 cMenuEditStraItem(tr("Channel Jump Mode (Keys Green / Yellow)"), &tmpTvguideConfig->channelJumpMode, 2, jumpMode));
@@ -230,11 +236,16 @@ void cMenuSetupGeneral::Set(void) {
}
eOSState cMenuSetupGeneral::ProcessKey(eKeys Key) {
bool olduseNopacityTheme = tmpTvguideConfig->useNopacityTheme;
bool olddisplayRerunsDetailEPGView = tmpTvguideConfig->displayRerunsDetailEPGView;
eOSState state = cOsdMenu::ProcessKey(Key);
if (Key == kOk) {
state = osBack;
} else if (Key != kNone) {
Set();
if (tmpTvguideConfig->useNopacityTheme != olduseNopacityTheme ||
tmpTvguideConfig->displayRerunsDetailEPGView != olddisplayRerunsDetailEPGView) {
Set();
}
}
return state;
}
@@ -311,11 +322,22 @@ void cMenuSetupScreenLayout::Set(void) {
}
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);
if (Key == kOk) {
state = osBack;
} else if (Key != kNone) {
Set();
if (tmpTvguideConfig->displayMode != olddisplayMode ||
tmpTvguideConfig->displayStatusHeader != olddisplayStatusHeader ||
tmpTvguideConfig->displayChannelGroups != olddisplayChannelGroups ||
tmpTvguideConfig->hideChannelLogos != oldhideChannelLogos ||
tmpTvguideConfig->hideEpgImages != oldhideEpgImages) {
Set();
}
}
return state;
}
@@ -379,6 +401,9 @@ cMenuSetupFavorites::cMenuSetupFavorites(cTvguideConfig* data) : cMenuSetupSubM
recFolderMode[1] = tr("Select from folder list");
recFolderMode[2] = tr("Use fixed folder");
strn0cpy(fixedFolder, data->instRecFixedFolder.c_str(), sizeof(fixedFolder));
switchModeItems[0] = (tr("switch"));
switchModeItems[1] = (tr("announce only"));
switchModeItems[2] = (tr("ask for switch"));
Set();
}
@@ -393,34 +418,37 @@ void cMenuSetupFavorites::Set(void) {
if (pRemoteTimers)
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));
if (tmpTvguideConfig->favLimitChannels) {
Add(new cMenuEditChanItem(tr("Start Channel"), &tmpTvguideConfig->favStartChannel));
Add(new cMenuEditChanItem(tr("Stop Channel"), &tmpTvguideConfig->favStopChannel));
}
Add(new cMenuEditIntItem(tr("Minutes a switchtimer switches before start of a show"), &tmpTvguideConfig->switchMinsBefore, 0, 10));
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 cMenuEditStraItem(tr("Switch Mode"), &tmpTvguideConfig->switchMode, 3, switchModeItems));
Add(new cMenuEditIntItem(tr("Switch (x)min before start of the show"), &tmpTvguideConfig->switchMinsBefore, 0, 10));
SetCurrent(Get(currentItem));
@@ -428,32 +456,42 @@ void cMenuSetupFavorites::Set(void) {
}
eOSState cMenuSetupFavorites::ProcessKey(eKeys Key) {
int tmpFavUseTime1 = tmpTvguideConfig->favUseTime1;
int tmpFavUseTime2 = tmpTvguideConfig->favUseTime2;
int tmpFavUseTime3 = tmpTvguideConfig->favUseTime3;
int tmpFavUseTime4 = tmpTvguideConfig->favUseTime4;
int tmpFavLimitChannels = tmpTvguideConfig->favLimitChannels;
int tmpFolderMode = tmpTvguideConfig->instRecFolderMode;
eOSState state = cOsdMenu::ProcessKey(Key);
if (Key == kOk) {
tmpTvguideConfig->descUser1 = description1;
tmpTvguideConfig->descUser2 = description2;
tmpTvguideConfig->descUser3 = description3;
tmpTvguideConfig->descUser4 = description4;
tmpTvguideConfig->instRecFixedFolder = fixedFolder;
} else if ((Key == kLeft)||(Key == kRight)) {
if ((tmpFavUseTime1 != tmpTvguideConfig->favUseTime1) ||
(tmpFavUseTime2 != tmpTvguideConfig->favUseTime2) ||
(tmpFavUseTime3 != tmpTvguideConfig->favUseTime3) ||
(tmpFavUseTime4 != tmpTvguideConfig->favUseTime4) ||
(tmpFavLimitChannels != tmpTvguideConfig->favLimitChannels) ||
(tmpFolderMode != tmpTvguideConfig->instRecFolderMode) )
Set();
if ((tmpFavUseTime1 != tmpTvguideConfig->favUseTime1) ||
(tmpFavUseTime2 != tmpTvguideConfig->favUseTime2) ||
(tmpFavUseTime3 != tmpTvguideConfig->favUseTime3) ||
(tmpFavUseTime4 != tmpTvguideConfig->favUseTime4) ||
(tmpFavLimitChannels != tmpTvguideConfig->favLimitChannels) ||
(tmpFolderMode != tmpTvguideConfig->instRecFolderMode) ) {
Set();
Display();
}
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;
}
//-----Image Caching-------------------------------------------------------------------------------------------------------------
cMenuSetupImageCache::cMenuSetupImageCache(cTvguideConfig* data) : cMenuSetupSubMenu(tr("Image Loading and Caching"), data) {
Set();

View File

@@ -68,6 +68,7 @@ class cMenuSetupFavorites : public cMenuSetupSubMenu {
char description3[256];
char description4[256];
const char * recFolderMode[3];
const char * switchModeItems[3];
char fixedFolder[256];
void Set(void);
virtual eOSState ProcessKey(eKeys Key);

View File

@@ -58,10 +58,7 @@ void cStatusHeader::ScaleVideo(void) {
void cStatusHeader::DrawInfoText(cGrid *grid) {
int border = 10;
int textWidth = 0;
if (tvguideConfig.displayMode == eVertical)
textWidth = width - 2 * border - geoManager.clockWidth - 2;
else
textWidth = width - 2 * border;
textWidth = width - 2 * border;
tColor colorTextBack = (tvguideConfig.style == eStyleFlat)?color:clrTransparent;
pixmapText->Fill(clrTransparent);
int x = border;
@@ -143,4 +140,4 @@ void cStatusHeader::DecorateVideoFrame(void) {
pixmapTVFrame->DrawEllipse(cRect(frame, height - radius - frame, radius, radius), theme.Color(clrBackgroundOSD), -3);
pixmapTVFrame->DrawRectangle(cRect(0, height - frame, tvFrameWidth, frame), theme.Color(clrBackgroundOSD));
pixmapTVFrame->DrawEllipse(cRect(tvFrameWidth - radius - frame, height - radius - frame, radius, radius), theme.Color(clrBackgroundOSD), -4);
}
}

View File

@@ -7,14 +7,14 @@ cSwitchTimer::cSwitchTimer(void) {
eventID = 0;
startTime = 0;
switchMinsBefore = tvguideConfig.switchMinsBefore;
announceOnly = 0;
switchMode = tvguideConfig.switchMode;
}
cSwitchTimer::cSwitchTimer(const cEvent* Event) {
eventID = 0;
startTime = 0;
switchMinsBefore = tvguideConfig.switchMinsBefore;
announceOnly = 0;
// switchMinsBefore = tvguideConfig.switchMinsBefore;
// switchModes = tvguideConfig.switchModes;
if (Event) {
eventID = Event->EventID();
channelID = Event->ChannelID();

View File

@@ -10,7 +10,7 @@ public:
time_t startTime;
tChannelID channelID;
int switchMinsBefore;
int announceOnly;
int switchMode;
#if VDRVERSNUM >= 20305
cSwitchTimer(const cSwitchTimer &SwitchTimer) { *this = SwitchTimer; };
cSwitchTimer& operator= (const cSwitchTimer &SwitchTimer)
@@ -19,7 +19,7 @@ public:
this->startTime = SwitchTimer.startTime;
this->channelID = SwitchTimer.channelID;
this->switchMinsBefore = SwitchTimer.switchMinsBefore;
this->announceOnly = SwitchTimer.announceOnly;
this->switchMode = SwitchTimer.switchMode;
return *this;
};
#endif

View File

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

View File

@@ -26,8 +26,8 @@
#error "VDR-2.0.0 API version or greater is required!"
#endif
static const char *VERSION = "1.2.4";
static const char *DESCRIPTION = "A fancy 2d EPG Viewer";
static const char *VERSION = "1.2.6";
static const char *DESCRIPTION = tr("A fancy 2d EPG Viewer");
static const char *MAINMENUENTRY = "Tvguide";
class cPluginTvguide : public cPlugin {
@@ -35,7 +35,7 @@ public:
cPluginTvguide(void);
virtual ~cPluginTvguide();
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 bool ProcessArgs(int argc, char *argv[]);
virtual bool Initialize(void);

View File

@@ -139,11 +139,15 @@ void cTvGuideOsd::readChannels(const cChannel *channelStart) {
if (!channelStart)
return;
#if VDRVERSNUM >= 20301
const cChannels *channels;
{
LOCK_CHANNELS_READ;
for (const cChannel *channel = channelStart; channel; channel = Channels->Next(channel)) {
channels = Channels;
}
#else
for (const cChannel *channel = channelStart; channel; channel = Channels.Next(channel)) {
cChannels *channels = &Channels;
#endif
for (const cChannel *channel = channelStart; channel; channel = channels->Next(channel)) {
if (!channel->GroupSep()) {
if (channelGroups->IsInLastGroup(channel)) {
break;
@@ -165,11 +169,7 @@ void cTvGuideOsd::readChannels(const cChannel *channelStart) {
int numCurrent = columns.Count();
int numBack = tvguideConfig.numGrids - numCurrent;
int newChannelNumber = columns.First()->getChannel()->Number() - numBack;
#if VDRVERSNUM >= 20301
const cChannel *newStart = Channels->GetByNumber(newChannelNumber);
#else
const cChannel *newStart = Channels.GetByNumber(newChannelNumber);
#endif
const cChannel *newStart = channels->GetByNumber(newChannelNumber);
readChannels(newStart);
}
}

34
view.c
View File

@@ -1,4 +1,5 @@
#include "detailview.h"
#include "switchtimer.h"
/********************************************************************************************
* cView
@@ -120,14 +121,10 @@ void cView::DrawHeader(void) {
pixmapHeader->DrawText(cPoint(xText, yTitle), CutText(title, textWidthMax, fontHeaderLarge).c_str(), theme.Color(clrFont), theme.Color(clrStatusHeader), fontHeaderLarge);
pixmapHeader->DrawText(cPoint(xText, ySubtitle), CutText(subTitle, textWidthMax, fontHeader).c_str(), theme.Color(clrFont), theme.Color(clrStatusHeader), fontHeader);
//REC Icon
eTimerMatch timerMatch=tmNone;
#if VDRVERSNUM >= 20301
const cTimer *ti;
#else
cTimer *ti;
#endif
eTimerMatch timerMatch = tmNone;
if (!event)
return;
const cTimer *ti;
if (tvguideConfig.useRemoteTimers && pRemoteTimers) {
RemoteTimers_GetMatch_v1_0 rtMatch;
rtMatch.event = event;
@@ -142,14 +139,23 @@ void cView::DrawHeader(void) {
ti = Timers.GetMatch(event, &timerMatch);
#endif
}
if (timerMatch == tmFull) {
cString recIconText(" REC ");
int widthIcon = fontManager.FontDetailHeader->Width(*recIconText);
int height = fontManager.FontDetailHeader->Height()+10;
int posX = headerWidth - widthIcon - 20;
int posY = 20;
pixmapHeader->DrawRectangle( cRect(posX, posY, widthIcon, height), theme.Color(clrButtonRed));
pixmapHeader->DrawText(cPoint(posX, posY+5), *recIconText, theme.Color(clrFont), theme.Color(clrButtonRed), fontManager.FontDetailHeader);
bool hasSwitchTimer = SwitchTimers.EventInSwitchList(event);
if (hasSwitchTimer || (ti && timerMatch == tmFull)) {
tColor iconColor;
bool switchOnly = false;
bool timerActive = ti && ti->HasFlags(tfActive);
cString recIconText;
#ifdef SWITCHONLYPATCH
switchOnly = ti && ti->HasFlags(tfSwitchOnly);
#endif
(hasSwitchTimer || switchOnly) ? recIconText = "Switch" : recIconText = " REC ";
iconColor = (hasSwitchTimer || switchOnly) ? theme.Color(clrButtonYellow) : timerActive ? theme.Color(clrButtonRed) : theme.Color(clrButtonGreen);
int widthIcon = fontManager.FontDetailHeader->Width(*recIconText) + 10;
int height = fontManager.FontDetailHeader->Height() + 10;
int posX = headerWidth - widthIcon - 25;
int posY = ySubtitle - 5;
pixmapHeader->DrawRectangle( cRect(posX, posY, widthIcon, height), iconColor);
pixmapHeader->DrawText(cPoint(posX + 5, posY + 5), *recIconText, theme.Color(clrFont), iconColor, fontManager.FontDetailHeader);
}
}

2
view.h
View File

@@ -146,4 +146,4 @@ public:
void Action(void);
};
#endif //__TVGUIDE_VIEW_H
#endif //__TVGUIDE_VIEW_H