diff options
author | Christian Wieninger <cwieninger@gmx.de> | 2010-02-09 20:16:27 +0100 |
---|---|---|
committer | Christian Wieninger <cwieninger@gmx.de> | 2010-02-09 20:16:27 +0100 |
commit | 37a827b8909263960c173ca72d656e0ed15df693 (patch) | |
tree | 1e13cac40824b29237985c7bd3b5554af8addce6 /menu_searchresults.c | |
parent | 83400eaeec7b535e6dd52d11c3583cf90caa5420 (diff) | |
download | vdr-plugin-epgsearch-37a827b8909263960c173ca72d656e0ed15df693.tar.gz vdr-plugin-epgsearch-37a827b8909263960c173ca72d656e0ed15df693.tar.bz2 |
show switch timers in search results menus
Diffstat (limited to 'menu_searchresults.c')
-rw-r--r-- | menu_searchresults.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/menu_searchresults.c b/menu_searchresults.c index 5f509dd..aba990b 100644 --- a/menu_searchresults.c +++ b/menu_searchresults.c @@ -39,6 +39,7 @@ The project's page is at http://winni.vdr-developer.org/epgsearch #include "menu_deftimercheckmethod.h" #include "afuzzy.h" #include "timerstatus.h" +#include "switchtimer.h" const char* ButtonBlue[3] = {NULL, NULL, NULL}; extern int gl_InfoConflict; @@ -61,6 +62,7 @@ cMenuSearchResultsItem::cMenuSearchResultsItem(const cEvent *EventInfo, bool Epi previewTimer = PreviewTimer; menuTemplate = MenuTemplate?MenuTemplate:cTemplFile::GetTemplateByName("MenuSearchResults"); search = Search; + inSwitchList = false; Update(true); } @@ -72,12 +74,14 @@ bool cMenuSearchResultsItem::Update(bool Force) bool result = false; int OldTimerMatch = timerMatch; + bool OldInSwitchList = inSwitchList; bool hasMatch = false; cTimer* timer = NULL; if (event) timer = Timers.GetMatch(event, &timerMatch); + if (event) inSwitchList = (SwitchTimers.InSwitchList(event)!=NULL); if (timer) hasMatch = true; - if (Force || timerMatch != OldTimerMatch) + if (Force || timerMatch != OldTimerMatch || inSwitchList != OldInSwitchList) { char t[Utf8BufSize(2)]="",v[Utf8BufSize(2)]="",r[Utf8BufSize(2)]=""; char szStatus[Utf8BufSize(4)] = ""; @@ -112,6 +116,11 @@ bool cMenuSearchResultsItem::Update(bool Force) r[0] = event && event->IsRunning() ? '*' : ' '; r[1] = '\0'; } + if (event && inSwitchList) + { + cSwitchTimer* s = SwitchTimers.InSwitchList(event); + t[0] = (s && s->mode==1)?'s':'S'; + } if (t[0] != 'T' && previewTimer) t[0] = 'P'; |