aboutsummaryrefslogtreecommitdiff
path: root/mytest.py
diff options
context:
space:
mode:
authorFelix Domke <tmbinc@elitedvb.net>2005-01-27 06:25:40 +0000
committerFelix Domke <tmbinc@elitedvb.net>2005-01-27 06:25:40 +0000
commit84670d3dc9c9dc29fd3af42b2f25092b3b6c2a09 (patch)
tree2b6dd112784a6958665dcd54aeaa42ef9ea94472 /mytest.py
parentf9723e7fbf7669f063151eaf53bb1ee9f4189289 (diff)
downloadenigma2-84670d3dc9c9dc29fd3af42b2f25092b3b6c2a09.tar.gz
enigma2-84670d3dc9c9dc29fd3af42b2f25092b3b6c2a09.zip
- add rcconsole key input (for now)
- very basic method of delivering keys into python (will be changed, of course)
Diffstat (limited to 'mytest.py')
-rw-r--r--mytest.py25
1 files changed, 19 insertions, 6 deletions
diff --git a/mytest.py b/mytest.py
index c0967d78..b3d1701c 100644
--- a/mytest.py
+++ b/mytest.py
@@ -6,6 +6,13 @@ import time
from screens import *
from skin import applyGUIskin
+
+def CONNECT(slot, fnc):
+ slot.get().append(fnc)
+
+def DISCONNECT(slot, fnc):
+ slot.get().remove(fnc)
+
# A screen is a function which instanciates all components of a screen into a temporary component.
# Thus, the global stuff is a screen, too.
# In a screen, components can either be instanciated from the class-tree, cloned (copied) or
@@ -92,6 +99,9 @@ class Session:
else:
self.currentWindow = None
+ def keyEvent(self, code):
+ self.currentDialog.data["okbutton"]["instance"].push()
+
def close(self):
self.delayTimer.start(0, 1)
@@ -106,12 +116,15 @@ def runScreenTest():
# active "okbutton", even when we changed the dialog
#
# more complicated reason: we don't want to hold a reference.
- def blub():
- session.currentDialog.data["okbutton"]["instance"].push()
-
- tmr = eTimer()
- tmr.timeout.get().append(blub)
- tmr.start(4000, 0)
+# def blub():
+# session.currentDialog.data["okbutton"]["instance"].push()
+# session.currentDialog["okbutton"].setText("hello!")
+#
+# tmr = eTimer()
+# CONNECT(tmr.timeout, blub)
+# tmr.start(4000, 0)
+#
+ CONNECT(keyPressedSignal(), session.keyEvent)
runMainloop()