mirror of
https://projects.vdr-developer.org/git/vdr-plugin-tvguide.git
synced 2023-10-05 15:01:48 +02:00
Refactor cRecMenuSearchTimerEdit
This commit is contained in:
parent
54ce728fa5
commit
d24bbefe4c
22
recmenus.c
22
recmenus.c
@ -704,7 +704,9 @@ int cRecMenuSearchTimers::GetTotalNumMenuItems(void) {
|
||||
}
|
||||
|
||||
// --- cRecMenuSearchTimerEdit ---------------------------------------------------------
|
||||
cRecMenuSearchTimerEdit::cRecMenuSearchTimerEdit(cTVGuideSearchTimer searchTimer, std::vector<std::string> channelGroups) {
|
||||
cRecMenuSearchTimerEdit::cRecMenuSearchTimerEdit(cTVGuideSearchTimer searchTimer, std::vector<std::string> channelGroups) { // OK
|
||||
SetWidthPercent(70);
|
||||
|
||||
init = true;
|
||||
deleteMenuItems = false;
|
||||
this->sT = searchTimer;
|
||||
@ -714,7 +716,6 @@ cRecMenuSearchTimerEdit::cRecMenuSearchTimerEdit(cTVGuideSearchTimer searchTimer
|
||||
std::string dir = sT.directory;
|
||||
strncpy(directory, dir.c_str(), TEXTINPUTLENGTH);
|
||||
dayOfWeek = DayOfWeek(sT.dayOfWeek);
|
||||
// dsyslog("Weekday = %i, %i", sT.dayOfWeek, dayOfWeek);
|
||||
indent = " ";
|
||||
|
||||
if (sT.useChannel == 1) {
|
||||
@ -731,18 +732,11 @@ cRecMenuSearchTimerEdit::cRecMenuSearchTimerEdit(cTVGuideSearchTimer searchTimer
|
||||
sT.GetDelModes(&delModes);
|
||||
channelgroupIndex = SplitChannelGroups(&channelGroups, &channelgroups);
|
||||
|
||||
SetWidthPercent(70);
|
||||
cString infoText;
|
||||
if (sT.GetID() > -1) {
|
||||
infoText = tr("Configure Search Timer Options");
|
||||
} else {
|
||||
infoText = tr("Create Search Timer");
|
||||
}
|
||||
cRecMenuItemInfo *infoItem = new cRecMenuItemInfo(*infoText, true);
|
||||
infoItem->CalculateHeight(width - 2 * border);
|
||||
SetHeader(infoItem);
|
||||
cRecMenuItemButtonYesNo *footerButton = new cRecMenuItemButtonYesNo(tr("Save Search Timer"), tr("Cancel"), rmsSearchTimerSave, rmsSearchTimers, false);
|
||||
SetFooter(footerButton);
|
||||
const cString line1 = (sT.GetID() > -1) ? tr("Configure Search Timer Options") : tr("Create Search Timer");
|
||||
|
||||
AddHeader(new cRecMenuItemInfo(*line1, 1, "", "", "", width - 2 * border, true));
|
||||
AddFooter(new cRecMenuItemButtonYesNo(tr("Save Search Timer"), tr("Cancel"), rmsSearchTimerSave, rmsSearchTimers, false));
|
||||
|
||||
CreateMenuItems();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user