[orca] By default, any selection change on CALLY means a change on locusOfFocus
- From: Alejandro Piñeiro Iglesias <apinheiro src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [orca] By default, any selection change on CALLY means a change on locusOfFocus
- Date: Wed, 9 Mar 2011 09:08:44 +0000 (UTC)
commit fc948e0f6229c072abcd06b93b99bcae8b83cf89
Author: Alejandro Piñeiro <apinheiro igalia com>
Date: Wed Mar 9 10:08:23 2011 +0100
By default, any selection change on CALLY means a change on locusOfFocus
src/orca/scripts/toolkits/CALLY/script.py | 26 +++++++++++++++++++++++++-
1 files changed, 25 insertions(+), 1 deletions(-)
---
diff --git a/src/orca/scripts/toolkits/CALLY/script.py b/src/orca/scripts/toolkits/CALLY/script.py
index 808599f..94f795f 100644
--- a/src/orca/scripts/toolkits/CALLY/script.py
+++ b/src/orca/scripts/toolkits/CALLY/script.py
@@ -25,11 +25,11 @@ __date__ = "$Date$"
__copyright__ = "Copyright (c) 2010 Igalia, S.L."
__license__ = "LGPL"
+import orca.orca as orca
import orca.scripts.default as default
import orca.debug as debug
import gtk.gdk as gdk
-
# Set with non printable unicode categories. Full table:
# http://www.fileformat.info/info/unicode/category/index.htm
#
@@ -178,4 +178,28 @@ class Script(default.Script):
return default.Script.checkKeyboardEventData(self, keyboardEvent)
+ # NOTE: right now this is being redefined just for GNOME Shell, so
+ # the proper place would be a GNOME Shell script. Anyway, as right
+ # now GNOME Shell is the only Clutter application we care, for the
+ # moment this is a proper place
+
+ def onStateChanged(self, event):
+ """Called whenever an object's state changes.
+
+ Arguments:
+ - event: the Event
+ """
+
+ # We override the behaviour for the selection
+ if event.type.startswith("object:state-changed:selected"):
+ # For the moment we announce any selection change
+
+ if event.source is not None:
+ debug.println(debug.LEVEL_FINE,
+ "[cally] new locus_of_focus: %s" \
+ % event.source.name)
+
+ orca.setLocusOfFocus (event, event.source)
+ else: #in any other case, we use the default behaviour
+ default.Script.onStateChanged(self, event)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]