[orca/orca-xdesktop] Fix for bug 657579 - Orca should not present tooltips shown as a result of mouse hovering unless the
- From: Joanmarie Diggs <joanied src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [orca/orca-xdesktop] Fix for bug 657579 - Orca should not present tooltips shown as a result of mouse hovering unless the
- Date: Mon, 29 Aug 2011 01:01:30 +0000 (UTC)
commit 0a10d62b5cec3e3f3cd0183b35b4efde3cd815c6
Author: Joanmarie Diggs <joanmarie diggs gmail com>
Date: Sun Aug 28 21:00:08 2011 -0400
Fix for bug 657579 - Orca should not present tooltips shown as a result of mouse hovering unless the 'present tooltips' setting is enabled
src/orca/scripts/default.py | 34 ++++++++++++++++++++--------------
1 files changed, 20 insertions(+), 14 deletions(-)
---
diff --git a/src/orca/scripts/default.py b/src/orca/scripts/default.py
index 04b55cf..542a819 100644
--- a/src/orca/scripts/default.py
+++ b/src/orca/scripts/default.py
@@ -3361,20 +3361,26 @@ class Script(script.Script):
# Handle tooltip popups.
#
if event.source.getRole() == pyatspi.ROLE_TOOL_TIP:
- obj = event.source
- if event.type.startswith("object:state-changed:showing"):
- if event.detail1 == 1:
- self.presentToolTip(obj)
- elif orca_state.locusOfFocus:
- keyString, mods = self.utilities.lastKeyAndModifiers()
- if keyString == "F1":
- self.updateBraille(orca_state.locusOfFocus)
- utterances = self.speechGenerator.generateSpeech(
- orca_state.locusOfFocus)
- utterances.extend(self.tutorialGenerator.getTutorial(
- orca_state.locusOfFocus, False))
- speech.speak(utterances)
- return
+ if not event.type.startswith("object:state-changed:showing"):
+ return
+
+ keyString, mods = self.utilities.lastKeyAndModifiers()
+ if keyString != "F1" \
+ and not _settingsManager.getSetting('presentToolTips'):
+ return
+
+ if event.detail1 == 1:
+ self.presentToolTip(event.source)
+ return
+
+ if orca_state.locusOfFocus and keyString == "F1":
+ obj = orca_state.locusOfFocus
+ self.updateBraille(obj)
+ utterances = self.speechGenerator.generateSpeech(obj)
+ utterances.extend(
+ self.tutorialGenerator.getTutorial(obj, False))
+ speech.speak(utterances)
+ return
if event.source.getRole() in state_change_notifiers:
notifiers = state_change_notifiers[event.source.getRole()]
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]