[orca] The menu item tutorial message should suggest Return rather than Space
- From: Joanmarie Diggs <joanied src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [orca] The menu item tutorial message should suggest Return rather than Space
- Date: Wed, 4 Apr 2012 21:25:40 +0000 (UTC)
commit a06b27c252e4145fbab2aca8b110bd6977ce22ed
Author: Joanmarie Diggs <jdiggs igalia com>
Date: Wed Apr 4 17:24:48 2012 -0400
The menu item tutorial message should suggest Return rather than Space
src/orca/tutorialgenerator.py | 28 +++++++++++++++++++++++++++-
1 files changed, 27 insertions(+), 1 deletions(-)
---
diff --git a/src/orca/tutorialgenerator.py b/src/orca/tutorialgenerator.py
index 1a63b64..0b85bf1 100644
--- a/src/orca/tutorialgenerator.py
+++ b/src/orca/tutorialgenerator.py
@@ -93,7 +93,7 @@ class TutorialGenerator:
self.tutorialGenerators[pyatspi.ROLE_CHECK_MENU_ITEM] = \
self._getTutorialForCheckBox
self.tutorialGenerators[pyatspi.ROLE_MENU_ITEM] = \
- self._getTutorialForPushButton
+ self._getTutorialForMenuItem
self.tutorialGenerators[pyatspi.ROLE_RADIO_MENU_ITEM] = \
self._getTutorialForCheckBox
self.tutorialGenerators[pyatspi.ROLE_SLIDER] = \
@@ -372,6 +372,32 @@ class TutorialGenerator:
utterances)
return utterances
+ def _getTutorialForMenuItem(self, obj, alreadyFocused, forceTutorial):
+ """Get the tutorial string for a menu item
+
+ Arguments:
+ - obj: the menu item
+ - alreadyFocused: False if object just received focus
+ - forceTutorial: used for when whereAmI really needs the tutorial string
+
+ Returns a list of utterances to be spoken for the object.
+ """
+
+ utterances = []
+ # Translators: this is the tutorial string for activating a menu item
+ msg = _("To activate press return.")
+
+ if (not alreadyFocused and self.lastTutorial != [msg]) \
+ or forceTutorial:
+ utterances.append(msg)
+
+ self._debugGenerator("_getTutorialForMenuItem",
+ obj,
+ alreadyFocused,
+ utterances)
+
+ return utterances
+
def _getTutorialForText(self, obj, alreadyFocused, forceTutorial):
"""Get the tutorial string for a text object.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]