[orca] Fix for bug #640379 - Orca says 'read only' for paragraphs in WebKitGtk content
- From: Joanmarie Diggs <joanied src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [orca] Fix for bug #640379 - Orca says 'read only' for paragraphs in WebKitGtk content
- Date: Mon, 24 Jan 2011 06:59:59 +0000 (UTC)
commit 434cd3a957e2b0bd5629e15fc48cd63dc39d1615
Author: Joanmarie Diggs <joanmarie diggs gmail com>
Date: Mon Jan 24 01:59:26 2011 -0500
Fix for bug #640379 - Orca says 'read only' for paragraphs in WebKitGtk content
.../scripts/toolkits/WebKitGtk/script_utilities.py | 12 ++++++++++++
1 files changed, 12 insertions(+), 0 deletions(-)
---
diff --git a/src/orca/scripts/toolkits/WebKitGtk/script_utilities.py b/src/orca/scripts/toolkits/WebKitGtk/script_utilities.py
index 23cec17..97e3cd9 100644
--- a/src/orca/scripts/toolkits/WebKitGtk/script_utilities.py
+++ b/src/orca/scripts/toolkits/WebKitGtk/script_utilities.py
@@ -72,3 +72,15 @@ class Utilities(script_utilities.Utilities):
attrs = dict([attr.split(':', 1) for attr in obj.getAttributes()])
return attrs.get('toolkit', '') == 'WebKitGtk'
+
+ def isReadOnlyTextArea(self, obj):
+ """Returns True if obj is a text entry area that is read only."""
+
+ if not obj.getRole() == pyatspi.ROLE_ENTRY:
+ return False
+
+ state = obj.getState()
+ readOnly = state.contains(pyatspi.STATE_FOCUSABLE) \
+ and not state.contains(pyatspi.STATE_EDITABLE)
+
+ return readOnly
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]