[eog] Revert "Use plain gdk_pixbuf_loader_new(), not new_with_mime_type()"
- From: Felix Riemann <friemann src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [eog] Revert "Use plain gdk_pixbuf_loader_new(), not new_with_mime_type()"
- Date: Mon, 20 Apr 2020 17:09:45 +0000 (UTC)
commit fe857959faca9d5e8a84b884a38639b45e847f81
Author: Felix Riemann <friemann gnome org>
Date: Mon Apr 20 19:01:22 2020 +0200
Revert "Use plain gdk_pixbuf_loader_new(), not new_with_mime_type()"
This reverts commit 31d5eded183dd33bec9ac52c47a6f4a97c4eea33.
Turns out that MIME detection based on file data only works for types
that have magic bytes defined in the MIME database. Checking the MIME
type in eog has the advantage that the filename is available as fallback.
Fixes #124.
src/eog-image.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
---
diff --git a/src/eog-image.c b/src/eog-image.c
index 5c627c8e..55cb1916 100644
--- a/src/eog-image.c
+++ b/src/eog-image.c
@@ -990,7 +990,14 @@ eog_image_real_load (EogImage *img,
#endif
if (!use_rsvg) {
- loader = gdk_pixbuf_loader_new ();
+ loader = gdk_pixbuf_loader_new_with_mime_type (mime_type, error);
+
+ if (error && *error) {
+ g_error_free (*error);
+ *error = NULL;
+
+ loader = gdk_pixbuf_loader_new ();
+ }
g_signal_connect_object (G_OBJECT (loader),
"size-prepared",
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]