[Xfce4-commits] <ristretto:ristretto-0.3> Provide mime-type when loading image
Stephan Arts
noreply at xfce.org
Sun Mar 4 11:26:03 CET 2012
Updating branch refs/heads/ristretto-0.3
to 8dd741057f7b935d8e7c327017d850388ba77767 (commit)
from a60fc2673dcad9270cd30572261f4eb062bb4d7c (commit)
commit 8dd741057f7b935d8e7c327017d850388ba77767
Author: Stephan Arts <stephan at xfce.org>
Date: Sun Mar 4 11:22:22 2012 +0100
Provide mime-type when loading image
Do not let gdk guess it, it makes mistakes.
src/image_viewer.c | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/src/image_viewer.c b/src/image_viewer.c
index aed2fa2..f954b88 100644
--- a/src/image_viewer.c
+++ b/src/image_viewer.c
@@ -1525,7 +1525,12 @@ rstto_image_viewer_load_image (
viewer->priv->transaction = NULL;
}
- transaction->loader = gdk_pixbuf_loader_new();
+ transaction->loader = gdk_pixbuf_loader_new_with_mime_type (rstto_file_get_content_type (file), NULL);
+ /* HACK HACK HACK */
+ if (transaction->loader == NULL)
+ {
+ transaction->loader = gdk_pixbuf_loader_new();
+ }
transaction->cancellable = g_cancellable_new();
transaction->buffer = g_new0 (guchar, RSTTO_IMAGE_VIEWER_BUFFER_SIZE);
transaction->file = file;
More information about the Xfce4-commits
mailing list