[orca/570658] Updated evolution script, added formatting.py and updated speech_generator.py.
- From: Mesar Hameed <mhameed src gnome org>
- To: svn-commits-list gnome org
- Subject: [orca/570658] Updated evolution script, added formatting.py and updated speech_generator.py.
- Date: Thu, 14 May 2009 16:32:51 -0400 (EDT)
commit af843c43cb8a5317d4c3c9354a3121387b062146
Author: Mesar Hameed <mhameed src gnome org>
Date: Thu May 14 21:32:05 2009 +0100
Updated evolution script, added formatting.py and updated speech_generator.py.
---
src/orca/scripts/apps/evolution/Makefile.am | 9 ++++---
src/orca/scripts/apps/evolution/script.py | 5 ++++
.../scripts/apps/evolution/speech_generator.py | 21 +++++--------------
3 files changed, 16 insertions(+), 19 deletions(-)
diff --git a/src/orca/scripts/apps/evolution/Makefile.am b/src/orca/scripts/apps/evolution/Makefile.am
old mode 100644
new mode 100755
index 9a00a0b..1ca5519
--- a/src/orca/scripts/apps/evolution/Makefile.am
+++ b/src/orca/scripts/apps/evolution/Makefile.am
@@ -1,10 +1,11 @@
orca_pathdir=$(pyexecdir)
orca_python_PYTHON = \
- __init__.py \
- script.py \
- speech_generator.py \
- where_am_i.py
+ __init__.py \
+ formatting.py \
+ script.py \
+ speech_generator.py \
+ where_am_i.py
orca_pythondir=$(pyexecdir)/orca/scripts/apps/evolution
diff --git a/src/orca/scripts/apps/evolution/script.py b/src/orca/scripts/apps/evolution/script.py
old mode 100644
new mode 100755
index 5f626fe..abada76
--- a/src/orca/scripts/apps/evolution/script.py
+++ b/src/orca/scripts/apps/evolution/script.py
@@ -43,6 +43,7 @@ from orca.orca_i18n import _ # for gettext support
from where_am_i import WhereAmI
from speech_generator import SpeechGenerator
+from formatting import Formatting
########################################################################
# #
# The Evolution script class. #
@@ -145,6 +146,10 @@ class Script(default.Script):
return WhereAmI(self)
+ def getFormatting(self):
+ """Returns the formatting strings for this script."""
+ return Formatting(self)
+
def setupInputEventHandlers(self):
"""Defines InputEventHandler fields for this script that can be
called by the key and braille bindings. In this particular case,
diff --git a/src/orca/scripts/apps/evolution/speech_generator.py b/src/orca/scripts/apps/evolution/speech_generator.py
old mode 100644
new mode 100755
index aa0bbb1..635004c
--- a/src/orca/scripts/apps/evolution/speech_generator.py
+++ b/src/orca/scripts/apps/evolution/speech_generator.py
@@ -37,19 +37,15 @@ class SpeechGenerator(speechgenerator.SpeechGenerator):
def __init__(self, script):
speechgenerator.SpeechGenerator.__init__(self, script)
- def _getSpeechForTableCell(self, obj, already_focused):
- """Get the speech utterances for a single table cell
+ def _getIsDesiredFocusedItem(self, obj, **args):
+ """Helps us to get the speech utterances for a single table cell
Arguments:
- obj: the table
- - already_focused: False if object just received focus
- Returns a list of utterances to be spoken for the object.
+ Returns a boolean to state if the given object is in DesiredFocusedItem
"""
- utterances = speechgenerator.SpeechGenerator.\
- _getSpeechForTableCell(self, obj, already_focused)
-
# Check that we are in a table cell in the mail message header list.
# If we are and this table cell has an expanded state, and the first
# token of the last utterances is "0", then strip off that last
@@ -59,11 +55,6 @@ class SpeechGenerator(speechgenerator.SpeechGenerator):
pyatspi.ROLE_TREE_TABLE, \
pyatspi.ROLE_UNKNOWN]
if self._script.isDesiredFocusedItem(obj, rolesList):
- state = obj.getState()
- if state and state.contains(pyatspi.STATE_EXPANDABLE):
- if state.contains(pyatspi.STATE_EXPANDED):
- tokens = utterances[-1].split()
- if tokens[0] == "0":
- utterances = utterances[0:-1]
-
- return utterances
+ return True
+ else:
+ return False
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]