[orca/570658] Retrieve role name as a string and not an array
- From: William Walker <wwalker src gnome org>
- To: svn-commits-list gnome org
- Subject: [orca/570658] Retrieve role name as a string and not an array
- Date: Thu, 21 May 2009 11:47:54 -0400 (EDT)
commit 0bb79eb8fc94191fcc4dd874f4e24edb38d18793
Author: Willie Walker <william walker sun com>
Date: Thu May 21 11:44:38 2009 -0400
Retrieve role name as a string and not an array
This will probably change back to an array when we work on refactoring
the Where Am I stuff to be similar to the speech generator.
---
src/orca/where_am_I.py | 11 ++++++++---
1 files changed, 8 insertions(+), 3 deletions(-)
diff --git a/src/orca/where_am_I.py b/src/orca/where_am_I.py
index b109e2c..e102291 100644
--- a/src/orca/where_am_I.py
+++ b/src/orca/where_am_I.py
@@ -1160,11 +1160,16 @@ class WhereAmI:
try:
if role:
- return self._script.speechGenerator.getRoleName(obj, role=role)
+ result = self._script.speechGenerator.getRoleName(obj,
+ role=role)
else:
- return self._script.speechGenerator.getRoleName(obj)
+ result = self._script.speechGenerator.getRoleName(obj)
+ if result:
+ result = result[0]
except:
- return ""
+ result = ""
+
+ return result
def _getGroupLabel(self, obj):
"""Returns the label for a group of components.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]