summaryrefslogtreecommitdiff
path: root/plugin/setup.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'plugin/setup.cpp')
-rw-r--r--plugin/setup.cpp69
1 files changed, 69 insertions, 0 deletions
diff --git a/plugin/setup.cpp b/plugin/setup.cpp
new file mode 100644
index 0000000..3b51a1f
--- /dev/null
+++ b/plugin/setup.cpp
@@ -0,0 +1,69 @@
+/*
+ * setup.cpp: A plugin for the Video Disk Recorder
+ *
+ * See the README file for copyright information and how to reach the author.
+ *
+ */
+
+#include "setup.h"
+
+cSetupMarkAd::cSetupMarkAd(struct setup *Setup)
+{
+ setup=Setup;
+
+ processduring=(int) setup->ProcessDuring;
+ whilerecording=setup->whileRecording;
+ whileplaying=setup->whilePlaying;
+
+ processTexts[0]=tr("after");
+ processTexts[1]=tr("during");
+
+ write();
+}
+
+void cSetupMarkAd::write(void)
+{
+
+ Clear();
+ Add(new cMenuEditStraItem(tr("execution"),&processduring,2,processTexts));
+ if (!processduring)
+ {
+ Add(new cMenuEditBoolItem(tr("while recording"),&whilerecording));
+ Add(new cMenuEditBoolItem(tr("while playing"),&whileplaying));
+ }
+ Display();
+}
+
+eOSState cSetupMarkAd::ProcessKey(eKeys Key)
+{
+
+ eOSState state=osUnknown;
+ switch (Key)
+ {
+ case kLeft:
+ state=cMenuSetupPage::ProcessKey(Key);
+ if (Current()==0) write();
+ break;
+
+ case kRight:
+ state=cMenuSetupPage::ProcessKey(Key);
+ if (Current()==0) write();
+ break;
+
+ default:
+ state=cMenuSetupPage::ProcessKey(Key);
+ break;
+ }
+ return state;
+}
+
+void cSetupMarkAd::Store(void)
+{
+ SetupStore("Execution",processduring);
+ SetupStore("whileRecording",whilerecording);
+ SetupStore("whilePlaying",whileplaying);
+
+ setup->ProcessDuring=(bool) processduring;
+ setup->whileRecording=(bool) whilerecording;
+ setup->whilePlaying=(bool) whileplaying;
+}