[orca] Present gnome-shell notifications (requires fix to bgo 648645)
- From: Joanmarie Diggs <joanied src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [orca] Present gnome-shell notifications (requires fix to bgo 648645)
- Date: Tue, 21 Feb 2012 16:22:37 +0000 (UTC)
commit a21675ca5d6849ac6c5d0dd6da1ef48b1ee5a8c0
Author: Joanmarie Diggs <jdiggs igalia com>
Date: Tue Feb 21 11:20:48 2012 -0500
Present gnome-shell notifications (requires fix to bgo 648645)
src/orca/formatting.py | 3 +++
src/orca/scripts/default.py | 10 ++++++++++
2 files changed, 13 insertions(+), 0 deletions(-)
---
diff --git a/src/orca/formatting.py b/src/orca/formatting.py
index 566e956..d634c12 100644
--- a/src/orca/formatting.py
+++ b/src/orca/formatting.py
@@ -188,6 +188,9 @@ formatting = {
'unfocused': 'labelAndName + menuItemCheckedState + availability + ' + MNEMONIC + ' + accelerator + positionInList',
'basicWhereAmI': 'ancestors + labelAndName + accelerator + positionInList + ' + MNEMONIC
},
+ pyatspi.ROLE_NOTIFICATION: {
+ 'unfocused': 'roleName + unrelatedLabels'
+ },
pyatspi.ROLE_PAGE_TAB: {
'focused': 'labelAndName + roleName + positionInList + ' + MNEMONIC + ' + accelerator',
'unfocused': 'labelAndName + roleName + positionInList + ' + MNEMONIC + ' + accelerator',
diff --git a/src/orca/scripts/default.py b/src/orca/scripts/default.py
index 409fa1b..538ab87 100644
--- a/src/orca/scripts/default.py
+++ b/src/orca/scripts/default.py
@@ -1424,6 +1424,15 @@ class Script(script.Script):
speech.speak(utterances)
return
+ if obj.getRole() == pyatspi.ROLE_NOTIFICATION \
+ and obj.getState().contains(pyatspi.STATE_SHOWING):
+ utterances = self.speechGenerator.generateSpeech(obj)
+ speech.speak(utterances)
+ labels = self.utilities.unrelatedLabels(obj)
+ msg = ''.join(map(self.utilities.displayedText, labels))
+ self.displayBrailleMessage(msg, flashTime=settings.brailleFlashTime)
+ notification_messages.saveMessage(msg)
+
if not self.utilities.isSameObject(obj, orca_state.locusOfFocus):
return
@@ -5966,6 +5975,7 @@ state_change_notifiers[pyatspi.ROLE_CHECK_BOX] = ("checked",
None)
state_change_notifiers[pyatspi.ROLE_PANEL] = ("showing", None)
state_change_notifiers[pyatspi.ROLE_LABEL] = ("showing", None)
+state_change_notifiers[pyatspi.ROLE_NOTIFICATION] = ("showing", None)
state_change_notifiers[pyatspi.ROLE_RADIO_BUTTON] = ("checked", None)
state_change_notifiers[pyatspi.ROLE_TOGGLE_BUTTON] = ("checked",
"pressed",
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]