[eog: 4/6] Use rsvg_handle_set_base_gfile() instead of converting to a path



commit bebe2b2747738cf0b30562f8eb122794291a5ea1
Author: Federico Mena Quintero <federico gnome org>
Date:   Wed Feb 20 14:20:35 2019 -0600

    Use rsvg_handle_set_base_gfile() instead of converting to a path
    
    The old code was incorrectly calling rsvg_handle_set_base_uri() with a
    path name, not a URI.

 src/eog-image.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)
---
diff --git a/src/eog-image.c b/src/eog-image.c
index b74addf7..8a61e0d8 100644
--- a/src/eog-image.c
+++ b/src/eog-image.c
@@ -976,12 +976,9 @@ eog_image_real_load (EogImage *img,
                if (!strcmp (mime_type, "image/svg+xml")
                    || !strcmp (mime_type, "image/svg+xml-compressed")
                ) {
-                       gchar *file_path;
                        /* Keep the object for rendering */
                        priv->svg = rsvg_handle_new ();
-                       file_path = g_file_get_path (priv->file);
-                       rsvg_handle_set_base_uri (priv->svg, file_path);
-                       g_free (file_path);
+                       rsvg_handle_set_base_gfile (priv->svg, priv->file);
 
                        /* Use 96dpi when rendering SVG documents with units
                         * different then pixels. This value is specified in


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]