aboutsummaryrefslogtreecommitdiff
path: root/lib/python/Screens
diff options
context:
space:
mode:
authorFelix Domke <tmbinc@elitedvb.net>2005-05-14 15:23:23 +0000
committerFelix Domke <tmbinc@elitedvb.net>2005-05-14 15:23:23 +0000
commit7bc4a59528ab13f3062dc1520e76f9ecedd87400 (patch)
tree9d6e91be12147eee77d82ec5b49c24ae44f85bd3 /lib/python/Screens
parentab8d418f82b2835c267d88ded5d748a6f0e8a852 (diff)
downloadenigma2-7bc4a59528ab13f3062dc1520e76f9ecedd87400.tar.gz
enigma2-7bc4a59528ab13f3062dc1520e76f9ecedd87400.zip
- work on timers
- add eInput widget - add python/Tools - add flexible listbox content
Diffstat (limited to 'lib/python/Screens')
-rw-r--r--lib/python/Screens/Menu.py4
-rw-r--r--lib/python/Screens/Screen.py1
-rw-r--r--lib/python/Screens/TimerEdit.py54
-rw-r--r--lib/python/Screens/__init__.py3
4 files changed, 59 insertions, 3 deletions
diff --git a/lib/python/Screens/Menu.py b/lib/python/Screens/Menu.py
index ce73a954..c3809318 100644
--- a/lib/python/Screens/Menu.py
+++ b/lib/python/Screens/Menu.py
@@ -11,6 +11,8 @@ from Components.Label import Label
from Components.ProgressBar import ProgressBar
from ConfigMenu import *
+from TimerEdit import *
+
from enigma import quitMainloop
import xml.dom.minidom
@@ -32,7 +34,7 @@ mdom = xml.dom.minidom.parseString(
<item text="Radio-Mode">self.setModeRadio()</item>
<item text="File-Mode">self.setModeFile()</item>
<item text="Scart">self.openDialog(ScartLoopThrough)</item>
- <item text="Timer"></item>
+ <item text="Timer">self.openDialog(TimerEditList)</item>
<menu text="Setup">
<menu text="Service Organising">
<item text="New Bouquets"></item>
diff --git a/lib/python/Screens/Screen.py b/lib/python/Screens/Screen.py
index ef9b2bb0..1b42141a 100644
--- a/lib/python/Screens/Screen.py
+++ b/lib/python/Screens/Screen.py
@@ -29,7 +29,6 @@ class Screen(dict, HTMLSkin, GUISkin):
del self.session
for (name, val) in self.items():
- print "%s -> %d" % (name, sys.getrefcount(val))
del self[name]
def close(self, retval=None):
diff --git a/lib/python/Screens/TimerEdit.py b/lib/python/Screens/TimerEdit.py
new file mode 100644
index 00000000..41b6a12e
--- /dev/null
+++ b/lib/python/Screens/TimerEdit.py
@@ -0,0 +1,54 @@
+from Screen import Screen
+from Components.TimerList import TimerList, TimerEntry
+from Components.ActionMap import ActionMap
+from Components.TimeInput import TimeInput
+from Components.Label import Label
+from Components.Button import Button
+
+class TimerEdit(Screen):
+ def __init__(self, session, entry):
+ Screen.__init__(self, session)
+
+ self["actions"] = ActionMap(["OkCancelActions"],
+ {
+ "ok": self.apply,
+ "cancel": self.close
+ })
+
+ self.entry = entry
+ # begin, end, description, service
+ self["begin"] = TimeInput()
+ self["end"] = TimeInput()
+
+ self["lbegin"] = Label("Begin")
+ self["lend"] = Label("End")
+
+ self["description"] = Label("bla")
+# TextInput()
+ self["apply"] = Button("Apply")
+ self["service"] = Button()
+
+ def apply(self):
+ print "applied!"
+
+class TimerEditList(Screen):
+ def __init__(self, session):
+ Screen.__init__(self, session)
+
+ list = [ ]
+ for timer in session.nav.RecordTimer.timer_list:
+ list.append(TimerEntry(timer, 0))
+
+ for timer in session.nav.RecordTimer.processed_timers:
+ list.append(TimerEntry(timer, 1))
+
+ self["timerlist"] = TimerList(list)
+
+ self["actions"] = ActionMap(["OkCancelActions"],
+ {
+ "ok": self.openEdit,
+ "cancel": self.close
+ })
+
+ def openEdit(self):
+ self.session.open(TimerEdit, self["timerlist"].getCurrent())
diff --git a/lib/python/Screens/__init__.py b/lib/python/Screens/__init__.py
index 90b22c27..fbd2c173 100644
--- a/lib/python/Screens/__init__.py
+++ b/lib/python/Screens/__init__.py
@@ -1,3 +1,4 @@
__all__ = ["ChannelSelection", "ClockDisplay", "ConfigMenu",
- "InfoBar", "Menu", "ScartLoopThrough", "Screen", "ServiceScan"]
+ "InfoBar", "Menu", "ScartLoopThrough", "Screen", "ServiceScan",
+ "TimerEdit"]