strongwind r16 - in trunk: . strongwind
- From: btaylor svn gnome org
- To: svn-commits-list gnome org
- Subject: strongwind r16 - in trunk: . strongwind
- Date: Thu, 26 Jun 2008 22:49:41 +0000 (UTC)
Author: btaylor
Date: Thu Jun 26 22:49:41 2008
New Revision: 16
URL: http://svn.gnome.org/viewvc/strongwind?rev=16&view=rev
Log:
2008-06-26 Brad Taylor <brad getcoded net>
* strongwind/accessibles.py: Add an overload to keyCombo to control
whether we grabFocus first or not. This is especially important when
you're trying to control focus with keyCombo.
Modified:
trunk/ChangeLog
trunk/strongwind/accessibles.py
Modified: trunk/strongwind/accessibles.py
==============================================================================
--- trunk/strongwind/accessibles.py (original)
+++ trunk/strongwind/accessibles.py Thu Jun 26 22:49:41 2008
@@ -376,7 +376,7 @@
pyatspi.Registry.generateKeyboardEvent(key, None, pyatspi.KEY_SYM)
# adapted from script_playback.py
- def keyCombo(self, combo):
+ def keyCombo(self, combo, grabFocus=True):
'Focus this Accessible and press a combination of keys simultaneously'
import gtk.gdk
@@ -412,11 +412,12 @@
keys.append(key)
modifiers = map(ModifierKeyCodes.get, keys[:-1])
-
- try:
- self.grabFocus()
- except:
- pass
+
+ if grabFocus:
+ try:
+ self.grabFocus()
+ except:
+ pass
sleep(config.SHORT_DELAY)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]