[orca/570658-whereami] Add handling of the frame tutorial message for icon panels.
- From: William Walker <wwalker src gnome org>
- To: svn-commits-list gnome org
- Subject: [orca/570658-whereami] Add handling of the frame tutorial message for icon panels.
- Date: Fri, 5 Jun 2009 13:44:45 -0400 (EDT)
commit 805587a1896cc4fb2e3e93fa697f14d36efe5cfe
Author: Joanmarie Diggs <joanmarie diggs gmail com>
Date: Fri Jun 5 12:11:47 2009 -0400
Add handling of the frame tutorial message for icon panels.
---
src/orca/formatting.py | 1 -
src/orca/speech_generator.py | 18 ++++++++++++++----
2 files changed, 14 insertions(+), 5 deletions(-)
diff --git a/src/orca/formatting.py b/src/orca/formatting.py
index 3f0d631..c915396 100644
--- a/src/orca/formatting.py
+++ b/src/orca/formatting.py
@@ -85,7 +85,6 @@ formatting = {
'unfocused': 'labelAndName + allTextSelection + roleName + unfocusedDialogCount + availability'
},
pyatspi.ROLE_ICON: {
- # Need to tack on tutorial for icon, then tutorial for frame and dialog.
'focused': 'labelAndName + imageDescription + roleName',
'unfocused': 'labelAndName + imageDescription + roleName',
'basicWhereAmI': 'parentRoleName + labelAndName + selectedItemCount',
diff --git a/src/orca/speech_generator.py b/src/orca/speech_generator.py
index 20c12a0..529e606 100644
--- a/src/orca/speech_generator.py
+++ b/src/orca/speech_generator.py
@@ -2011,12 +2011,22 @@ class SpeechGenerator:
tutorial generator. A tutorial can be forced by setting the
'forceTutorial' attribute of the args dictionary to True.
"""
+ result = []
alreadyFocused = args.get('alreadyFocused', False)
forceTutorial = args.get('forceTutorial', False)
- return self._script.tutorialGenerator.getTutorial(
- obj,
- alreadyFocused,
- forceTutorial)
+ result.extend(self._script.tutorialGenerator.getTutorial(
+ obj,
+ alreadyFocused,
+ forceTutorial))
+ if args.get('role', obj.getRole()) == pyatspi.ROLE_ICON \
+ and args.get('formatType', 'unfocused') == 'basicWhereAmI':
+ frame, dialog = self._script.findFrameAndDialog(obj)
+ if frame:
+ result.extend(self._script.tutorialGenerator.getTutorial(
+ frame,
+ alreadyFocused,
+ forceTutorial))
+ return result
#####################################################################
# #
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]