[nautilus-actions] Fix export of items



commit 9acdc21912e085a3d43781b7282c92c6f6dfc26c
Author: Pierre Wieser <pwieser trychlos org>
Date:   Fri Apr 2 02:36:33 2010 +0200

    Fix export of items

 ChangeLog                 |    6 ++++++
 src/core/na-core-utils.c  |    4 ++--
 src/io-xml/naxml-writer.c |    8 ++++----
 3 files changed, 12 insertions(+), 6 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 6ae214d..946ea11 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2009-04-02 Pierre Wieser <pwieser trychlos org>
+
+	* src/core/na-core-utils.c (na_core_utils_file_exists):
+	* src/io-xml/naxml-writer.c (output_xml_to_file):
+	Takes an URI as the filename.
+
 2009-04-01 Pierre Wieser <pwieser trychlos org>
 
 	* src/api/na-object-api.h (na_object_prepare_for_paste):
diff --git a/src/core/na-core-utils.c b/src/core/na-core-utils.c
index 8360763..0347592 100644
--- a/src/core/na-core-utils.c
+++ b/src/core/na-core-utils.c
@@ -650,7 +650,7 @@ na_core_utils_file_delete( const gchar *path )
 
 /**
  * na_core_utils_file_exists:
- * @fname: a file full filename.
+ * @fname: a file full URI.
  *
  * Returns: %TRUE if the specified file exists, %FALSE else.
  *
@@ -662,7 +662,7 @@ na_core_utils_file_exists( const gchar *fname )
 	GFile *file;
 	gboolean exists;
 
-	file = g_file_new_for_path( fname );
+	file = g_file_new_for_uri( fname );
 	exists = g_file_query_exists( file, NULL );
 	g_object_unref( file );
 
diff --git a/src/io-xml/naxml-writer.c b/src/io-xml/naxml-writer.c
index 9fd1592..0ae0b4c 100644
--- a/src/io-xml/naxml-writer.c
+++ b/src/io-xml/naxml-writer.c
@@ -611,7 +611,7 @@ find_export_format_fn( GQuark format )
 /*
  * get_output_fname:
  * @item: the #NAObjectItme-derived object to be exported.
- * @folder: the path of the directoy where to write the output XML file.
+ * @folder: the URI of the directoy where to write the output XML file.
  * @format: the export format.
  *
  * Returns: a filename suitable for writing the output XML.
@@ -685,12 +685,12 @@ get_output_fname( const NAObjectItem *item, const gchar *folder, GQuark format )
 /**
  * output_xml_to_file:
  * @xml: the xml buffer.
- * @filename: the full path of the output filename.
+ * @filename: the full path of the output filename as an URI.
  * @msg: a GSList to append messages.
  *
  * Exports an item to the given filename.
  */
-void
+static void
 output_xml_to_file( const gchar *xml, const gchar *filename, GSList **msg )
 {
 	static const gchar *thisfn = "naxml_writer_output_xml_to_file";
@@ -702,7 +702,7 @@ output_xml_to_file( const gchar *xml, const gchar *filename, GSList **msg )
 	g_return_if_fail( xml );
 	g_return_if_fail( filename && g_utf8_strlen( filename, -1 ));
 
-	file = g_file_new_for_path( filename );
+	file = g_file_new_for_uri( filename );
 
 	stream = g_file_replace( file, NULL, FALSE, G_FILE_CREATE_NONE, NULL, &error );
 	if( error ){



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