]> www.fi.muni.cz Git - evince.git/blobdiff - tiff/tiff-document.c
Updated Dzongkha translations
[evince.git] / tiff / tiff-document.c
index cb64678bf95b957d152c4dd9d17b29b2c8b55aef..9f465a7c5fc2293aa381cec4e530edc5e30fa259 100644 (file)
 #include "ev-document-thumbnails.h"
 #include "ev-ps-exporter.h"
 
-#include <libgnomevfs/gnome-vfs-uri.h>
-#include <libgnomevfs/gnome-vfs-utils.h>
-#include <libgnomevfs/gnome-vfs-ops.h>
-#include <libgnomevfs/gnome-vfs-xfer.h>
-
 struct _TiffDocumentClass
 {
   GObjectClass parent_class;
@@ -93,7 +88,6 @@ tiff_document_load (EvDocument  *document,
   TIFF *tiff;
 
   push_handlers ();
-  /* FIXME: We could actually load uris  */
   filename = g_filename_from_uri (uri, NULL, error);
   if (!filename)
     {
@@ -116,6 +110,7 @@ tiff_document_load (EvDocument  *document,
     }
   tiff_document->tiff = tiff;
   g_free (tiff_document->uri);
+  g_free (filename);
   tiff_document->uri = g_strdup (uri);
 
   pop_handlers ();
@@ -128,31 +123,8 @@ tiff_document_save (EvDocument  *document,
                      GError     **error)
 {              
        TiffDocument *tiff_document = TIFF_DOCUMENT (document);
-       GnomeVFSResult result;
-       GnomeVFSURI *source_uri;
-       GnomeVFSURI *target_uri;
-       
-       if (!tiff_document->uri)
-               return FALSE;
-       
-       source_uri = gnome_vfs_uri_new (tiff_document->uri);
-       target_uri = gnome_vfs_uri_new (uri);
-
-       result = gnome_vfs_xfer_uri (source_uri, target_uri, 
-                                    GNOME_VFS_XFER_DEFAULT | GNOME_VFS_XFER_FOLLOW_LINKS,
-                                    GNOME_VFS_XFER_ERROR_MODE_ABORT,
-                                    GNOME_VFS_XFER_OVERWRITE_MODE_REPLACE,
-                                    NULL,
-                                    NULL);
-       gnome_vfs_uri_unref (target_uri);
-       gnome_vfs_uri_unref (source_uri);
-    
-       if (result != GNOME_VFS_OK)
-               g_set_error (error,
-                            EV_DOCUMENT_ERROR,
-                            0,
-                            gnome_vfs_result_to_string (result));                      
-       return (result == GNOME_VFS_OK);
+
+       return ev_xfer_uri_simple (tiff_document->uri, uri, error); 
 }
 
 static int