[orca] Present the table dimensions when a table claims focus
- From: Joanmarie Diggs <joanied src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [orca] Present the table dimensions when a table claims focus
- Date: Wed, 21 Aug 2013 14:40:21 +0000 (UTC)
commit 17c4552a0d44c6210ab3906e547fe9fe7c8559e5
Author: Joanmarie Diggs <jdiggs igalia com>
Date: Wed Aug 21 10:38:58 2013 -0400
Present the table dimensions when a table claims focus
src/orca/formatting.py | 12 ++++++------
src/orca/generator.py | 11 +++++++++++
2 files changed, 17 insertions(+), 6 deletions(-)
---
diff --git a/src/orca/formatting.py b/src/orca/formatting.py
index e06a184..128331f 100644
--- a/src/orca/formatting.py
+++ b/src/orca/formatting.py
@@ -264,9 +264,9 @@ formatting = {
'basicWhereAmI' : 'labelAndName + roleName + value'
},
pyatspi.ROLE_TABLE: {
- 'focused': 'labelAndName + allTextSelection + roleName + availability + noChildren',
- 'unfocused': 'labelAndName + allTextSelection + roleName + availability + noChildren',
- 'basicWhereAmI': 'labelAndName + allTextSelection + roleName + availability + noChildren'
+ 'focused': 'labelAndName + table',
+ 'unfocused': 'labelAndName + table',
+ 'basicWhereAmI': 'labelAndName + table'
},
pyatspi.ROLE_TABLE_CELL: {
'focused': '(tableCell2ChildLabel + tableCell2ChildToggle)\
@@ -599,11 +599,11 @@ if settings.useExperimentalSpeechProsody:
formatting['speech'][pyatspi.ROLE_RADIO_BUTTON]['basicWhereAmI'] = \
'radioButtonGroup + pause + labelAndName + roleName + pause + radioState + pause + positionInGroup +
' + MNEMONIC + ' + accelerator'
formatting['speech'][pyatspi.ROLE_TABLE]['focused'] = \
- 'labelAndName + pause + allTextSelection + roleName + availability + noChildren'
+ 'labelAndName + pause + table'
formatting['speech'][pyatspi.ROLE_TABLE]['unfocused'] = \
- 'labelAndName + pause + allTextSelection + roleName + availability + noChildren'
+ 'labelAndName + pause + table'
formatting['speech'][pyatspi.ROLE_TABLE]['basicWhereAmI'] = \
- 'labelAndName + pause + allTextSelection + roleName + availability + noChildren'
+ 'labelAndName + pause + table'
formatting['speech'][pyatspi.ROLE_TABLE_CELL]['focused'] = \
'((tableCell2ChildLabel + tableCell2ChildToggle) or cellCheckedState) + pause + (expandableState and
(expandableState + pause + numberOfChildren + pause))'
formatting['speech'][pyatspi.ROLE_TABLE_CELL]['unfocused'] = \
diff --git a/src/orca/generator.py b/src/orca/generator.py
index c67e718..b4433ff 100644
--- a/src/orca/generator.py
+++ b/src/orca/generator.py
@@ -33,6 +33,7 @@ import pyatspi
from . import braille
from . import debug
+from . import messages
from . import settings
from .orca_i18n import _ # for gettext support
@@ -828,6 +829,16 @@ class Generator:
self._restoreRole(oldRole, args)
return result
+ def _generateTable(self, obj, **args):
+ """Returns an array of strings for use by speech and braille to present
+ the size of a table."""
+
+ try:
+ table = obj.queryTable()
+ except:
+ return []
+ return [messages.tableSize(table.nRows, table.nColumns)]
+
def _generateTableCellRow(self, obj, **args):
"""Orca has a feature to automatically read an entire row of a table
as the user arrows up/down the roles. This leads to complexity in
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]