From b1780705c88cbaa8a07f8426a8b37de1a225a58f Mon Sep 17 00:00:00 2001 From: louis Date: Fri, 15 Feb 2013 17:25:39 +0100 Subject: Added remotetimers support for displaying timers in main menu --- timers.c | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'timers.c') 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); } -- cgit v1.2.3