diff options
author | louis <louis.braun@gmx.de> | 2013-09-08 16:18:40 +0200 |
---|---|---|
committer | louis <louis.braun@gmx.de> | 2013-09-08 16:18:40 +0200 |
commit | 1fba49cea7121c1942cef0bcccc0ba752f6b52e3 (patch) | |
tree | b9fce8d9707e261558504f39f5db1d2a2605c965 /menuitem.c | |
parent | a40698a2bacbe59c0c562c84eefebd1650214bc1 (diff) | |
download | skin-nopacity-1fba49cea7121c1942cef0bcccc0ba752f6b52e3.tar.gz skin-nopacity-1fba49cea7121c1942cef0bcccc0ba752f6b52e3.tar.bz2 |
Display correct recording date even if recording info is empty (closes Bug 1448)
Diffstat (limited to 'menuitem.c')
-rw-r--r-- | menuitem.c | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -1159,9 +1159,14 @@ void cNopacityRecordingMenuItem::DrawRecDateTime(void) { cString strDateTime(""); cString strDuration(""); if (Event) { - cString strDate = Event->GetDateString(); + std::string strDate = *(Event->GetDateString()); cString strTime = Event->GetTimeString(); - strDateTime = cString::sprintf("%s - %s", *strDate, *strTime); + if (strDate.find("1970") != std::string::npos) { + time_t start = Recording->Start(); + strDateTime = cString::sprintf("%s %s", *DateString(start),*TimeString(start)); + } else { + strDateTime = cString::sprintf("%s - %s", strDate.c_str(), *strTime); + } int duration = Event->Duration() / 60; int recDuration = Recording->LengthInSeconds(); recDuration = (recDuration>0)?(recDuration / 60):0; |