summaryrefslogtreecommitdiff
path: root/mymenusetup.c
blob: f6cf12846eafa37b9ce7767e203a155be7fefab2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
/*
 * See the README file for copyright information and how to reach the author.
 */

#include <vdr/menu.h>
#include "mymenusetup.h"

mySetup::mySetup()
{
 mysetup.HideMainMenuEntry=0;
 mysetup.PatchNew=1;
 mysetup.ReplaceOrgRecMenu=0;
 mysetup.ShowRecDate=1;
 mysetup.ShowRecTime=1;
 mysetup.ShowRecLength=0;
 mysetup.ShowNewRecs=1;
 mysetup.DescendSorting=0;
}

mySetup mysetup;

myMenuSetup::myMenuSetup()
{
 hidemainmenuentry=mysetup.HideMainMenuEntry;
 patchnew=mysetup.PatchNew;
 replaceorgrecmenu=mysetup.ReplaceOrgRecMenu;
 showrecdate=mysetup.ShowRecDate;
 showrectime=mysetup.ShowRecTime;
 showreclength=mysetup.ShowRecLength;
 shownewrecs=mysetup.ShowNewRecs;
 descendsorting=mysetup.DescendSorting;
 
 sortingtypetexts[0]=tr("ascending");
 sortingtypetexts[1]=tr("descending");
 
 Add(new cMenuEditBoolItem(tr("Hide main menu entry"),&hidemainmenuentry));
 Add(new cMenuEditBoolItem(tr("Replace original recordings menu"),&replaceorgrecmenu));
 Add(new cMenuEditStraItem(tr("Sorting"),&descendsorting,2,sortingtypetexts));
 Add(new cMenuEditBoolItem(tr("Show recording date"),&showrecdate));
 Add(new cMenuEditBoolItem(tr("Show recording time"),&showrectime));
 Add(new cMenuEditBoolItem(tr("Show recording length"),&showreclength));
 Add(new cMenuEditBoolItem(tr("Show nr. of new recordings in a directory"),&shownewrecs));
 Add(new cMenuEditBoolItem(tr("Show alternative to new marker"),&patchnew));
}

void myMenuSetup::Store()
{
 SetupStore("HideMainMenuEntry",mysetup.HideMainMenuEntry=hidemainmenuentry);
 SetupStore("PatchNew",mysetup.PatchNew=patchnew);
 SetupStore("ReplaceOrgRecMenu",mysetup.ReplaceOrgRecMenu=replaceorgrecmenu);
 SetupStore("ShowRecDate",mysetup.ShowRecDate=showrecdate);
 SetupStore("ShowRecTime",mysetup.ShowRecTime=showrectime);
 SetupStore("ShowRecLength",mysetup.ShowRecLength=showreclength);
 SetupStore("ShowNewRecs",mysetup.ShowNewRecs=shownewrecs);
 SetupStore("DescendSorting",mysetup.DescendSorting=descendsorting);
}