After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 627451 - Orca needs a way to repeat the latest notification messages.
Orca needs a way to repeat the latest notification messages.
Status: RESOLVED FIXED
Product: orca
Classification: Applications
Component: general
2.31.x
Other Linux
: Normal enhancement
: ---
Assigned To: Orca Maintainers
Orca Maintainers
Depends on: 628367
Blocks:
 
 
Reported: 2010-08-20 00:22 UTC by Jose Vilmar Estacio de Souza
Modified: 2011-01-15 17:48 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Revision #1 (13.31 KB, patch)
2010-08-20 00:46 UTC, Jose Vilmar Estacio de Souza
none Details | Review
Revision 2 (11.90 KB, patch)
2010-08-23 16:37 UTC, Jose Vilmar Estacio de Souza
none Details | Review
revision 3 (12.41 KB, patch)
2010-08-24 16:56 UTC, Jose Vilmar Estacio de Souza
none Details | Review
Revision #4 (12.29 KB, patch)
2010-08-30 14:34 UTC, Jose Vilmar Estacio de Souza
committed Details | Review

Description Jose Vilmar Estacio de Souza 2010-08-20 00:22:38 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.
Comment 1 Jose Vilmar Estacio de Souza 2010-08-20 00:46:24 UTC
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.
Comment 2 Storm Dragon 2010-08-22 15:51:12 UTC
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.
Comment 3 Storm Dragon 2010-08-22 16:42:34 UTC
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.
Comment 4 Jose Vilmar Estacio de Souza 2010-08-22 18:08:06 UTC
(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.
Comment 5 Storm Dragon 2010-08-23 00:08:50 UTC
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.
Comment 6 Alejandro Leiva 2010-08-23 08:08:02 UTC
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.
Comment 7 Jose Vilmar Estacio de Souza 2010-08-23 12:39:16 UTC
(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.
Comment 8 Jose Vilmar Estacio de Souza 2010-08-23 16:37:45 UTC
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.
Comment 9 Storm Dragon 2010-08-23 21:28:56 UTC
This is working great. I especially like the new way of entering the list, tripple tapping was a bit hectic.
Comment 10 Jose Vilmar Estacio de Souza 2010-08-24 16:56:48 UTC
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.
Comment 11 Storm Dragon 2010-08-24 17:48:10 UTC
This patch is working great, nothing different from the last one as far as I can tell. I do not use Braille though.
Comment 12 Jose Vilmar Estacio de Souza 2010-08-24 18:05:34 UTC
(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.
Comment 13 Jose Vilmar Estacio de Souza 2010-08-30 14:34:30 UTC
Created attachment 169091 [details] [review]
Revision #4

Remove the key binds.
No more key binds associated by default.
Comment 14 Storm Dragon 2010-08-30 15:11:16 UTC
This works great. The sooner it is included in to Orca by default the better *grin*
Comment 16 Alejandro Leiva 2010-08-30 20:17:33 UTC
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!
Comment 17 Trevor Saunders (IRC: tbsaunde) 2011-01-08 08:59:39 UTC
The patch to say the last few notifications was commited to master, so I think the bug is fixed.