summaryrefslogtreecommitdiff
path: root/setup_menu.c
diff options
context:
space:
mode:
authorMatti Lehtimäki <matti.lehtimaki@gmail.com>2013-01-07 21:29:45 +0200
committerMatti Lehtimäki <matti.lehtimaki@gmail.com>2013-01-07 21:29:45 +0200
commitc6ffcc01aa82582b119de294ff40aac915c88e19 (patch)
treeac6881e6c72f9f2511bcbff7d5d29607a9ff9711 /setup_menu.c
downloadvdr-plugin-history-c6ffcc01aa82582b119de294ff40aac915c88e19.tar.gz
vdr-plugin-history-c6ffcc01aa82582b119de294ff40aac915c88e19.tar.bz2
Initial commit. Version 0.0.3.v0.0.3
Diffstat (limited to 'setup_menu.c')
-rwxr-xr-xsetup_menu.c44
1 files changed, 44 insertions, 0 deletions
diff --git a/setup_menu.c b/setup_menu.c
new file mode 100755
index 0000000..f96b470
--- /dev/null
+++ b/setup_menu.c
@@ -0,0 +1,44 @@
+/*
+ * setup_menu.c: Setup Menu
+ *
+ * See the README file for copyright information and how to reach the author.
+ *
+ */
+
+#include "setup_menu.h"
+#include <vdr/config.h>
+#include <vdr/i18n.h>
+
+//--- cHistorySetupMenu ------------------------------------------------------
+
+cHistorySetupMenu::cHistorySetupMenu(void)
+{
+ memcpy(&newconfig, &HistorySetup, sizeof(cHistorySetup));
+ Set();
+}
+
+void cHistorySetupMenu::Set(void)
+{
+ Clear();
+ Add(new cMenuEditBoolItem(tr("Allow file delete"),
+ &newconfig.allow_delete));
+ Add(new cMenuEditIntItem(tr("Replay history size"),
+ &newconfig.replay_history_size), 0);
+ Display();
+}
+
+void cHistorySetupMenu::Store(void)
+{
+ memcpy(&HistorySetup, &newconfig, sizeof(cHistorySetup));
+
+ SetupStore("AllowDelete", HistorySetup.allow_delete);
+ SetupStore("ReplayHistorySize", HistorySetup.replay_history_size);
+
+ Setup.Save();
+}
+
+eOSState cHistorySetupMenu::ProcessKey(eKeys Key)
+{
+ eOSState state = cMenuSetupPage::ProcessKey(Key);
+ return state;
+}