orca r3649 - in branches/gnome-2-22: . src/orca/scripts
- From: richb svn gnome org
- To: svn-commits-list gnome org
- Subject: orca r3649 - in branches/gnome-2-22: . src/orca/scripts
- Date: Wed, 27 Feb 2008 22:56:36 +0000 (GMT)
Author: richb
Date: Wed Feb 27 22:56:36 2008
New Revision: 3649
URL: http://svn.gnome.org/viewvc/orca?rev=3649&view=rev
Log:
* src/orca/scripts/gnome-terminal.py:
Fix for bug #518762 - When using gnome-terminal with multiple
tabs, the name on the tab is not announced when switching
between tabbed windows.
Modified:
branches/gnome-2-22/ChangeLog
branches/gnome-2-22/src/orca/scripts/gnome-terminal.py
Modified: branches/gnome-2-22/src/orca/scripts/gnome-terminal.py
==============================================================================
--- branches/gnome-2-22/src/orca/scripts/gnome-terminal.py (original)
+++ branches/gnome-2-22/src/orca/scripts/gnome-terminal.py Wed Feb 27 22:56:36 2008
@@ -78,6 +78,33 @@
return True
+ def locusOfFocusChanged(self, event, oldLocusOfFocus, newLocusOfFocus):
+ """Called when the visual object with focus changes.
+
+ Arguments:
+ - event: if not None, the Event that caused the change
+ - oldLocusOfFocus: Accessible that is the old locus of focus
+ - newLocusOfFocus: Accessible that is the new locus of focus
+ """
+
+ # If the new locus of focus has a role of "terminal", then update
+ # the braille display accordingly. Also speak the page tab that this
+ # terminal is in if it's sensitive (i.e. there are two or more tabs)
+ # and if the old locus of focus also had a "terminal role.
+ # See bug #518762 for more details.
+ #
+ if newLocusOfFocus.getRole() == pyatspi.ROLE_TERMINAL:
+ pageTab = event.source.parent.parent.parent
+ if oldLocusOfFocus.getRole() == pyatspi.ROLE_TERMINAL and \
+ pageTab.getRole() == pyatspi.ROLE_PAGE_TAB and \
+ pageTab.getState().contains(pyatspi.STATE_SENSITIVE):
+ self.updateBraille(newLocusOfFocus)
+ utterances = self.speechGenerator.getSpeech(pageTab, False)
+ speech.speakUtterances(utterances)
+
+ default.Script.locusOfFocusChanged(self, event,
+ oldLocusOfFocus, newLocusOfFocus)
+
#def onWindowActivated(self, event):
# # Sets the context to the top level window first, so we can
# # get information about it the window we just moved to.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]