? orca/lowevents.tar
? orca/patch.343133
Index: orca/ChangeLog
===================================================================
RCS file: /cvs/gnome/orca/ChangeLog,v
retrieving revision 1.472
diff -p -u -r1.472 ChangeLog
--- orca/ChangeLog	30 May 2006 16:21:21 -0000	1.472
+++ orca/ChangeLog	31 May 2006 13:53:15 -0000
@@ -1,3 +1,12 @@
+2006-05-31  Willie Walker <william.walker@sun.com>
+
+	* src/orca/flat_review.py: fix for bug 343133 where Orca would
+	reliably hang when attempting to do a flat review of gnome-terminal
+	when the user was viewing a man page.  This seems to be caused by
+	a bug in gnome-terminal returning nonsensical offsets from
+	getTextAtOffset.  We needed to do a little defensive programming 
+	here.
+	
 2006-05-30  Rich Burridge <rich.burridge@sun.com>
 
         * src/orca/scripts/StarOffice.py:
Index: orca/src/orca/flat_review.py
===================================================================
RCS file: /cvs/gnome/orca/src/orca/flat_review.py,v
retrieving revision 1.36
diff -p -u -r1.36 flat_review.py
--- orca/src/orca/flat_review.py	3 May 2006 19:15:17 -0000	1.36
+++ orca/src/orca/flat_review.py	31 May 2006 13:53:16 -0000
@@ -1,6 +1,6 @@
 # Orca
 #
-# Copyright 2005 Sun Microsystems Inc.
+# Copyright 2005-2006 Sun Microsystems Inc.
 #
 # This library is free software; you can redistribute it and/or
 # modify it under the terms of the GNU Library General Public
@@ -1087,6 +1087,14 @@ def getZonesFromAccessible(accessible, c
                 offset,
                 atspi.Accessibility.TEXT_BOUNDARY_LINE_START)
 
+            # [[[WDW - HACK: well...gnome-terminal sometimes wants to
+            # give us outrageous values back from getTextAtOffset
+            # (see http://bugzilla.gnome.org/show_bug.cgi?id=343133),
+            # so we try to handle it.]]]
+            #
+            if startOffset < 0:
+                break
+
             # [[[WDW - HACK: this is here because getTextAtOffset
             # tends not to be implemented consistently across toolkits.
             # Sometimes it behaves properly (i.e., giving us an endOffset
@@ -1223,7 +1231,7 @@ def getZonesFromAccessible(accessible, c
             string = accessible.description
         else:
             string = ""
-            
+
         if string == "":
             # [[[TODO: WDW - ooohhhh....this is going to be a headache.
             # We want to synthesize a string for objects that are there,
Index: orca/src/orca/util.py
===================================================================
RCS file: /cvs/gnome/orca/src/orca/util.py,v
retrieving revision 1.11
diff -p -u -r1.11 util.py
--- orca/src/orca/util.py	23 May 2006 20:30:44 -0000	1.11
+++ orca/src/orca/util.py	31 May 2006 13:53:16 -0000
@@ -322,6 +322,14 @@ def textLines(obj):
                 offset,
                 atspi.Accessibility.TEXT_BOUNDARY_LINE_START)
 
+            # [[[WDW - HACK: well...gnome-terminal sometimes wants to
+            # give us outrageous values back from getTextAtOffset
+            # (see http://bugzilla.gnome.org/show_bug.cgi?id=343133),
+            # so we try to handle it.]]]
+            #
+            if startOffset < 0:
+                break
+
             # [[[WDW - HACK: this is here because getTextAtOffset
             # tends not to be implemented consistently across toolkits.
             # Sometimes it behaves properly (i.e., giving us an endOffset
