summaryrefslogtreecommitdiff
path: root/setup.h
diff options
context:
space:
mode:
authoranbr <vdr07@deltab.de>2010-12-21 20:55:19 +0100
committeranbr <vdr07@deltab.de>2010-12-21 20:55:19 +0100
commit2906f2d1b7e1c5931b3d05156569d6061eb6b9b5 (patch)
treeff3b3004b3f48d85a8b010097e82be8ed377237f /setup.h
parentb8efd2c7861dfb6f55dff730d071e454d503a67d (diff)
downloadvdr-plugin-dvdswitch-2906f2d1b7e1c5931b3d05156569d6061eb6b9b5.tar.gz
vdr-plugin-dvdswitch-2906f2d1b7e1c5931b3d05156569d6061eb6b9b5.tar.bz2
release 0.1.4 from http://www.vdr-portal.de/board/thread.php?postid=845535#post8455350.1.4
Diffstat (limited to 'setup.h')
-rw-r--r--setup.h18
1 files changed, 10 insertions, 8 deletions
diff --git a/setup.h b/setup.h
index d089a08..e0e6063 100644
--- a/setup.h
+++ b/setup.h
@@ -3,6 +3,8 @@
#include <vdr/menuitems.h>
+#define memberof(x) (sizeof(x)/sizeof(*x))
+
class cDVDSwitchSetup
{
public:
@@ -66,16 +68,15 @@ class cDVDSwitchSetup
cDVDSwitchSetup(void);
~cDVDSwitchSetup(void);
void Init(void);
- bool SetupParse(const char *Name, const char *Value);
- void Debug(void);
+ bool SetupParse(const char *Name, const char *Value, cImageList &ImageList);
- void SetConfDir(char *value)
+ void SetConfDir(const char *value)
{
- strcpy(ConfigDirectory, value);
- strcpy(DVDLink, ConfigDirectory);
- strcat(DVDLink, "/dvdlink");
+ strncpy(ConfigDirectory, value, memberof(ConfigDirectory));
+ strncpy(DVDLink, ConfigDirectory, memberof(DVDLink));
+ strncat(DVDLink, "/dvdlink", memberof(DVDLink));
}
- void SetDVDDevice(char *value) { strcpy(DVDLinkOrg, value); }
+ void SetDVDDevice(const char *value) { strncpy(DVDLinkOrg, value, memberof(DVDLinkOrg)); }
};
class cMenuSetupDVDSwitch : public cMenuSetupPage
@@ -92,12 +93,13 @@ class cMenuSetupDVDSwitch : public cMenuSetupPage
int ViewNavPos;
bool ViewKey;
int ViewKeyPos;
+ cImageList &ImageList;
protected:
void Set(void);
virtual void Store(void);
virtual eOSState ProcessKey(eKeys Key);
public:
- cMenuSetupDVDSwitch(void);
+ cMenuSetupDVDSwitch(cImageList &ImageList);
};
class cMenuEditCatItem : public cOsdItem