GNOME Bugzilla – Bug 648815
SVGZ icons in notification GNOME3
Last modified: 2015-04-30 19:57:37 UTC
I want give a suggestion to add support icons in format SVG and SVGZ to "notify deamon" in GNOME3.
notification-daemon supports SVG. Only SVGZ is unsupported. GNOME Shell is also affected, see bug #655403. Please rename to indicate that the problem affects only SVGZ.
Mass-fixing incorrect assignee and QA contact scheme for notification-daemon so interested people can follow its development. (See 606364#c1 for ref.)
librsvg supports svgz files, but gdkpixbuf fails to load images with .svgz extension. There are multiple calls to _gdk_pixbuf_get_module when using gdk_pixbuf_new_from_file_at_size function to load file. Adding debug info in _gdk_pixbuf_get_module function at first call it returs 'image/svg+xml', but in second call it returns 'application/gzip' mime type for *.svgz file. Probably this is not bug with gdkpixbuf, but with gio or librsvg: 1. gio function g_content_type_guess returns wrong mime type based on data (gdkpixbuf first tries to get mimetype based on data not filename). 2. librsvg simply are missing one more mime type in pixbuf loader - application/gzip. image/svg+xml-compressed is subclass of application/gzip.
It would make sense to treat application/gzip like text/plain in _gdk_pixbuf_get_module, and retry with the filename in that case.
Created attachment 301947 [details] [review] gdk-pixbuf-io: treat application/gzip like text/plain Your suggestion works. :)
Review of attachment 301947 [details] [review]: ::: gdk-pixbuf/gdk-pixbuf-io.c @@ +899,3 @@ + application_gzip = g_str_equal (mime_type, "application/gzip"); + + if ((uncertain || text_plain || application_gzip) && filename != NULL) { I would prefer to keep the strcmp's inline so we don't do them unnecessarily
Created attachment 301989 [details] [review] gdk-pixbuf-io: treat application/gzip like text/plain
Review of attachment 301989 [details] [review]: ok, thanks