[orca/gnome-3-34] Add space when expanding heading, paragraph, and section children
- From: Joanmarie Diggs <joanied src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [orca/gnome-3-34] Add space when expanding heading, paragraph, and section children
- Date: Thu, 3 Oct 2019 13:49:13 +0000 (UTC)
commit 2ae612685d05aaa7eac691c6440e061041db2044
Author: Joanmarie Diggs <jdiggs igalia com>
Date: Thu Oct 3 09:46:43 2019 -0400
Add space when expanding heading, paragraph, and section children
src/orca/script_utilities.py | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
---
diff --git a/src/orca/script_utilities.py b/src/orca/script_utilities.py
index a046a4a16..16351c8fb 100644
--- a/src/orca/script_utilities.py
+++ b/src/orca/script_utilities.py
@@ -2727,11 +2727,18 @@ class Utilities:
if not self.EMBEDDED_OBJECT_CHARACTER in string:
return string
+ blockRoles = [pyatspi.ROLE_HEADING,
+ pyatspi.ROLE_PARAGRAPH,
+ pyatspi.ROLE_SECTION]
+
toBuild = list(string)
for i, char in enumerate(toBuild):
if char == self.EMBEDDED_OBJECT_CHARACTER:
child = self.getChildAtOffset(obj, i + startOffset)
- toBuild[i] = self.expandEOCs(child)
+ result = self.expandEOCs(child)
+ if child.getRole() in blockRoles:
+ result += " "
+ toBuild[i] = result
return "".join(toBuild)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]