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 726568 - Port to GNotification
Port to GNotification
Status: RESOLVED OBSOLETE
Product: gnome-music
Classification: Applications
Component: general
unspecified
Other Linux
: Normal enhancement
: ---
Assigned To: gnome-music-maint
gnome-music-maint
Depends on: 762265
Blocks:
 
 
Reported: 2014-03-17 18:13 UTC by Vadim Rutkovsky
Modified: 2018-01-10 14:38 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Port to GNotification (9.14 KB, patch)
2014-05-16 10:44 UTC, Florian Will
needs-work Details | Review

Description Vadim Rutkovsky 2014-03-17 18:13:07 UTC
Use of Notify is discouraged, as it is almost deprecated. This might also solve blocking bug on ubuntu
Comment 1 Florian Will 2014-05-16 10:44:57 UTC
Created attachment 276664 [details] [review]
Port to GNotification

Since I'm on Ubuntu+Unity, the notification system I use is pretty.. simple.

I noticed that notifications with buttons are not actually displayed as notifications, instead a simple dialog pops up with those buttons. At first I thought it's a gnome-music debug feature, but as it turned out, it's the "now playing" notification.

I was hoping that using GNotification could improve this, so I gave it a try. However it's still exactly the same. So the patch now simply has "if XDG_CURRENT_DESKTOP != Unity: add buttons to notification".

Also, I get no icons/thumbnails in notifications, even though I tried to port that aspect over to GNotification as well. I suspect this is because I'm using Ubuntu, too.

So this is probably still a WIP. Things that I tried to implement but was unable to test, perhaps because of Ubuntus limitations:
* The "pause" button in notifications
* Icons in notifications
* Lifecycle of notifications, i.e. do they disappear when you close gnome-music? Will this patch cause "notification spam" in Gnome? etc. In Ubuntu they just disappear after a few seconds, but it reads like they are persistent in Gnome, so the patch might need some improvements for usability. Old notifications _should_ be replaced as soon as a new notification pops up, according to docs, because they use the same ID.
* Possibly more weird stuff.. :-)
Comment 2 Vadim Rutkovsky 2014-05-19 09:30:57 UTC
Review of attachment 276664 [details] [review]:

Tested this on F20 + Gnome 3.12 - no notifications appeared. Apparently this patch needs a bit more to make it work on all DEs.

Assigning the bug to me
Comment 3 Florian Will 2014-05-30 12:33:02 UTC
Thanks, Vadim! I installed gnome in my Debian Sid VM to test this on gnome.

Observations:
 (1) Generally, I get gnome-music notifications
 (2) Notifications have icons (as opposed to Ubuntu notifications)
 (3) "Pause" button works, but causes the notification to disappear and there's no follow-up notification with "Play" button
 (4) For (some?) albums/songs without album art, I get no notification at all

I expected (3) to happen, judging by the code, and assume it is the same with libnotify? To fix it, the _update_playing() method should probably refresh the notification, but I haven't tested this to see if it works.

In my case, (4) seems to be because albumArtCache.album_art_for_item_callback() [a callback that is called by grilo to send an album art URI] is called with item == None for whatever reason, so the method returns without calling the callback player is waiting for, so player doesn't emit the "thumbnail-updated" signal which causes the notification to be shown.

The open question is of course why you're not getting any notifications at all.
Comment 4 Allan Day 2016-01-06 13:16:22 UTC
Removing the available whiteboard - we're not really using it any more.
Comment 5 Marinus Schraal 2016-05-11 08:38:34 UTC
This patch has sadly bitrotten, probably mainly because of the rework done in bug #762265 .

Whatever the outcome of said bug I guess for DE's other than GNOME full use of notifications is pretty pivotal anyway. The use of GNotification would then be a no-brainer going forward and your continued help would be appreciated.
Comment 6 GNOME Infrastructure Team 2018-01-10 14:38:54 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to GNOME's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/gnome-music/issues/17.