summaryrefslogtreecommitdiff
path: root/timers.c
diff options
context:
space:
mode:
authorlouis <louis.braun@gmx.de>2013-02-15 17:25:39 +0100
committerlouis <louis.braun@gmx.de>2013-02-15 17:25:39 +0100
commitb1780705c88cbaa8a07f8426a8b37de1a225a58f (patch)
treeaacc29632eef19ef028438556ddd078e29d8ed0e /timers.c
parent0c453b24c61063c43bec999359723a429fd6011b (diff)
downloadskin-nopacity-b1780705c88cbaa8a07f8426a8b37de1a225a58f.tar.gz
skin-nopacity-b1780705c88cbaa8a07f8426a8b37de1a225a58f.tar.bz2
Added remotetimers support for displaying timers in main menu
Diffstat (limited to 'timers.c')
-rw-r--r--timers.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/timers.c b/timers.c
index 6bd5581..ed24581 100644
--- a/timers.c
+++ b/timers.c
@@ -65,6 +65,17 @@ void cNopacityTimer::CreateShowName(void) {
cString title("");
if (Event) {
title = Event->Title();
+ } else {
+ const char *File = Setup.FoldersInTimerMenu ? NULL : strrchr(timer->File(), FOLDERDELIMCHAR);
+ if (File && strcmp(File + 1, TIMERMACRO_TITLE) && strcmp(File + 1, TIMERMACRO_EPISODE))
+ File++;
+ else
+ File = timer->File();
+ title = File;
+ std::string name(title);
+ size_t index = name.find_last_of(FOLDERDELIMCHAR);
+ if (index != std::string::npos)
+ title = File + index + 1;
}
showName.Set(*title, font, width-10);
}