GNOME Bugzilla – Bug 627451
Orca needs a way to repeat the latest notification messages.
Last modified: 2011-01-15 17:48:32 UTC
The announcement of the notifications made by Orca, can be stopped accidentally by the user. This happens for example when the user is typing a text. When this happens the user may lose important information, such as the battery life of notebook. It would be nice to implement a feature in the orca orca so the user can access the latest messages announced.
Created attachment 168345 [details] [review] Revision #1 If user press orca_key+n, orca repeats the last notification message. If user press orca_key+n two times, orca repeats the message above the last. if user repeats orca_key+n three times, orca enters in the message list mode. In the message list mode, user can scroll in the latest messages using home, end, up and down keys to hear a message. To exit from the list message mode, user may press escape. Pressing the h key, a brief help is presented.
This is giving good results so far. The only thing is, I think it may be missing some notifications or perhaps I am just not getting notifications for everything. For example, I got a notification when the wireless connection was established, another when a friend came online in Pidgin, and another when Twitux updated. I still have not gotten notifications on track change in Rhythmbox though, and when a second friend came online it didn't give a notification for it either. I am not getting any notification at all win these instances though, so it may be a problem with libnotify and not this patch at all. It may be worth checking in to though. I know when using libnotify with TTYtter it always gives a notification saying "libnotify support activated" but after installing this patch it did not do so. I am not sure if the notification still happened or not, there was no feedback about it at all.
After further testing, this patch seems to work for the first 3 notifications, then after that no more notifications are given. I still do not know if they appear on screen, but Orca doesn't read or store them if so. An easy way to test is to just play some music in Rhythmbox. Every time the track changes there should be a new notification. I got 3 of them and nothing else. Restarting Orca allows for 3 more before stopping again.
(In reply to comment #3) > After further testing, this patch seems to work for the first 3 notifications, > then after that no more notifications are given. I still do not know if they > appear on screen, but Orca doesn't read or store them if so. An easy way to > test is to just play some music in Rhythmbox. Every time the track changes > there should be a new notification. I got 3 of them and nothing else. > Restarting Orca allows for 3 more before stopping again. Hi, Thanks for the feedback. I do not receive notifications from Rhythmbox., even if the patch is not applied, perhaps something wrong in my configuration. Can you send me a debug from orca representing this situation? Thanks.
I had to reinstall earlier today because of an unrelated matter. Now that I have got everything up and running again the notifications patch seems to work flawlessly. I wonder if something had gotten corrupted in my previous setup. Anyway, it's working great.
Review of attachment 168345 [details] [review]: Hi Jose, nice work, I reviewed it a bit :) ::: src/orca/notification_messages.py @@ +41,3 @@ + + # to store the messages generated by the notification daemon + self.notificationMessages = [] We need to take care of this array. Now in this class the notificationMessages can grow infinitely. We should define a maximum size of notifications saved in this var.
(In reply to comment #6) > Review of attachment 168345 [details] [review]: > > Hi Jose, nice work, I reviewed it a bit :) > > ::: src/orca/notification_messages.py > @@ +41,3 @@ > + > + # to store the messages generated by the notification daemon > + self.notificationMessages = [] > > We need to take care of this array. Now in this class the notificationMessages > can grow infinitely. We should define a maximum size of notifications saved in > this var. Hi. It is already defined in the function saveMessage. + self.notificationMessages.append(msg) + if self.size() > 51: + del self.notificationMessages[0] I think that the number must be defined in the preference settings. Today I'll send a new version of the patch. The notification_messages now is a module instead of a class. To me it is less intrusive. Thanks.
Created attachment 168566 [details] [review] Revision 2 The following things have changed: 1. orca_key+shift+n reads the previous message. 2. orca_key+ctrl+n enable the list notification list mode. 3. in the list notification messages mode, ctrl can be used to stop speach. 4. The notification_messages.py does not contain a class, only a serie of functions. This allowed almost all the procedures were coded in this file. I am using the script since Sunday without problems. needs to be tested and reviewed. Thanks.
This is working great. I especially like the new way of entering the list, tripple tapping was a bit hectic.
Created attachment 168655 [details] [review] revision 3 Some minor improvements. Unless a bug is found or someone has any suggestions. I believe I did all the implementations that I planned. I would also like some feedback from people who use Braille. Thanks for the feedback.
This patch is working great, nothing different from the last one as far as I can tell. I do not use Braille though.
(In reply to comment #11) > This patch is working great, nothing different from the last one as far as I > can tell. I do not use Braille though. In previous version, pressing any key causes orca to speak a short help. Now the short help is spoken if user press a wrong key three times.
Created attachment 169091 [details] [review] Revision #4 Remove the key binds. No more key binds associated by default.
This works great. The sooner it is included in to Orca by default the better *grin*
Commited http://git.gnome.org/browse/orca/commit/?id=3f8034549b1e03282677ace7c38f700e9233d5f8
Review of attachment 169091 [details] [review]: Jose, the patch works fine but there's some drawbacks I modify. First, about i18n/l10n I added ngettext to manage singular and plural forms also added C_ function to provide qualified translatable strings. Last you need to add to po/POTFILES.in any new file with gettext functions. You can see the diferences here http://docs.python.org/library/gettext.html Second, we detect an issue when in notification mode and focus goes elsewhere don't works as expected, probably you can accomplished the fix looking at window:activate and window:deactivate events. Anyway I'll open a new bug for this question. Thanks for your work!
The patch to say the last few notifications was commited to master, so I think the bug is fixed.