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 652217 - An empty notification shows up when launching Rhythmbox
An empty notification shows up when launching Rhythmbox
Status: RESOLVED FIXED
Product: gnome-shell
Classification: Core
Component: message-tray
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
Depends on:
Blocks:
 
 
Reported: 2011-06-09 17:10 UTC by Marina Zhurakhinskaya
Modified: 2014-01-13 00:18 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Empty Rhythmbox notification (316.28 KB, image/png)
2011-06-09 17:10 UTC, Marina Zhurakhinskaya
Details

Description Marina Zhurakhinskaya 2011-06-09 17:10:39 UTC
Created attachment 189572 [details]
Empty Rhythmbox notification

See the screenshot.
Comment 1 Jonathan Matthew 2011-06-09 22:21:25 UTC
Rhythmbox does this deliberately so that the playback controls are available immediately.  Also, you're not getting the proper playback controls due to this: http://git.gnome.org/browse/rhythmbox/commit/?id=e0e5d06e3e3d2651639c0d0579635c3aa126dd4f
Comment 2 Milan Bouchet-Valat 2011-06-10 08:48:07 UTC
I found it weird first too, but that's actually useful because it allows you to go directly to RB and choose another album if you like.
Comment 3 Marina Zhurakhinskaya 2011-06-10 21:33:40 UTC
With the newest Rhythmbox code, I'm getting all three playback controls, but still no text for the title or description.

Would it be possible for the notification to have the name and description of the first track instead? That way the user would know what will be played when the play button is pressed. It's probably more elegant then saying "Rhythmbox", which I believe what the earlier code was putting as a title in that notification.
Comment 4 Jonathan Matthew 2011-06-10 22:05:46 UTC
That's probably possible.  I'd be a bit concerned that users might expect the track to start playing with no further action, which might trigger 'why is there no sound' troubleshooting or 'I'm in a library and my headphones aren't plugged in' panic.
Comment 5 William Jon McCann 2011-06-16 19:08:35 UTC
Showing the notification when I just start RB is a bit weird. Wondering if we need the thing in the MT at all before we actually play something...
Comment 6 Milan Bouchet-Valat 2011-06-16 20:32:29 UTC
OTOH, it would feel a little inconsistent not to have the notification in the messaging bar if you've not played anything, but have it when you have. If you keep RB open for hours (or days with suspend), you don't even remember you already played something, and yet this affects RB's behavior.

Isn't there a way to add the persistent notification without showing it? E.g., the Shell could just special-case empty notifications, which anyway makes much sense.
Comment 7 Marina Zhurakhinskaya 2011-06-16 21:51:25 UTC
There are two parts here:

1) A new notification being shown. This should not happen - we should find a way to suppress it.

We should not be showing a notification from an application that has an active window by checking it in processNotification() in notificationDaemon.js .
However, right now, both tracker.focus_app and this.app are null for me. tracker.focus_app is null because the notification is sent before the window is shown - I can see it getting set later in _onFocusAppChanged() . this.app is probably null for the same reason, because the way we are trying to figure it out is by calling
Shell.WindowTracker.get_default().get_app_from_pid(this._pid);
which probably returns null because the window is not yet created. So it seems that this can be fixed if Rhythmbox were to send the first notification after a window is shown.

2) A summary notification being placed in the message tray. We previously decided that it should be there to provide the user with a consistent experience with the Rhythmbox's resident notification. Right now it looks like this:

[o]
                           |<< |> >>|

I propose that we make it look like that, where Americano is the song that will play if you press Play:

[o] Americano
    by Lady Gaga from Born This Way
                           |<< |> >>|
Comment 8 William Jon McCann 2011-06-16 22:16:58 UTC
I think practically speaking we can just make the thing resident after the first notification.

Initial startup is a bit strange anyway - it is really the only time RB is "stopped" other times it is paused.
Comment 9 Marina Zhurakhinskaya 2011-06-30 05:33:22 UTC
Jonathan, do you think you could make a patch for Rhythmbox to not place a resident notification in the message tray when it starts, but rather wait till the first track is played?
Comment 10 Milan Bouchet-Valat 2011-06-30 07:55:09 UTC
I still think this behavior would be wrong. Why not make the Shell detect empty resident notifications, and silently add them to the message bar, without showing them first?
Comment 11 Marina Zhurakhinskaya 2011-06-30 21:38:08 UTC
The resident notification can't be empty because the user needs to be able to interact with it in the message tray. If Rhythmbox were to send the notification after the window is shown, we would not be displaying it and would silently place it in the message tray. However, it needs to be pre-filled with the information about the song that would get played if you pressed Play. Basically, this is what I proposed in Comment 7.

I agree with Jon that adding the resident notification after the first track gets played is good enough. Either behavior is fine with me.
Comment 12 Jonathan Matthew 2011-07-19 23:04:17 UTC
I removed the notification on startup in commit 64d77ff.  Creating a notification with the details of the first track that would be played isn't really feasible at the moment.  It may be later.
Comment 13 Jasper St. Pierre (not reading bugmail) 2014-01-13 00:18:29 UTC
OK then.