Refactor cRecMenuAskFolder

This commit is contained in:
kamel5 2019-11-09 16:22:46 +01:00
parent e707ec7d4f
commit 1f1498a734
1 changed files with 14 additions and 12 deletions

View File

@ -57,14 +57,16 @@ cRecMenuMain::cRecMenuMain(bool epgSearchAvailable, bool timerActive, bool switc
******************************************************************************************/
// --- cRecMenuAskFolder ---------------------------------------------------------
cRecMenuAskFolder::cRecMenuAskFolder(const cEvent *event, eRecMenuState nextAction) {
cRecMenuAskFolder::cRecMenuAskFolder(const cEvent *event, eRecMenuState nextAction) { // OK
SetWidthPercent(80);
NextAction = nextAction;
cString message = tr("Set Folder for");
cString headerText = cString::sprintf("%s\n\"%s\"", *message, event->Title());
cRecMenuItemInfo *infoItem = new cRecMenuItemInfo(*headerText, true);
infoItem->CalculateHeight(width - 2 * border);
SetHeader(infoItem);
const cString line1 = tr("Set Folder for");
const cString line2 = (event && event->Title()) ? cString::sprintf("\"%s\"", event->Title()) : "";
AddHeader(new cRecMenuItemInfo(*line1, 2, *line2, "", "", width - 2 * border, true));
AddFooter(new cRecMenuItemButton(tr("root video folder"), nextAction, true, false, true));
AddMenuItemInitial(new cRecMenuItemButton(tr("root video folder"), nextAction, true, false, true));