orca r3491 - in trunk: . src/orca
- From: wwalker svn gnome org
- To: svn-commits-list gnome org
- Subject: orca r3491 - in trunk: . src/orca
- Date: Tue, 22 Jan 2008 17:46:51 +0000 (GMT)
Author: wwalker
Date: Tue Jan 22 17:46:51 2008
New Revision: 3491
URL: http://svn.gnome.org/viewvc/orca?rev=3491&view=rev
Log:
Fix for Bug 482294 - Contextual information for gnome-terminal should only be shown in braille when you're on the first line
Modified:
trunk/ChangeLog
trunk/src/orca/braillegenerator.py
trunk/src/orca/default.py
Modified: trunk/src/orca/braillegenerator.py
==============================================================================
--- trunk/src/orca/braillegenerator.py (original)
+++ trunk/src/orca/braillegenerator.py Tue Jan 22 17:46:51 2008
@@ -1408,23 +1408,9 @@
self._debugGenerator("_getBrailleRegionsForTerminal", obj)
- title = None
- frame = self._script.getFrame(obj)
- if frame:
- title = frame.name
- if not title:
- title = self._script.getDisplayedLabel(obj)
-
- text = title
- text = self._script.appendString(
- text, rolenames.getBrailleForRoleName(obj))
-
regions = []
- regions.append(braille.Region(text))
-
textRegion = braille.Text(obj)
regions.append(textRegion)
-
return [regions, textRegion]
def _getBrailleRegionsForToggleButton(self, obj):
Modified: trunk/src/orca/default.py
==============================================================================
--- trunk/src/orca/default.py (original)
+++ trunk/src/orca/default.py Tue Jan 22 17:46:51 2008
@@ -1586,6 +1586,20 @@
0,
self.inputEventHandlers["cycleZoomerTypeHandler"]))
+ keyBindings.add(
+ keybindings.KeyBinding(
+ None,
+ 0,
+ 0,
+ self.inputEventHandlers["panBrailleLeftHandler"]))
+
+ keyBindings.add(
+ keybindings.KeyBinding(
+ None,
+ 0,
+ 0,
+ self.inputEventHandlers["panBrailleRightHandler"]))
+
keyBindings = settings.overrideKeyBindings(self, keyBindings)
return keyBindings
@@ -1707,7 +1721,9 @@
- obj: an accessible
"""
return obj and \
- obj.getRole() in (pyatspi.ROLE_TEXT, pyatspi.ROLE_PARAGRAPH)
+ obj.getRole() in (pyatspi.ROLE_TEXT,
+ pyatspi.ROLE_PARAGRAPH,
+ pyatspi.ROLE_TERMINAL)
def getText(self, obj, startOffset, endOffset):
"""Returns the substring of the given object's text specialization.
@@ -3767,6 +3783,7 @@
self.updateBrailleReview(self.targetCursorCell)
elif braille.beginningIsShowing and orca_state.locusOfFocus \
and self.isTextArea(orca_state.locusOfFocus):
+
# If we're at the beginning of a line of a multiline text
# area, then force it's caret to the end of the previous
# line. The assumption here is that we're currently
@@ -3779,8 +3796,20 @@
[lineString, startOffset, endOffset] = text.getTextAtOffset(
text.caretOffset,
pyatspi.TEXT_BOUNDARY_LINE_START)
+ movedCaret = False
if startOffset > 0:
- text.setCaretOffset(startOffset - 1)
+ movedCaret = text.setCaretOffset(startOffset - 1)
+
+ # If we didn't move the caret and we're in a terminal, we
+ # jump into flat review to review the text. See
+ # http://bugzilla.gnome.org/show_bug.cgi?id=482294.
+ #
+ if (not movedCaret) \
+ and (orca_state.locusOfFocus.getRole() \
+ == pyatspi.ROLE_TERMINAL):
+ context = self.getFlatReviewContext()
+ context.goBegin(flat_review.Context.LINE)
+ self.reviewPreviousCharacter(inputEvent)
else:
braille.panLeft(panAmount)
braille.refresh(False)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]