From 84ab2cb555e4d63484c9ee1e7961509aaa32f961 Mon Sep 17 00:00:00 2001 From: Michael Liebmann Date: Thu, 4 Jul 2013 07:38:32 +0200 Subject: [PATCH] CRecordManager::ShowMenu: Fix display durations - Save Option for CMenuForwarderNonLocalized in vector --- src/driver/record.cpp | 6 +++++- src/driver/record.h | 1 + 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/driver/record.cpp b/src/driver/record.cpp index e2f5a5cbd..ed3b6a5ed 100644 --- a/src/driver/record.cpp +++ b/src/driver/record.cpp @@ -699,6 +699,7 @@ CRecordManager::CRecordManager() //recordingstatus = 0; recmap.clear(); nextmap.clear(); + durations.clear(); autoshift = false; shift_timer = 0; check_timer = 0; @@ -719,6 +720,7 @@ CRecordManager::~CRecordManager() delete[] (unsigned char *) (*it); } nextmap.clear(); + durations.clear(); } CRecordManager * CRecordManager::getInstance() @@ -1416,6 +1418,7 @@ bool CRecordManager::ShowMenu(void) CMenuForwarder * iteml; t_channel_id channel_ids[RECORD_MAX_COUNT] = { 0 }; /* initialization avoids false "might */ int recording_ids[RECORD_MAX_COUNT] = { 0 }; /* be used uninitialized" warning */ + durations.clear(); CMenuSelectorTarget * selector = new CMenuSelectorTarget(&select); @@ -1454,6 +1457,7 @@ bool CRecordManager::ShowMenu(void) std::string title, duration; inst->GetRecordString(title, duration); + durations.push_back(duration); const char* mode_icon = NULL; //if (inst->tshift_mode) @@ -1468,7 +1472,7 @@ bool CRecordManager::ShowMenu(void) rc_key = CRCInput::RC_stop; btn_icon = NEUTRINO_ICON_BUTTON_STOP; } - item = new CMenuForwarderNonLocalized(title.c_str(), true, duration, selector, cnt, rc_key, NULL, mode_icon); + item = new CMenuForwarderNonLocalized(title.c_str(), true, durations[i].c_str(), selector, cnt, rc_key, NULL, mode_icon); item->setItemButton(btn_icon, true); //if only one recording is running, set the focus to this menu item diff --git a/src/driver/record.h b/src/driver/record.h index 4d71cca0f..d427ccc0c 100644 --- a/src/driver/record.h +++ b/src/driver/record.h @@ -146,6 +146,7 @@ class CRecordManager : public CMenuTarget /*, public CChangeObserver*/ nextmap_t nextmap; std::string Directory; std::string TimeshiftDirectory; + std::vector durations; bool StreamVTxtPid; bool StreamSubtitlePids; bool StreamPmtPid;