[Xfce4-commits] <ristretto:master> Provide mime-type when loading image
Stephan Arts
noreply at xfce.org
Sun Mar 4 11:26:01 CET 2012
Updating branch refs/heads/master
to e8e9f2989582d7ac39ba4e0f40dac96cbd463782 (commit)
from 40bd604d835cf5d113f416107730eb145984b2f5 (commit)
commit e8e9f2989582d7ac39ba4e0f40dac96cbd463782
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 16093b8..3d954b9 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