[orca] Fix for bug 591871 - Orca says "off" for all push buttons on the LibreOffice toolbars and doesn't sa
- From: Joanmarie Diggs <joanied src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [orca] Fix for bug 591871 - Orca says "off" for all push buttons on the LibreOffice toolbars and doesn't sa
- Date: Mon, 7 Jan 2013 14:43:18 +0000 (UTC)
commit 25bba860926eca453a0bf347e4b90d1d419cd88f
Author: Joanmarie Diggs <jdiggs igalia com>
Date: Mon Jan 7 09:42:40 2013 -0500
Fix for bug 591871 - Orca says "off" for all push buttons on the LibreOffice toolbars and doesn't say "on" when it should
src/orca/scripts/apps/soffice/speech_generator.py | 11 ++++-------
1 files changed, 4 insertions(+), 7 deletions(-)
---
diff --git a/src/orca/scripts/apps/soffice/speech_generator.py b/src/orca/scripts/apps/soffice/speech_generator.py
index cf662e9..18c314c 100644
--- a/src/orca/scripts/apps/soffice/speech_generator.py
+++ b/src/orca/scripts/apps/soffice/speech_generator.py
@@ -58,10 +58,8 @@ class SpeechGenerator(speech_generator.SpeechGenerator):
def _generateRoleName(self, obj, **args):
result = []
role = args.get('role', obj.getRole())
- if role in [pyatspi.ROLE_PUSH_BUTTON, pyatspi.ROLE_TOGGLE_BUTTON] \
+ if role == pyatspi.ROLE_TOGGLE_BUTTON \
and obj.parent.getRole() == pyatspi.ROLE_TOOL_BAR:
- # We don't speak roles for the objects in the toolbar.
- #
pass
else:
# Treat a paragraph which is serving as a text entry in a dialog
@@ -203,13 +201,12 @@ class SpeechGenerator(speech_generator.SpeechGenerator):
return result
def _generateToggleState(self, obj, **args):
- """Treat push buttons (which act like toggle buttons) and toggle
- buttons in the toolbar specially. This is so we can have more
- natural sounding speech such as "bold on", "bold off", etc."""
+ """Treat toggle buttons in the toolbar specially. This is so we can
+ have more natural sounding speech such as "bold on", "bold off", etc."""
acss = self.voice(speech_generator.SYSTEM)
result = []
role = args.get('role', obj.getRole())
- if role in [pyatspi.ROLE_PUSH_BUTTON, pyatspi.ROLE_TOGGLE_BUTTON] \
+ if role == pyatspi.ROLE_TOGGLE_BUTTON \
and obj.parent.getRole() == pyatspi.ROLE_TOOL_BAR:
if obj.getState().contains(pyatspi.STATE_CHECKED):
# Translators: this represents the state of a check box
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]