GNOME Bugzilla – Bug 726568
Port to GNotification
Last modified: 2018-01-10 14:38:54 UTC
Use of Notify is discouraged, as it is almost deprecated. This might also solve blocking bug on ubuntu
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.. :-)
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
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.
Removing the available whiteboard - we're not really using it any more.
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.
-- 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.