[orca] Remove the listener for Firefox 2's object:link-selected events
- From: Joanmarie Diggs <joanied src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [orca] Remove the listener for Firefox 2's object:link-selected events
- Date: Mon, 4 Nov 2013 13:30:21 +0000 (UTC)
commit 02444a06ac143b4b20bdcfb2f58b4670c351b6bb
Author: Joanmarie Diggs <jdiggs igalia com>
Date: Mon Nov 4 08:29:28 2013 -0500
Remove the listener for Firefox 2's object:link-selected events
src/orca/scripts/default.py | 22 ----------------
src/orca/scripts/toolkits/Gecko/script.py | 40 -----------------------------
2 files changed, 0 insertions(+), 62 deletions(-)
---
diff --git a/src/orca/scripts/default.py b/src/orca/scripts/default.py
index ccb8a0c..93180a6 100644
--- a/src/orca/scripts/default.py
+++ b/src/orca/scripts/default.py
@@ -527,8 +527,6 @@ class Script(script.Script):
self.onActiveDescendantChanged
listeners["object:children-changed"] = \
self.onChildrenChanged
- listeners["object:link-selected"] = \
- self.onLinkSelected
listeners["object:state-changed:active"] = \
self.onStateChanged
listeners["object:state-changed:focused"] = \
@@ -2349,26 +2347,6 @@ class Script(script.Script):
orca.setLocusOfFocus(event, newFocus)
- def onLinkSelected(self, event):
- """Called when a hyperlink is selected in a text area.
-
- Arguments:
- - event: the Event
- """
-
- # [[[TODO: WDW - HACK one might think we could expect an
- # application to keep its name, but it appears as though
- # yelp has an identity problem and likes to start calling
- # itself "yelp," but then changes its name to "Mozilla"
- # on Fedora Core 4 after the user selects a link. So, we'll
- # just assume that link-selected events always come from the
- # application with focus.]]]
- #
- #if orca_state.locusOfFocus \
- # and (orca_state.locusOfFocus.app == event.source.app):
- # orca.setLocusOfFocus(event, event.source)
- orca.setLocusOfFocus(event, event.source)
-
def onMouseButton(self, event):
"""Called whenever the user presses or releases a mouse button.
diff --git a/src/orca/scripts/toolkits/Gecko/script.py b/src/orca/scripts/toolkits/Gecko/script.py
index 165f61c..231d420 100644
--- a/src/orca/scripts/toolkits/Gecko/script.py
+++ b/src/orca/scripts/toolkits/Gecko/script.py
@@ -1361,46 +1361,6 @@ class Script(default.Script):
default.Script.onFocus(self, event)
- def onLinkSelected(self, event):
- """Called when a link gets selected. Note that in Firefox 3,
- link selected events are not issued when a link is selected.
- Instead, a focus: event is issued. This is 'old' code left
- over from Yelp and Firefox 2.
-
- Arguments:
- - event: the Event
- """
-
- text = self.utilities.queryNonEmptyText(event.source)
- hypertext = event.source.queryHypertext()
- linkIndex = self.utilities.linkIndex(event.source, text.caretOffset)
-
- if linkIndex >= 0:
- link = hypertext.getLink(linkIndex)
- linkText = text.getText(link.startIndex, link.endIndex)
- #[string, startOffset, endOffset] = text.getTextAtOffset(
- # text.caretOffset,
- # pyatspi.TEXT_BOUNDARY_LINE_START)
- #print "onLinkSelected", event.source.getRole() , string,
- #print " caretOffset: ", text.caretOffset
- #print " line startOffset:", startOffset
- #print " line endOffset: ", startOffset
- #print " caret in line: ", text.caretOffset - startOffset
- speech.speak(linkText, self.voices[settings.HYPERLINK_VOICE])
- elif text:
- # We'll just assume the whole thing is a link. This happens
- # in yelp when we navigate the table of contents of something
- # like the Desktop Accessibility Guide.
- #
- linkText = text.getText(0, -1)
- speech.speak(linkText, self.voices[settings.HYPERLINK_VOICE])
- else:
- speech.speak(
- self.speechGenerator.getLocalizedRoleName(event.source),
- self.voices[settings.HYPERLINK_VOICE])
-
- self.updateBraille(event.source)
-
def onStateChanged(self, event):
"""Called whenever an object's state changes.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]