[orca] More work on the focus: deprecation
- From: Joanmarie Diggs <joanied src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [orca] More work on the focus: deprecation
- Date: Mon, 25 Nov 2013 15:35:07 +0000 (UTC)
commit d92b18614d765b52b529f02080040937854a2e99
Author: Joanmarie Diggs <jdiggs igalia com>
Date: Mon Nov 25 10:34:46 2013 -0500
More work on the focus: deprecation
src/orca/scripts/toolkits/GAIL/script.py | 9 +++++++++
src/orca/scripts/toolkits/gtk/script.py | 11 +++++++++++
2 files changed, 20 insertions(+), 0 deletions(-)
---
diff --git a/src/orca/scripts/toolkits/GAIL/script.py b/src/orca/scripts/toolkits/GAIL/script.py
index 1ad7e92..8c2d29f 100644
--- a/src/orca/scripts/toolkits/GAIL/script.py
+++ b/src/orca/scripts/toolkits/GAIL/script.py
@@ -52,6 +52,7 @@ class Script(default.Script):
# focus, such as in the old gnome-screensaver dialog.
if role in [pyatspi.ROLE_TEXT, pyatspi.ROLE_PASSWORD_TEXT]:
orca.setLocusOfFocus(event, event.source)
+ return
# Unfiled. When a context menu first appears and an item is already
# selected, we get a focus: event for that menu item, but there is
@@ -59,8 +60,16 @@ class Script(default.Script):
# event for the menu.
if role == pyatspi.ROLE_MENU_ITEM:
orca.setLocusOfFocus(event, event.source)
+ return
# Unfiled, but in at least some dialogs, the first time a push
# button gains focus, we only get a focus: event for it.
if role == pyatspi.ROLE_PUSH_BUTTON:
orca.setLocusOfFocus(event, event.source)
+ return
+
+ # Unfiled, but yet another case of only getting a focus: event when
+ # a widget appears in a parent container and is already focused.
+ if role == pyatspi.ROLE_TABLE:
+ orca.setLocusOfFocus(event, event.source)
+ return
diff --git a/src/orca/scripts/toolkits/gtk/script.py b/src/orca/scripts/toolkits/gtk/script.py
index 31598b1..8a2d9ba 100644
--- a/src/orca/scripts/toolkits/gtk/script.py
+++ b/src/orca/scripts/toolkits/gtk/script.py
@@ -70,10 +70,12 @@ class Script(default.Script):
# https://bugzilla.gnome.org/show_bug.cgi?id=711397
if role == pyatspi.ROLE_COMBO_BOX:
orca.setLocusOfFocus(event, event.source)
+ return
# Unfiled, but a similar case of the above issue with combo boxes.
if role == pyatspi.ROLE_PUSH_BUTTON:
orca.setLocusOfFocus(event, event.source)
+ return
# Unfiled. But this happens when you are in Gedit, get into a menu
# and then press Escape. The text widget emits a focus: event, but
@@ -83,6 +85,7 @@ class Script(default.Script):
# focus, such as in the old gnome-screensaver dialog.
if role in [pyatspi.ROLE_TEXT, pyatspi.ROLE_PASSWORD_TEXT]:
orca.setLocusOfFocus(event, event.source)
+ return
# Unfiled. When a context menu first appears and an item is already
# selected, we get a focus: event for that menu item, but there is
@@ -90,3 +93,11 @@ class Script(default.Script):
# event for the menu.
if role == pyatspi.ROLE_MENU_ITEM:
orca.setLocusOfFocus(event, event.source)
+ return
+
+ # Unfiled, but yet another case of only getting a focus: event when
+ # a widget appears in a parent container and is already focused.
+ # An example of this particular case is the list of elements dialogs.
+ if role == pyatspi.ROLE_TABLE:
+ orca.setLocusOfFocus(event, event.source)
+ return
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]