orca r3539 - in trunk: . src/orca/scripts



Author: richb
Date: Wed Feb  6 19:42:48 2008
New Revision: 3539
URL: http://svn.gnome.org/viewvc/orca?rev=3539&view=rev

Log:
        * src/orca/scripts/StarOffice.py:
          Fix for bug #363830 - Provide feedback in OOo when toggling bold,
          underline, and italics.


Modified:
   trunk/ChangeLog
   trunk/src/orca/scripts/StarOffice.py
   trunk/src/orca/scripts/gedit.py

Modified: trunk/src/orca/scripts/StarOffice.py
==============================================================================
--- trunk/src/orca/scripts/StarOffice.py	(original)
+++ trunk/src/orca/scripts/StarOffice.py	Wed Feb  6 19:42:48 2008
@@ -801,13 +801,6 @@
           "right-margin:0mm; underline:none; strikethrough:none; " \
           "justification:left; style:normal;"
 
-        # [[[TODO: JD - HACK because we won't get events from toggle
-        # buttons on the Formatting toolbar until we "tickle/poke"
-        # the hierarchy. But we only want to do it once.
-        # See bug #363830 and OOo issue #70872.]]]
-        #
-        self.tickled = None
-
     def activate(self):
         """Called when this script is activated."""
         self.savedreadTableCellRow = settings.readTableCellRow
@@ -2226,17 +2219,6 @@
             if self.findCommandRun:
                 return
 
-            # [[[TODO: JD - HACK because we won't get events from toggle
-            # buttons on the Formatting toolbar until we "tickle/poke"
-            # the hierarchy. But we only want to do it once.
-            # See bug #363830 and OOo issue #70872.]]]
-            #
-            if not self.tickled:
-                frame = self.getFrame(event.source)
-                if frame:
-                    self.getObjects(frame)
-                    self.tickled = True
-
         # Announce when the toolbar buttons are toggled if we just toggled
         # them; not if we navigated to some text.
         #

Modified: trunk/src/orca/scripts/gedit.py
==============================================================================
--- trunk/src/orca/scripts/gedit.py	(original)
+++ trunk/src/orca/scripts/gedit.py	Wed Feb  6 19:42:48 2008
@@ -27,6 +27,7 @@
 
 import pyatspi
 
+import orca.braille as braille
 import orca.debug as debug
 import orca.default as default
 import orca.orca as orca
@@ -443,6 +444,33 @@
         default.Script.locusOfFocusChanged(self, event,
                                            oldLocusOfFocus, newLocusOfFocus)
 
+        # If we are doing a Print Preview and we are focused on the
+        # page number text area, also speak the "of n" labels to the
+        # right of this area. See bug #133275 for more details.
+        #
+        rolesList = [pyatspi.ROLE_TEXT,
+                     pyatspi.ROLE_FILLER,
+                     pyatspi.ROLE_PANEL,
+                     pyatspi.ROLE_TOOL_BAR,
+                     pyatspi.ROLE_FILLER,
+                     pyatspi.ROLE_FILLER,
+                     pyatspi.ROLE_PAGE_TAB,
+                     pyatspi.ROLE_PAGE_TAB_LIST]
+        if self.isDesiredFocusedItem(event.source, rolesList):
+            debug.println(self.debugLevel,
+                          "gedit.onStateChanged - print preview - page #.")
+            line = braille.getShowingLine()
+            parent = event.source.parent
+            label1 = self.getDisplayedText(parent[1])
+            label2 = self.getDisplayedText(parent[2])
+
+            utterances = [ label1, label2 ]
+            line.addRegion(braille.Region(" " + label1))
+            line.addRegion(braille.Region(" " + label2))
+
+            speech.speakUtterances(utterances)
+            braille.refresh()
+
     # This method tries to detect and handle the following cases:
     # 1) check spelling dialog.
     # 2) find dialog - phrase not found.



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]