diff options
| author | Felix Domke <tmbinc@elitedvb.net> | 2005-01-27 06:25:40 +0000 |
|---|---|---|
| committer | Felix Domke <tmbinc@elitedvb.net> | 2005-01-27 06:25:40 +0000 |
| commit | 84670d3dc9c9dc29fd3af42b2f25092b3b6c2a09 (patch) | |
| tree | 2b6dd112784a6958665dcd54aeaa42ef9ea94472 /mytest.py | |
| parent | f9723e7fbf7669f063151eaf53bb1ee9f4189289 (diff) | |
| download | enigma2-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.py | 25 |
1 files changed, 19 insertions, 6 deletions
@@ -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() |
