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 650812 - Play a sound/notification when rendering finishes
Play a sound/notification when rendering finishes
Status: RESOLVED FIXED
Product: pitivi
Classification: Other
Component: Rendering
Git
Other Linux
: Normal enhancement
: 0.91
Assigned To: Elad Alfassa
Pitivi maintainers
Depends on:
Blocks:
 
 
Reported: 2011-05-22 17:59 UTC by Jean-François Fortin Tam
Modified: 2012-11-09 18:42 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
[PATCH] Notify and play a sound when render is complete (3.03 KB, patch)
2012-11-07 22:07 UTC, Elad Alfassa
none Details | Review
[PATCH] Notify and play a sound when render is complete (try 2) (3.30 KB, patch)
2012-11-08 17:42 UTC, Elad Alfassa
none Details | Review
[PATCH] Notify and play a sound when render is complete (try 3) (8.92 KB, patch)
2012-11-09 15:21 UTC, Elad Alfassa
none Details | Review
[PATCH] Notify and play a sound when render is complete (try 4) (9.18 KB, patch)
2012-11-09 15:36 UTC, Elad Alfassa
none Details | Review
[PATCH] Notify and play a sound when render is complete (try 5) (9.00 KB, patch)
2012-11-09 16:50 UTC, Elad Alfassa
none Details | Review

Description Jean-François Fortin Tam 2011-05-22 17:59:38 UTC
When rendering finishes, we could play a nice "ding" sound from the sound theme using libcanberra. Perhaps we could also show some sort of notification that integrates with gnome-shell's libnotify features...

For the sound, this depends on introspection support in libcanberra: https://bugs.freedesktop.org/show_bug.cgi?id=32587
Comment 1 Elad Alfassa 2012-11-07 14:04:42 UTC
Right now it doesn't seem libcanberra will support introspection soon. gnome-clocks bypassed this issue by using pycanberra. Would you accept a patch that uses pycanberra to achieve this? (I want to know before I start working on one)
Comment 2 Jean-François Fortin Tam 2012-11-07 14:12:15 UTC
Sure :) pycanberra didn't exist at all back then, if I recall correctly.

I just hope that mixing pycanberra with the various other bits that are introspected (gtk, gst) doesn't cause a gobject conflict...
Comment 3 Elad Alfassa 2012-11-07 14:29:56 UTC
It seems to work in Clocks, so I guess it won't. I'll start working on a patch as soon as I find out how to get pitivi from git master to run on Fedora.
Comment 4 Elad Alfassa 2012-11-07 22:07:11 UTC
Created attachment 228425 [details] [review]
[PATCH] Notify and play a sound when render is complete

Patch attached.

The only thing I'm unsure of with this patch is the commit message style. Do you have any style guidelines for pitivi commit messages?
Comment 5 Elad Alfassa 2012-11-08 17:42:47 UTC
Created attachment 228496 [details] [review]
[PATCH] Notify and play a sound when render is complete (try 2)

This version of the patch makes sure we can render even if libnotify or pycanberra are not installed.
Comment 6 Jean-François Fortin Tam 2012-11-08 18:19:14 UTC
This is awesome!

A few remaining bugs/nitpicks I've found with your latest patch:

- When render is complete, it does not make the rest of the UI sensitive again... perhaps you haven't dismissed the render dialog window properly?

- "Render Complete" uses header capitalization... Feels weird compared to the other notifications I've seen, I think the norm for notifications is to use "sentence" capitalization style?

- Notifications won't show up if the application is focused. Is there a way you could force them to be shown (because we don't have any other UI indication otherwise)? Actually, I do see the notification bar showing up for *split second*... maybe you're showing the notifications "too soon" (either before you're done doing UI changes such as closing windows... or maybe it just needs to sleep for a second).

- If you do multiple renders, it will have a number of the notifications for the app in the gnome-shell message tray, however it won't show up in an efficient/elegant manner when you click the notification icon. It will look like this:


/--------------------------------------------------------------\
| (icon) Render complete   Pitivi has finished rendering FOO   |
| (icon) Render complete   Pitivi has finished rendering BAR   |
| (icon) Render complete   Pitivi has finished rendering BAZ   |
\---------------------------------------------------  ---------/
                                                    \/

Instead of something like:

/--------------------------------------------------------------\
| (icon) Render complete                                       |
|                                                              |
|        Pitivi has finished rendering FOO                     |
|        Pitivi has finished rendering BAR                     |
|        Pitivi has finished rendering BAZ                     |
\---------------------------------------------------  ---------/
                                                    \/

I'm not sure how to do that, but I suspect libnotify has a provision for it?
Comment 7 Elad Alfassa 2012-11-08 19:33:33 UTC
(In reply to comment #6)
> This is awesome!
> 
> A few remaining bugs/nitpicks I've found with your latest patch:
> 
> - When render is complete, it does not make the rest of the UI sensitive
> again... perhaps you haven't dismissed the render dialog window properly?
Indeed. Maybe we shouldn't dismiss it at all... (remove the "Also, don't show the render options dialog again if the render wasn't cancelled." of the commit)
> 
> - "Render Complete" uses header capitalization... Feels weird compared to the
> other notifications I've seen, I think the norm for notifications is to use
> "sentence" capitalization style?
> 
Fixed locally
> - Notifications won't show up if the application is focused. Is there a way you
> could force them to be shown (because we don't have any other UI indication
> otherwise)? Actually, I do see the notification bar showing up for *split
> second*... maybe you're showing the notifications "too soon" (either before
> you're done doing UI changes such as closing windows... or maybe it just needs
> to sleep for a second).
I tried multiple combinations of things, I have no idea why the notification disappears. I'm starting to think it's a bug in the shell, because even when I defined the notification as "resident" (which means it shouldn't disappear without the user explicitly removing it) it is still removed. I'll have to dig into it.
> 
> - If you do multiple renders, it will have a number of the notifications for
> the app in the gnome-shell message tray, however it won't show up in an
> efficient/elegant manner when you click the notification icon
> ...
> I'm not sure how to do that, but I suspect libnotify has a provision for it?
Fixed locally (that's just a matter of adding \n)
Comment 8 Elad Alfassa 2012-11-09 15:21:50 UTC
Created attachment 228582 [details] [review]
[PATCH] Notify and play a sound when render is complete (try 3)

This fixes all problems you mentioned.

I hope it's good enough.
Comment 9 Elad Alfassa 2012-11-09 15:36:10 UTC
Created attachment 228584 [details] [review]
[PATCH] Notify and play a sound when render is complete (try 4)

now without global.
Comment 10 Elad Alfassa 2012-11-09 16:50:55 UTC
Created attachment 228595 [details] [review]
[PATCH] Notify and play a sound when render is complete (try 5)
Comment 11 Jean-François Fortin Tam 2012-11-09 18:42:13 UTC
Pushed to master (with some minor fixes) as:

commit bcf90cf446734e00e70b6c799d35dfc871f21b68
Author: Elad Alfassa <elad@fedoraproject.org>
Date:   Fri Nov 9 13:36:30 2012 -0500

    Notify and play a sound when rendering is complete
    
    Also reuse the render progress dialog at the end of rendering
    to allow the user to open the rendered movie in their default movie player.
    
    Fixes bug #650812
    
    Adds (soft) dependencies: libnotify with introspection support, pycanberra



Thanks for your contribution!