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 759786 - Add a warning message with MIME type if no matching loader found
Add a warning message with MIME type if no matching loader found
Status: RESOLVED OBSOLETE
Product: gdk-pixbuf
Classification: Platform
Component: general
git master
Other Linux
: Normal enhancement
: ---
Assigned To: gdk-pixbuf-maint
gdk-pixbuf-maint
Depends on:
Blocks:
 
 
Reported: 2015-12-22 19:31 UTC by Chris Mayo
Modified: 2018-05-22 13:19 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch adding warning message (804 bytes, patch)
2015-12-22 19:31 UTC, Chris Mayo
none Details | Review
Add guessed MIME type to unknown image format error (2.42 KB, patch)
2015-12-23 19:26 UTC, Chris Mayo
none Details | Review
Add the unknown MIME type to error message (2.26 KB, patch)
2016-12-21 16:37 UTC, Chris Mayo
none Details | Review
Add the unknown MIME type to error message (2.33 KB, patch)
2018-04-11 18:34 UTC, Chris Mayo
none Details | Review

Description Chris Mayo 2015-12-22 19:31:49 UTC
Created attachment 317794 [details] [review]
Patch adding warning message

Would make it easier to debug MIME database problems that prevent images loading.

Patch attached.
Comment 1 Christian Persch 2015-12-23 09:49:59 UTC
This function already returns a GError. It would be rather obnoxious if it output warnings on console; but the GError message might be improved by adding the mime type to it.
Comment 2 Chris Mayo 2015-12-23 19:26:38 UTC
Created attachment 317824 [details] [review]
Add guessed MIME type to unknown image format error

Only possible by adding a number of #ifdef's (attached) or duplicating code?
Comment 3 Bastien Nocera 2016-12-19 18:05:30 UTC
Review of attachment 317824 [details] [review]:

::: gdk-pixbuf/gdk-pixbuf-io.c
@@ +943,3 @@
+                             _("Couldn't recognize the image file format for file '%s'"
+#ifdef GDK_PIXBUF_USE_GIO_MIME
+                             "\nGuessed MIME type '%s'"

Two problems here:
- there's no way gettext will be able to work with this.
- There shouldn't be a linefeed in the error message.
Comment 4 Bastien Nocera 2016-12-19 18:05:55 UTC
Review of attachment 317794 [details] [review]:

As per chpe's comment
Comment 5 Chris Mayo 2016-12-21 16:37:03 UTC
Created attachment 342338 [details] [review]
Add the unknown MIME type to error message

Updated to:

* Make the messages all single strings
* Add braces with the first use of #ifdef because when true the if has two statements
* Keep the g_set_error_literal for the #else of the third #ifdef
Comment 6 Chris Mayo 2018-04-11 18:34:53 UTC
Created attachment 370819 [details] [review]
Add the unknown MIME type to error message

Updated for gdk-pixbuf-2.36.12.
Comment 7 GNOME Infrastructure Team 2018-05-22 13:19:12 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/gdk-pixbuf/issues/53.