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 574400 - Resizes album art before sending it to notify-osd
Resizes album art before sending it to notify-osd
Status: RESOLVED FIXED
Product: banshee
Classification: Other
Component: general
git master
Other All
: Normal trivial
: 1.x
Assigned To: Banshee Maintainers
Banshee Maintainers
Depends on:
Blocks:
 
 
Reported: 2009-03-06 17:20 UTC by Jorge Castro
Modified: 2009-05-14 23:12 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
only_resize_with_notification_daemon.patch (848 bytes, patch)
2009-04-20 15:25 UTC, Nicolò Chieffo
needs-work Details | Review
notify_osd.patch (1.21 KB, patch)
2009-05-13 16:57 UTC, Nicolò Chieffo
committed Details | Review
notify_osd.patch (2.25 KB, patch)
2009-05-14 16:28 UTC, Nicolò Chieffo
none Details | Review
check_for_notifications_support.patch (1.86 KB, patch)
2009-05-14 16:30 UTC, Nicolò Chieffo
none Details | Review

Description Jorge Castro 2009-03-06 17:20:25 UTC
Please describe the problem:
Hi!

Someone noticed that the album art from Banshee was worse than it used to be when using Ubuntu's new notify-osd:

https://bugs.launchpad.net/ubuntu/+source/banshee/+bug/338695

From testing it locally with art and asking Gabriel it seems Banshee resizes the art to 42 px here: http://svn.gnome.org/viewvc/banshee/trunk/banshee/src/Extensions/Banshee.NotificationArea/Banshee.NotificationArea/NotificationAreaService.cs?revision=5084&view=markup

According to Macslow Banshee should probably just hand off the artwork to notify-osd untouched and let it resize the art instead.



Steps to reproduce:


Actual results:


Expected results:


Does this happen every time?


Other information:
Comment 1 Matthew Paul Thomas (mpt) 2009-04-20 09:02:06 UTC
<https://wiki.ubuntu.com/NotificationDevelopmentGuidelines#blurry> has example code showing how to scale the icon only if it's being sent to notification-daemon, leaving it unscaled for other notification servers.
Comment 2 Nicolò Chieffo 2009-04-20 15:25:37 UTC
Created attachment 132961 [details] [review]
only_resize_with_notification_daemon.patch

Is this ok for you?
Comment 3 Gabriel Burt 2009-04-21 15:29:15 UTC
Nicolò, looks pretty good.  Can you fix the indenting to use spaces instead of tabs, and put {} around your if/else (even though one line) - see HACKING for the full style guide.
Comment 4 Gabriel Burt 2009-04-21 15:34:43 UTC
Also, please change the IconThemeUtils.LoadIcon (48, "audio-x-generic"); fallback code and the IconThemeUtils.LoadIcon (48, Banshee.ServiceStack.Application.IconName); bits.  Thanks!
Comment 5 Nicolò Chieffo 2009-05-13 16:53:29 UTC
I'm quite stupid... I completely forgot to do the things you asked!
I will do them now
Comment 6 Nicolò Chieffo 2009-05-13 16:57:25 UTC
Created attachment 134584 [details] [review]
notify_osd.patch
Comment 7 Gabriel Burt 2009-05-14 15:51:21 UTC
Sorry, I meant change both of those lookups in the same way you changed the ArtworkId lookup - to only scale if Name == "notification-daemon".  Would probably be good to pull that logic out into a private GetPixbuf (string name) method that can we called in all three places.
Comment 8 Nicolò Chieffo 2009-05-14 16:28:00 UTC
Created attachment 134650 [details] [review]
notify_osd.patch

did you intend like this?
I preferred to add a method with a Gdk.Pixbuf as a parameter instead of a string.
So I could use the method for both the album art and the banshee icon.

Can I further improve this patch?
Comment 9 Nicolò Chieffo 2009-05-14 16:30:23 UTC
Created attachment 134651 [details] [review]
check_for_notifications_support.patch

I also attached this patch from ubuntu, to check if notifications are supported.
Comment 10 Gabriel Burt 2009-05-14 17:38:03 UTC
Nicolò, thanks for your patience...I think I incorrectly assumed we could somehow get larger versions of the Banshee and audio-generic icons - but that's really not straightforward to do.

So, I committed your original patch (and the upstream patch).  :)  Sorry for the wasted work, thanks a lot for the patch and for being so responsive on this.

Note that my daemon name was not "notification-daemon", but "Notification Daemon" - so I modified the patch to check for both.
Comment 11 Nicolò Chieffo 2009-05-14 20:37:27 UTC
It's ok, no problem! But my first patch does not correct the banshee fallback icon! did you add it by yourself?
Comment 12 Gabriel Burt 2009-05-14 22:27:38 UTC
I actually never intended to change the fallback.
Comment 13 Nicolò Chieffo 2009-05-14 22:56:24 UTC
But the fallback is resized to 42x42:
image.ScaleSimple (42, 42, Gdk.InterpType.Bilinear);
Comment 14 Gabriel Burt 2009-05-14 23:05:37 UTC
Oh I think I see - you're saying we can avoid keep those at 48x48 if !IsNotificationDaemon?
Comment 15 Nicolò Chieffo 2009-05-14 23:12:01 UTC
6 pixels are not so much better, but at least a little bit better.
Anyway, thanks for committing this!
Good night