[orca/gnome-3-14] Revert "Create new tutorial message for activating browse mode"
- From: Joanmarie Diggs <joanied src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [orca/gnome-3-14] Revert "Create new tutorial message for activating browse mode"
- Date: Tue, 23 Sep 2014 13:39:12 +0000 (UTC)
commit a073f3effa5fcac24687c953528dcbbc8975f8fe
Author: Joanmarie Diggs <jdiggs igalia com>
Date: Tue Sep 23 09:38:24 2014 -0400
Revert "Create new tutorial message for activating browse mode"
This reverts commit 5de9bc5d0aeba7570a4c4407f765b83771107748.
Forgot about the new string
src/orca/messages.py | 19 -----------
.../scripts/toolkits/Gecko/tutorial_generator.py | 14 ++------
src/orca/tutorialgenerator.py | 34 +++-----------------
3 files changed, 8 insertions(+), 59 deletions(-)
---
diff --git a/src/orca/messages.py b/src/orca/messages.py
index b8f7476..9ab7d24 100644
--- a/src/orca/messages.py
+++ b/src/orca/messages.py
@@ -1105,25 +1105,6 @@ MODE_BROWSE = _("Browse mode")
# This string is the message presented when Orca switches to focus mode.
MODE_FOCUS = _("Focus mode")
-# Translators: Orca has a number of commands that override the default
-# behavior within an application. For instance, on a web page, "h" moves
-# you to the next heading. What should happen when you press an "h" in
-# an entry on a web page depends: If you want to resume reading content,
-# "h" should move to the next heading; if you want to enter text, "h"
-# should not not move you to the next heading. Similarly, if you are
-# at the bottom of an entry and press Down arrow, should you leave the
-# entry? Again, it depends on if you want to resume reading content or
-# if you are editing the text in the entry. Because Orca doesn't know
-# what you want to do, it has two modes: In browse mode, Orca treats
-# key presses as commands to read the content; in focus mode, Orca treats
-# key presses as something that should be handled by the focused widget.
-# This string is a tutorial message presented to the user who has just
-# navigated to a widget in browse mode to inform them of the keystroke
-# they must press to enable focus mode for the purposes of interacting
-# with the widget. The substituted string is a human-consumable keybinding
-# such as "Alt+Shift+A."
-MODE_FOCUS_TUTORIAL = _("To enable focus mode press %s.")
-
# Translators: (Please see the previous, detailed translator notes about
# Focus mode and Browse mode.) In order to minimize the amount of work Orca
# users need to do to switch between focus mode and browse mode, Orca attempts
diff --git a/src/orca/scripts/toolkits/Gecko/tutorial_generator.py
b/src/orca/scripts/toolkits/Gecko/tutorial_generator.py
index 9f95072..63cd4cd 100644
--- a/src/orca/scripts/toolkits/Gecko/tutorial_generator.py
+++ b/src/orca/scripts/toolkits/Gecko/tutorial_generator.py
@@ -23,24 +23,16 @@ __date__ = "$Date$"
__copyright__ = "Copyright (c) 2014 Orca Team."
__license__ = "LGPL"
-import orca.messages as messages
import orca.tutorialgenerator as tutorial_generator
class TutorialGenerator(tutorial_generator.TutorialGenerator):
def __init__(self, script):
tutorial_generator.TutorialGenerator.__init__(self, script)
- def _getFocusModeTutorial(self, obj, alreadyFocused, forceTutorial):
- binding = self._getBindingsForHandler("togglePresentationModeHandler")
- if not binding:
- return []
-
- return [messages.MODE_FOCUS_TUTORIAL % binding]
-
- def _getModeTutorial(self, obj, alreadyFocused, forceTutorial):
+ def getTutorial(self, obj, alreadyFocused, forceTutorial=False):
if self._script.utilities.isFocusModeWidget(obj) \
and not self._script.useFocusMode(obj):
- return self._getFocusModeTutorial(obj, alreadyFocused, forceTutorial)
+ return []
- return tutorial_generator.TutorialGenerator._getModeTutorial(
+ return tutorial_generator.TutorialGenerator.getTutorial(
self, obj, alreadyFocused, forceTutorial)
diff --git a/src/orca/tutorialgenerator.py b/src/orca/tutorialgenerator.py
index e16b100..e20f2f7 100644
--- a/src/orca/tutorialgenerator.py
+++ b/src/orca/tutorialgenerator.py
@@ -51,8 +51,6 @@ class TutorialGenerator:
# storing the last spoken message.
self.lastTutorial = ""
- self.lastRole = None
-
# Set up a dictionary that maps role names to functions
# that generate tutorial strings for objects that implement that role.
#
@@ -766,21 +764,6 @@ class TutorialGenerator:
return utterances
- def _getBindingsForHandler(self, handlerName):
- handler = self._script.inputEventHandlers.get(handlerName)
- if not handler:
- return None
-
- bindings = self._script.keyBindings.getBindingsForHandler(handler)
- if not bindings:
- return None
-
- binding = bindings[0]
- return binding.asString()
-
- def _getModeTutorial(self, obj, alreadyFocused, forceTutorial):
- return []
-
def getTutorial(self, obj, alreadyFocused, forceTutorial=False):
"""Get the tutorial for an Accessible object. This will look
first to the specific tutorial generators and if this
@@ -804,23 +787,16 @@ class TutorialGenerator:
utterances = []
role = obj.getRole()
- msg = self._getModeTutorial(obj, alreadyFocused, forceTutorial)
- if not msg:
- if role in self.tutorialGenerators:
- generator = self.tutorialGenerators[role]
- else:
- generator = self._getDefaultTutorial
- msg = generator(obj, alreadyFocused, forceTutorial)
- elif msg == self.lastTutorial and role == self.lastRole \
- and not forceTutorial:
- msg = []
+ if role in self.tutorialGenerators:
+ generator = self.tutorialGenerators[role]
+ else:
+ generator = self._getDefaultTutorial
+ msg = generator(obj, alreadyFocused, forceTutorial)
if msg:
utterances = [" ".join(msg)]
self.lastTutorial = msg
- self.lastRole = role
if forceTutorial:
self.lastTutorial = ""
- self.lastRole = None
self._debugGenerator("getTutorial",
obj,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]