mirror of
https://projects.vdr-developer.org/git/vdr-plugin-tvguide.git
synced 2023-10-05 13:01:48 +00:00
Compare commits
10 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
b70112ae50 | ||
|
9df447454c | ||
|
8ae5d34bef | ||
|
7d44c8f91f | ||
|
e399518900 | ||
|
dfb2c2b031 | ||
|
060089548a | ||
|
56014ea736 | ||
|
f56219c93c | ||
|
7ca598f64e |
9
HISTORY
9
HISTORY
@@ -158,3 +158,12 @@ 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
|
||||
|
2
config.c
2
config.c
@@ -64,6 +64,7 @@ cTvguideConfig::cTvguideConfig() {
|
||||
favLimitChannels = 0;
|
||||
favStartChannel = 0;
|
||||
favStopChannel = 0;
|
||||
switchMode = 0;
|
||||
switchMinsBefore = 2;
|
||||
fontIndex = 0;
|
||||
fontNameDefault = "VDRSymbols Sans:Book";
|
||||
@@ -300,6 +301,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);
|
||||
|
1
config.h
1
config.h
@@ -118,6 +118,7 @@ class cTvguideConfig {
|
||||
int favLimitChannels;
|
||||
int favStartChannel;
|
||||
int favStopChannel;
|
||||
int switchMode;
|
||||
int switchMinsBefore;
|
||||
int fontIndex;
|
||||
const char *fontNameDefault;
|
||||
|
@@ -145,12 +145,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))
|
||||
|
11
headergrid.c
11
headergrid.c
@@ -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;
|
||||
|
@@ -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-05 13:01+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"
|
||||
@@ -810,6 +810,12 @@ msgstr ""
|
||||
msgid "Limit channels in favorites"
|
||||
msgstr ""
|
||||
|
||||
msgid "Switchtimer:"
|
||||
msgstr ""
|
||||
|
||||
msgid "Switch (x)min before start of the show"
|
||||
msgstr ""
|
||||
|
||||
msgid "Create Log Messages for image loading"
|
||||
msgstr ""
|
||||
|
||||
|
@@ -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-05 13:01+0200\n"
|
||||
"PO-Revision-Date: 2012-08-25 17:49+0200\n"
|
||||
"Last-Translator: Horst\n"
|
||||
"Language-Team: \n"
|
||||
@@ -807,8 +807,11 @@ msgstr "Benutzerdef. Zeit 4 in Favoriten benutzen"
|
||||
msgid "Limit channels in favorites"
|
||||
msgstr "Kanäle in Favoriten beschränken"
|
||||
|
||||
msgid "Minutes a switchtimer switches before start of a show"
|
||||
msgstr "Umschalten (x)min vor Start der Sendung"
|
||||
msgid "Switchtimer:"
|
||||
msgstr "Umschalttimer:"
|
||||
|
||||
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"
|
||||
|
@@ -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-05 13:01+0200\n"
|
||||
"PO-Revision-Date: 2012-08-25 17:49+0200\n"
|
||||
"Last-Translator: fiveten_59\n"
|
||||
"Language-Team: \n"
|
||||
@@ -807,6 +807,12 @@ msgstr "Usa il tempo definito per l'user 4 in favoriti"
|
||||
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"
|
||||
|
||||
@@ -938,4 +944,3 @@ msgstr "TheMovieDB Popularità"
|
||||
|
||||
msgid "TheMovieDB Vote Average"
|
||||
msgstr "Voto medio di TheMovieDB"
|
||||
|
||||
|
@@ -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-05 13:01+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"
|
||||
@@ -807,6 +807,12 @@ msgstr ""
|
||||
msgid "Limit channels in favorites"
|
||||
msgstr ""
|
||||
|
||||
msgid "Switchtimer:"
|
||||
msgstr ""
|
||||
|
||||
msgid "Switch (x)min before start of the show"
|
||||
msgstr ""
|
||||
|
||||
msgid "Create Log Messages for image loading"
|
||||
msgstr ""
|
||||
|
||||
|
@@ -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-05 13:01+0200\n"
|
||||
"PO-Revision-Date: 2013-09-15 00:12+0100\n"
|
||||
"Last-Translator: Milan Hrala <hrala.milan@gmail.com>\n"
|
||||
"Language-Team: \n"
|
||||
@@ -807,6 +807,12 @@ msgstr ""
|
||||
msgid "Limit channels in favorites"
|
||||
msgstr ""
|
||||
|
||||
msgid "Switchtimer:"
|
||||
msgstr ""
|
||||
|
||||
msgid "Switch (x)min before start of the show"
|
||||
msgstr ""
|
||||
|
||||
msgid "Create Log Messages for image loading"
|
||||
msgstr ""
|
||||
|
||||
|
117
recmanager.c
117
recmanager.c
@@ -56,26 +56,21 @@ bool cRecManager::CheckEventForTimer(const cEvent *event) {
|
||||
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;
|
||||
}
|
||||
@@ -208,41 +203,42 @@ 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) {
|
||||
void cRecManager::DeleteTimer(const cTimer *timer) {
|
||||
dsyslog ("%s %s %d\n", __FILE__, __func__, __LINE__);
|
||||
#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 +255,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 +403,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 +422,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;
|
||||
@@ -538,45 +537,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 +586,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 +616,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 +660,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;
|
||||
}
|
||||
}
|
||||
|
14
recmanager.h
14
recmanager.h
@@ -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);
|
||||
@@ -60,11 +52,7 @@ public:
|
||||
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);
|
||||
|
@@ -1832,8 +1832,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;
|
||||
@@ -2258,11 +2259,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;
|
||||
@@ -2510,11 +2507,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 +2654,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;
|
||||
}
|
||||
|
||||
|
@@ -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; };
|
||||
};
|
||||
|
||||
@@ -560,18 +556,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 +571,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 +587,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 +598,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 +613,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 +621,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 +689,4 @@ public:
|
||||
eRecMenuState ProcessKey(eKeys Key);
|
||||
};
|
||||
|
||||
#endif //__TVGUIDE_RECMENUITEM_H
|
||||
#endif //__TVGUIDE_RECMENUITEM_H
|
||||
|
@@ -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();
|
||||
@@ -505,11 +497,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 +709,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 +721,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 +736,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 +860,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);
|
||||
|
@@ -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
|
||||
|
57
recmenus.c
57
recmenus.c
@@ -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));
|
||||
@@ -1110,7 +1101,7 @@ cRecMenuSearchTimerNothingFound::cRecMenuSearchTimerNothingFound(std::string sea
|
||||
// --- cRecMenuSwitchTimer ---------------------------------------------------------
|
||||
cRecMenuSwitchTimer::cRecMenuSwitchTimer(void) {
|
||||
switchMinsBefore = tvguideConfig.switchMinsBefore;
|
||||
announceOnly = 0;
|
||||
switchMode = tvguideConfig.switchMode;
|
||||
|
||||
SetWidthPercent(60);
|
||||
|
||||
@@ -1120,11 +1111,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 +1127,7 @@ cRecMenuSwitchTimer::cRecMenuSwitchTimer(void) {
|
||||
cSwitchTimer cRecMenuSwitchTimer::GetSwitchTimer(void) {
|
||||
cSwitchTimer st;
|
||||
st.switchMinsBefore = switchMinsBefore;
|
||||
st.announceOnly = announceOnly;
|
||||
st.switchMode = switchMode;
|
||||
return st;
|
||||
}
|
||||
|
||||
@@ -1277,7 +1268,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 +1334,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 +1351,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 +1423,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 +1498,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;
|
||||
|
36
recmenus.h
36
recmenus.h
@@ -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);
|
||||
};
|
||||
@@ -332,7 +319,7 @@ public:
|
||||
class cRecMenuSwitchTimer: public cRecMenu {
|
||||
private:
|
||||
int switchMinsBefore;
|
||||
int announceOnly;
|
||||
int switchMode;
|
||||
public:
|
||||
cRecMenuSwitchTimer(void);
|
||||
virtual ~cRecMenuSwitchTimer(void) {};
|
||||
@@ -425,18 +412,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 +438,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 +454,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 +481,4 @@ public:
|
||||
virtual ~cRecMenuFavorites(void);
|
||||
};
|
||||
|
||||
#endif //__TVGUIDE_RECMENUS_H
|
||||
#endif //__TVGUIDE_RECMENUS_H
|
||||
|
8
setup.c
8
setup.c
@@ -121,6 +121,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);
|
||||
@@ -379,6 +380,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();
|
||||
}
|
||||
|
||||
@@ -420,7 +424,9 @@ void cMenuSetupFavorites::Set(void) {
|
||||
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 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));
|
||||
|
1
setup.h
1
setup.h
@@ -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);
|
||||
|
@@ -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();
|
||||
|
@@ -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
|
||||
|
@@ -26,7 +26,7 @@
|
||||
#error "VDR-2.0.0 API version or greater is required!"
|
||||
#endif
|
||||
|
||||
static const char *VERSION = "1.2.4";
|
||||
static const char *VERSION = "1.2.5";
|
||||
static const char *DESCRIPTION = "A fancy 2d EPG Viewer";
|
||||
static const char *MAINMENUENTRY = "Tvguide";
|
||||
|
||||
|
39
view.c
39
view.c
@@ -1,4 +1,5 @@
|
||||
#include "detailview.h"
|
||||
#include "switchtimer.h"
|
||||
|
||||
/********************************************************************************************
|
||||
* cView
|
||||
@@ -15,6 +16,7 @@ cView::cView(void) {
|
||||
pixmapBackground = NULL;
|
||||
pixmapHeader = NULL;
|
||||
pixmapHeaderLogo = NULL;
|
||||
pixmapHeaderIcon = NULL;
|
||||
pixmapContent = NULL;
|
||||
pixmapTabs = NULL;
|
||||
pixmapScrollbar = NULL;
|
||||
@@ -45,6 +47,8 @@ cView::~cView(void) {
|
||||
delete pixmapHeader;
|
||||
if (pixmapHeaderLogo)
|
||||
osdManager.releasePixmap(pixmapHeaderLogo);
|
||||
if (pixmapHeaderIcon)
|
||||
osdManager.releasePixmap(pixmapHeaderIcon);
|
||||
if (pixmapContent)
|
||||
osdManager.releasePixmap(pixmapContent);
|
||||
if (pixmapTabs)
|
||||
@@ -120,14 +124,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 +142,25 @@ 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;
|
||||
if (!pixmapHeaderIcon)
|
||||
pixmapHeaderIcon = osdManager.requestPixmap(7, cRect(posX, posY, widthIcon, height));
|
||||
pixmapHeaderIcon->DrawRectangle(cRect(0, 0, widthIcon, height), iconColor);
|
||||
pixmapHeaderIcon->DrawText(cPoint(5, 5), *recIconText, theme.Color(clrFont), iconColor, fontManager.FontDetailHeader);
|
||||
}
|
||||
}
|
||||
|
||||
|
3
view.h
3
view.h
@@ -35,6 +35,7 @@ protected:
|
||||
cPixmap *pixmapBackground;
|
||||
cStyledPixmap *pixmapHeader;
|
||||
cPixmap *pixmapHeaderLogo;
|
||||
cPixmap *pixmapHeaderIcon;
|
||||
cPixmap *pixmapContent;
|
||||
cPixmap *pixmapScrollbar;
|
||||
cPixmap *pixmapScrollbarBack;
|
||||
@@ -146,4 +147,4 @@ public:
|
||||
void Action(void);
|
||||
};
|
||||
|
||||
#endif //__TVGUIDE_VIEW_H
|
||||
#endif //__TVGUIDE_VIEW_H
|
||||
|
Reference in New Issue
Block a user