diff options
author | Javier Fernandez <jfernandez@igalia.com> | 2013-04-10 16:56:23 +0000 |
---|---|---|
committer | Javier Fernandez <jfernandez@igalia.com> | 2013-04-11 13:20:47 +0000 |
commit | 288c59dea0a39ff0ae4416e405d9e03f18986fe6 (patch) | |
tree | d15de7c28a90b335e2bf57fb4f8c2e56006b5678 | |
parent | c9c4d0f92ff04064192b2a1f921cd214896f7731 (diff) |
Adding keyListenners for testing purposes.
Change-Id: I2593ef02be9ebd940a5865bfbdf305b5b958e9c0
-rw-r--r-- | wizards/com/sun/star/wizards/web/WWD_Events.py | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/wizards/com/sun/star/wizards/web/WWD_Events.py b/wizards/com/sun/star/wizards/web/WWD_Events.py index 407301e57bcb..8c86802d9248 100644 --- a/wizards/com/sun/star/wizards/web/WWD_Events.py +++ b/wizards/com/sun/star/wizards/web/WWD_Events.py @@ -17,6 +17,8 @@ # import traceback import uno +import time + #from common.Desktop import Desktop from .WWD_Startup import WWD_Startup from .WWD_General import WWD_General @@ -24,6 +26,7 @@ from .WebWizardConst import * from ..common.FileAccess import FileAccess from ..common.Configuration import Configuration from ..ui.event.ListModelBinder import ListModelBinder +from ..ui.event.CommonListener import KeyListenerProcAdapter from ..ui.event.Task import Task from .data.CGDocument import CGDocument from .data.CGSession import CGSession @@ -59,9 +62,10 @@ class WWD_Events(WWD_Startup): def __init__(self, xmsf): super(WWD_Events, self).__init__(xmsf) - self.chkFTP.addKeyListener(None) - self.chkLocalDir.addKeyListener(None) - self.chkZip.addKeyListener(None) + c = KeyListenerProcAdapter(self.keyPressed) + self.chkFTP.addKeyListener(c) + self.chkLocalDir.addKeyListener(c) + self.chkZip.addKeyListener(c) self.currentSession = "" self.exitOnCreate = True self.time = 0 @@ -98,6 +102,18 @@ class WWD_Events(WWD_Startup): if sessionToLoad is not self.currentSession: self.loadSession(sessionToLoad) + def keyPressed(self, ke): + if (ke.KeyChar == '&'): + self.time = time.time() + elif (ke.KeyChar == '%' and ((time.time() - self.time) < 300)): + b = self.xDialogModel.btnWizardFinish.Enabled + if (b): + print ("DEBUG !!! keyPressed -- Finish button ENABLED ") + self.finishWizard1(False) + else: + print ("DEBUG !!! keyPressed -- Finish button DISABLED ") + + ''' ************** STEP 1 |