summaryrefslogtreecommitdiff
path: root/zappilotsetup.c
blob: 888205cb3b9f603af3bf61995fc347a60537f2a4 (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
/*
 * zappilotsetup.c: A plugin for the Video Disk Recorder
 *
 * See the README file for copyright information and how to reach the author.
 *
 * $Id$
 */

#include "zappilotsetup.h"
#include "config.h"

cZappilotSetup::cZappilotSetup(void)
{

   CloseOnSwitch = config.closeonswitch;
   Hidemenu      = config.hidemenu;
   FastBrowse    = config.fastbrowse;
   FastBrowseAlt = config.fastbrowsealt;
   SwitchTimer   = config.switchtimer;
   SwitchMinsBefore = config.switchminsbefore;

   Add(new cMenuEditBoolItem( tr("Close on OK"), &CloseOnSwitch));
   Add(new cMenuEditBoolItem( tr("Hide main menu entry"), &Hidemenu, trVDR("no"), trVDR("yes")));
   Add(new cMenuEditBoolItem( tr("Fast browse"), &FastBrowse, trVDR("no"), trVDR("yes")));
   Add(new cMenuEditBoolItem( tr("Fast browse (alt. key layout)"), &FastBrowseAlt, trVDR("no"), trVDR("yes")));
   if (config.pEPGSearch)
   {
      Add(new cMenuEditBoolItem( tr("Switch timer"), &SwitchTimer, trVDR("no"), trVDR("yes")));
      Add(new cMenuEditIntItem( tr("Switch ... minutes before start"), &SwitchMinsBefore));
   }
}

void cZappilotSetup::Store(void)
{
   SetupStore("CloseOnSwitch", config.closeonswitch = CloseOnSwitch);
   SetupStore("Hidemenu",      config.hidemenu = Hidemenu);
   SetupStore("FastBrowse",    config.fastbrowse = FastBrowse);
   SetupStore("FastBrowseAlt",    config.fastbrowsealt = FastBrowseAlt);
   SetupStore("SwitchTimer",   config.switchtimer = SwitchTimer);
   SetupStore("SwitchMinsBefore",   config.switchminsbefore = SwitchMinsBefore);
}