[orca] Fix for bgo#434600 – cursor routing keys cannot be used to position caret at end of line
- From: William Walker <wwalker src gnome org>
- To: svn-commits-list gnome org
- Subject: [orca] Fix for bgo#434600 – cursor routing keys cannot be used to position caret at end of line
- Date: Thu, 16 Jul 2009 14:56:28 +0000 (UTC)
commit 8f0e5fa145508e06d1155e18c44c3d2b78252e47
Author: Willie Walker <william walker sun com>
Date: Thu Jul 16 10:54:04 2009 -0400
Fix for bgo#434600 â?? cursor routing keys cannot be used to position caret at end of line
This handles the case where the user has disabled the EOL indicator in braille.
src/orca/braille.py | 5 +++++
src/orca/braille_generator.py | 9 +++++----
src/orca/formatting.py | 2 +-
test/keystrokes/gtk-demo/role_combo_box.py | 12 ++++++------
4 files changed, 17 insertions(+), 11 deletions(-)
---
diff --git a/src/orca/braille.py b/src/orca/braille.py
index f9a8c82..77fb522 100644
--- a/src/orca/braille.py
+++ b/src/orca/braille.py
@@ -585,6 +585,11 @@ class Text(Region):
if not self.contracted and not settings.disableBrailleEOL:
self.string += self.eol
+ elif settings.disableBrailleEOL:
+ # Ensure there is a place to click on at the end of a line
+ # so the user can route the caret to the end of the line.
+ #
+ self.string += ' '
def __str__(self):
return "Text: '%s', %d" % (self.string, self.cursorOffset)
diff --git a/src/orca/braille_generator.py b/src/orca/braille_generator.py
index e656db1..6a1e2e0 100644
--- a/src/orca/braille_generator.py
+++ b/src/orca/braille_generator.py
@@ -318,10 +318,11 @@ class BrailleGenerator(generator.Generator):
def _generateEol(self, obj, **args):
result = []
- if not args.get('mode', None):
- args['mode'] = self._mode
- args['stringType'] = 'eol'
- result.append(self._script.formatting.getString(**args))
+ if not settings.disableBrailleEOL:
+ if not args.get('mode', None):
+ args['mode'] = self._mode
+ args['stringType'] = 'eol'
+ result.append(self._script.formatting.getString(**args))
return result
def space(self, delimiter=" "):
diff --git a/src/orca/formatting.py b/src/orca/formatting.py
index 4fa0b45..dc6f54f 100644
--- a/src/orca/formatting.py
+++ b/src/orca/formatting.py
@@ -368,7 +368,7 @@ formatting = {
# We could then use the cursorOffset field to indicate where the
# combobox starts.]]]
#
- 'unfocused': '((comboBoxTextObj and [Text(comboBoxTextObj[0], asString(label))])\
+ 'unfocused': '((comboBoxTextObj and [Text(comboBoxTextObj[0], asString(label), asString(eol))])\
or [Component(obj, asString(label + displayedText), label and (len(asString(label)) + 1) or 0)])\
+ [Region(" " + asString(roleName))]'
},
diff --git a/test/keystrokes/gtk-demo/role_combo_box.py b/test/keystrokes/gtk-demo/role_combo_box.py
index d7a7348..f806bff 100644
--- a/test/keystrokes/gtk-demo/role_combo_box.py
+++ b/test/keystrokes/gtk-demo/role_combo_box.py
@@ -166,8 +166,8 @@ sequence.append(KeyComboAction("Tab"))
sequence.append(WaitForFocus(acc_role=pyatspi.ROLE_COMBO_BOX))
sequence.append(utils.AssertPresentationAction(
"Editable text combo box open button",
- ["BRAILLE LINE: 'gtk-demo Application Combo boxes Frame Editable Panel Four Combo'",
- " VISIBLE: 'Four Combo', cursor=5",
+ ["BRAILLE LINE: 'gtk-demo Application Combo boxes Frame Editable Panel Four $l Combo'",
+ " VISIBLE: 'Four $l Combo', cursor=5",
"SPEECH OUTPUT: 'Four combo box'"]))
########################################################################
@@ -236,7 +236,7 @@ sequence.append(utils.AssertPresentationAction(
" VISIBLE: 'gtk-demo Application Window', cursor=22",
"BRAILLE LINE: 'gtk-demo Application Combo boxes Frame Editable Panel Menu'",
" VISIBLE: 'Menu', cursor=1",
- "BRAILLE LINE: 'gtk-demo Application Combo boxes Frame Editable Panel ComboFour One'",
+ "BRAILLE LINE: 'gtk-demo Application Combo boxes Frame Editable Panel ComboFour $l One'",
" VISIBLE: 'One', cursor=1",
"SPEECH OUTPUT: 'window'",
"SPEECH OUTPUT: 'Editable panel menu'",
@@ -250,7 +250,7 @@ sequence.append(KeyComboAction("Down"))
sequence.append(WaitForFocus("Two", acc_role=pyatspi.ROLE_MENU_ITEM))
sequence.append(utils.AssertPresentationAction(
"Editable text combo box One item",
- ["BRAILLE LINE: 'gtk-demo Application Combo boxes Frame Editable Panel ComboFour Two'",
+ ["BRAILLE LINE: 'gtk-demo Application Combo boxes Frame Editable Panel ComboFour $l Two'",
" VISIBLE: 'Two', cursor=1",
"SPEECH OUTPUT: 'Two'"]))
@@ -263,8 +263,8 @@ sequence.append(utils.AssertPresentationAction(
"Editable text combo box Two selected",
["BRAILLE LINE: 'gtk-demo Application Combo boxes Frame'",
" VISIBLE: 'Combo boxes Frame', cursor=1",
- "BRAILLE LINE: 'gtk-demo Application Combo boxes Frame Editable Panel Two Combo'",
- " VISIBLE: 'Two Combo', cursor=1",
+ "BRAILLE LINE: 'gtk-demo Application Combo boxes Frame Editable Panel Two $l Combo'",
+ " VISIBLE: 'Two $l Combo', cursor=1",
"SPEECH OUTPUT: 'Combo boxes frame'",
"SPEECH OUTPUT: 'Editable panel Two combo box'"]))
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]