Blob Blame History Raw
--- gthumb-2.7.3/src/gth-window-actions-callbacks.c.use-local-filename	2006-03-02 14:08:18.000000000 -0500
+++ gthumb-2.7.3/src/gth-window-actions-callbacks.c	2006-03-02 14:15:53.000000000 -0500
@@ -32,6 +32,8 @@
 #include <libgnomeui/libgnomeui.h>
 #include <libbonoboui.h>
 #include <libgnomevfs/gnome-vfs-ops.h>
+#include <libgnomevfs/gnome-vfs-uri.h>
+#include <libgnomevfs/gnome-vfs-utils.h>
 
 #include "async-pixbuf-ops.h"
 #include "catalog.h"
@@ -131,10 +133,21 @@
 {
 	GthWindow   *window = GTH_WINDOW (data);
 	ImageViewer *image_viewer = gth_window_get_image_viewer (window);
+        GnomeVFSURI *uri;
+        char *str_uri, *unescaped_str_uri;
+
+        uri = gnome_vfs_uri_new (gth_window_get_image_filename (window));
+
+        str_uri = gnome_vfs_uri_to_string (uri,
+                                           GNOME_VFS_URI_HIDE_TOPLEVEL_METHOD);
+        unescaped_str_uri = gnome_vfs_unescape_string (str_uri, NULL);
+        g_free (str_uri);
 
 	gth_window_save_pixbuf (window, 
 				image_viewer_get_current_pixbuf (image_viewer), 
-				gth_window_get_image_filename (window));
+				unescaped_str_uri);
+        g_free (unescaped_str_uri);
+        gnome_vfs_uri_unref (uri);
 }