=== modified file 'configure.in'
--- configure.in	2008-02-06 10:44:54 +0000
+++ configure.in	2008-02-10 15:35:06 +0000
@@ -57,7 +57,7 @@
 AM_GST_ELEMENT_CHECK(vorbisenc,,AC_MSG_WARN([The 'vorbisenc' element was not found. This will cause encoding to Ogg Vorbis to fail.]))
 AM_GST_ELEMENT_CHECK(flacenc,,AC_MSG_WARN([The 'flacenc' element was not found. This will cause encoding to FLAC to fail.]))
 AM_GST_ELEMENT_CHECK(wavenc,,AC_MSG_WARN([The 'wavenc' element was not found. This will cause encoding to Wave to fail.]))
-AM_GST_ELEMENT_CHECK(gnomevfssink,,AC_MSG_WARN([The 'gnomevfssink' element was not found. This will cause Sound Juicer to fail at runtime.]))
+AM_GST_ELEMENT_CHECK(giosink,,AC_MSG_WARN([The 'giosink' element was not found. This will cause Sound Juicer to fail at runtime.]))
 
 # Find GNOME Media Profiles
 PKG_CHECK_MODULES(MEDIA_PROFILES, gnome-media-profiles >= 2.11.91)

=== modified file 'libjuicer/sj-extractor.c'
--- libjuicer/sj-extractor.c	2008-01-18 17:15:12 +0000
+++ libjuicer/sj-extractor.c	2008-02-10 16:25:17 +0000
@@ -60,7 +60,7 @@
 #define DEFAULT_AUDIO_PROFILE_NAME "cdlossy"
 
 /* Element names */
-#define FILE_SINK "gnomevfssink"
+#define FILE_SINK "giosink"
 
 struct SjExtractorPrivate {
   /** The current audio profile */
@@ -308,17 +308,6 @@
   g_error_free (error);
 }
 
-/**
- * Callback from the gnomevfssink to say that its about to overwrite a file.
- * For now, Just Say Yes.  If this API will stay in 0.9, then rewrite
- * SjExtractor.
- */
-static gboolean
-just_say_yes (GstElement *element, gpointer filename, gpointer user_data)
-{
-  return TRUE;
-}
-
 static void
 build_pipeline (SjExtractor *extractor)
 {
@@ -379,7 +368,6 @@
                  _("Could not create GStreamer file output"));
     return;
   }
-  g_signal_connect (G_OBJECT (priv->filesink), "allow-overwrite", G_CALLBACK (just_say_yes), extractor);
 
   /* Add the elements to the pipeline */
   gst_bin_add_many (GST_BIN (priv->pipeline), priv->cdsrc, priv->queue, priv->encoder, priv->filesink, NULL);
@@ -465,7 +453,7 @@
 }
 
 void
-sj_extractor_extract_track (SjExtractor *extractor, const TrackDetails *track, const char* url, GError **error)
+sj_extractor_extract_track (SjExtractor *extractor, const TrackDetails *track, GFile *file, GError **error)
 {
   GParamSpec *spec;
   GstStateChangeReturn state_ret;
@@ -473,10 +461,11 @@
   GstIterator *iter;
   GstTagSetter *tagger;
   gboolean done;
+  char *uri;
 
   g_return_if_fail (SJ_IS_EXTRACTOR (extractor));
 
-  g_return_if_fail (url != NULL);
+  g_return_if_fail (file != NULL);
   g_return_if_fail (track != NULL);
 
   priv = extractor->priv;
@@ -499,7 +488,9 @@
 
   /* Set the output filename */
   gst_element_set_state (priv->filesink, GST_STATE_NULL);
-  g_object_set (G_OBJECT (priv->filesink), "location", url, NULL);
+  uri = g_file_get_uri (file);
+  g_object_set (G_OBJECT (priv->filesink), "location", uri, NULL);
+  g_free (uri);
 
   /* Set the metadata */
   iter = gst_bin_iterate_all_by_interface (GST_BIN (priv->pipeline), GST_TYPE_TAG_SETTER);

=== modified file 'libjuicer/sj-extractor.h'
--- libjuicer/sj-extractor.h	2007-03-26 09:48:26 +0000
+++ libjuicer/sj-extractor.h	2008-02-10 14:58:58 +0000
@@ -25,6 +25,7 @@
 
 #include <glib/gmacros.h>
 #include <glib-object.h>
+#include <gio/gio.h>
 #include <profiles/audio-profile.h>
 #include "sj-structures.h"
 
@@ -66,7 +67,7 @@
 
 void sj_extractor_set_paranoia (SjExtractor *extractor, const int paranoia_mode);
 
-void sj_extractor_extract_track (SjExtractor *extractor, const TrackDetails *track, const char* url, GError **error);
+void sj_extractor_extract_track (SjExtractor *extractor, const TrackDetails *track, GFile *file, GError **error);
 
 void sj_extractor_cancel_extract (SjExtractor *extractor);
 

=== modified file 'libjuicer/sj-metadata-musicbrainz.c'
--- libjuicer/sj-metadata-musicbrainz.c	2008-01-23 15:43:44 +0000
+++ libjuicer/sj-metadata-musicbrainz.c	2008-02-10 15:59:52 +0000
@@ -578,7 +578,7 @@
   }
 }
 
-static char *
+static GFile *
 mb_get_submit_url (SjMetadata *metadata)
 {
   SjMetadataMusicbrainzPrivate *priv;
@@ -589,7 +589,7 @@
   priv = SJ_METADATA_MUSICBRAINZ (metadata)->priv;
 
   if (mb_GetWebSubmitURL(priv->mb, url, 1024)) {
-    return g_strdup(url);
+    return g_file_new_for_uri (url);
   } else {
     return NULL;
   }

=== modified file 'libjuicer/sj-metadata.c'
--- libjuicer/sj-metadata.c	2007-07-09 16:17:06 +0000
+++ libjuicer/sj-metadata.c	2008-02-10 15:59:23 +0000
@@ -112,7 +112,7 @@
   SJ_METADATA_GET_CLASS (metadata)->list_albums (metadata, error);
 }
 
-char *
+GFile *
 sj_metadata_get_submit_url (SjMetadata *metadata)
 {
   if (SJ_METADATA_GET_CLASS (metadata)->get_submit_url)

=== modified file 'libjuicer/sj-metadata.h'
--- libjuicer/sj-metadata.h	2007-07-09 16:49:18 +0000
+++ libjuicer/sj-metadata.h	2008-02-10 15:59:08 +0000
@@ -23,6 +23,7 @@
 
 #include <glib-object.h>
 #include <glib/gerror.h>
+#include <gio/gio.h>
 
 G_BEGIN_DECLS
 
@@ -45,7 +46,7 @@
 
   /* Virtual Table */
   void (*list_albums) (SjMetadata *metadata, GError **error);
-  char *(*get_submit_url) (SjMetadata *metadata);
+  GFile *(*get_submit_url) (SjMetadata *metadata);
 };
 
 GType sj_metadata_get_type (void);
@@ -53,7 +54,7 @@
 void sj_metadata_set_proxy (SjMetadata *metadata, const char* proxy);
 void sj_metadata_set_proxy_port (SjMetadata *metadata, const int proxy_port);
 void sj_metadata_list_albums (SjMetadata *metadata, GError **error);
-char *sj_metadata_get_submit_url (SjMetadata *metadata);
+GFile *sj_metadata_get_submit_url (SjMetadata *metadata);
 
 G_END_DECLS
 

=== modified file 'libjuicer/sj-util.c'
--- libjuicer/sj-util.c	2008-02-06 10:44:54 +0000
+++ libjuicer/sj-util.c	2008-02-10 14:59:26 +0000
@@ -29,7 +29,7 @@
  * Stolen from gnome-vfs/programs/gnomevfs-mkdir.c (v1.3)
  */
 gboolean
-make_directory_with_parents_for_file (GFile * uri, GError **error_out)
+make_directory_with_parents (GFile * uri, GError **error_out)
 {
 	gboolean result;
 	GFile *parent, *work_uri;
@@ -79,19 +79,6 @@
 	return result;
 }
 
-gboolean
-make_directory_with_parents (const gchar * text_uri, GError **error)
-{
-	GFile *uri;
-	gboolean result;
-
-	uri = g_file_new_for_uri (text_uri);
-	result = make_directory_with_parents_for_file (uri, error);
-	g_object_unref (uri);
-
-	return result;
-}
-
 /* Pass NULL to use g_free */
 void
 g_list_deep_free (GList *l, GFunc free_func)
@@ -225,21 +212,19 @@
     return strdup (home_dir);
 }
 
-char *
+GFile *
 sj_get_default_music_directory (void)
 {
-	char *uri, *dir;
-	GFile *gfile;
+	char *dir;
+	GFile *file;
 
 	dir = xdg_user_dir_lookup ("MUSIC");
 	if (dir == NULL) {
-	  dir = g_strdup (g_get_home_dir ());
+	  return g_file_new_for_path (g_get_home_dir ());
 	}
-	gfile = g_file_new_for_path (dir);
-	uri = g_file_get_uri (gfile);
-	g_object_unref (gfile);
+	file = g_file_new_for_path (dir);
 	g_free (dir);
-	return uri;
+	return file;
 }
 
 void

=== modified file 'libjuicer/sj-util.h'
--- libjuicer/sj-util.h	2008-02-06 10:44:54 +0000
+++ libjuicer/sj-util.h	2008-02-10 04:07:56 +0000
@@ -27,12 +27,11 @@
 #include <gio/gio.h>
 #include <gtk/gtkfilechooser.h>
 
-gboolean make_directory_with_parents_for_file (GFile * uri, GError **error);
-gboolean make_directory_with_parents (const gchar * text_uri, GError **error);
+gboolean make_directory_with_parents (GFile *uri, GError **error);
 
 void g_list_deep_free (GList *l, GFunc free_func);
 
 void sj_add_default_dirs (GtkFileChooser *dialog);
-char *sj_get_default_music_directory (void);
+GFile *sj_get_default_music_directory (void);
 
 #endif /* SJ_UTIL_H */

=== modified file 'src/sj-extracting.c'
--- src/sj-extracting.c	2008-02-06 10:44:54 +0000
+++ src/sj-extracting.c	2008-02-10 15:15:52 +0000
@@ -118,11 +118,11 @@
  * extern variables 'path_pattern' and 'file_pattern'. Free the result when you
  * have finished with it.
  */
-static char*
+static GFile *
 build_filename (const TrackDetails *track, GError **error)
 {
   GFile *uri, *new; 
-  gchar *realfile, *realpath, *filename, *string, *scheme;
+  gchar *realfile, *realpath, *filename, *scheme;
   const gchar *extension;
   size_t len_extension;
   int max_realfile = INT_MAX;
@@ -130,11 +130,9 @@
 
   g_object_get (extractor, "profile", &profile, NULL);
 
-  uri = g_file_new_for_uri (base_uri);
-
   realpath = filepath_parse_pattern (path_pattern, track);
-  new = g_file_get_child (uri, realpath);
-  g_object_unref (uri); uri = new;
+  new = g_file_get_child (base_uri, realpath);
+  uri = new;
   g_free (realpath);
 
   extension = gm_audio_profile_get_extension (profile);
@@ -162,9 +160,7 @@
   g_object_unref (uri); uri = new;
   g_free (filename); g_free (realfile);
 
-  string = g_file_get_uri (uri);
-  g_object_unref (uri);
-  return string;
+  return uri;
 }
 
 static gboolean
@@ -245,17 +241,14 @@
  * Return true on continue, false on skip.
  */
 static goffset
-check_file_size (const char* uri)
+check_file_size (GFile *uri)
 {
-  GFile *gfile;
   GFileInfo *gfile_info;
   GError *error = NULL;
   goffset size;
  
-  gfile = g_file_new_for_uri (uri);
-  gfile_info = g_file_query_info (gfile, G_FILE_ATTRIBUTE_STANDARD_SIZE, 0,
+  gfile_info = g_file_query_info (uri, G_FILE_ATTRIBUTE_STANDARD_SIZE, 0,
                                   NULL, &error);
-  g_object_unref (gfile);
 
   /* No existing file */
   if (!gfile_info && error->code == G_IO_ERROR_NOT_FOUND) {
@@ -279,22 +272,19 @@
 
 
 static gboolean
-confirm_overwrite_existing_file (const char* uri, int *overwrite_mode, goffset info_size)
+confirm_overwrite_existing_file (GFile *uri, int *overwrite_mode, goffset info_size)
 { 
   OverwriteDialogResponse ret;
   GtkWidget *dialog;
   char *filename, *size;
-  GFile *gfile;
  
-  gfile = g_file_new_for_uri (uri);
-  filename = g_file_get_parse_name (gfile);
+  filename = g_file_get_parse_name (uri);
   size = g_format_size_for_display (info_size);
   dialog = gtk_message_dialog_new (GTK_WINDOW (main_window), GTK_DIALOG_MODAL,
                                    GTK_MESSAGE_QUESTION,
                                    GTK_BUTTONS_NONE,
                                    _("A file called '%s' exists, size %s.\nDo you want to skip this track or overwrite it?"),
                                    filename, size);
-  g_object_unref (gfile);
   g_free (filename);
   g_free (size);
   gtk_dialog_add_button (GTK_DIALOG (dialog), _("_Skip"), BUTTON_SKIP);
@@ -336,20 +326,18 @@
  * directory.
  */
 static char*
-create_directory_for (const char* url, GError **error)
+create_directory_for (GFile *uri, GError **error)
 {
   gboolean res;
-  GFile *uri, *parent;
+  GFile *parent;
   char *string;
   GError *io_error = NULL;
 
-  g_return_val_if_fail (url != NULL, NULL);
+  g_return_val_if_fail (uri != NULL, NULL);
 
-  uri = g_file_new_for_uri (url);
   parent = g_file_get_parent (uri);
-  g_object_unref (uri);
 
-  res = make_directory_with_parents_for_file (parent, &io_error);
+  res = make_directory_with_parents (parent, &io_error);
   if (!res) {
     if (io_error->code != G_IO_ERROR_EXISTS) {
       g_set_error (error, SJ_ERROR, SJ_ERROR_CD_PERMISSION_ERROR,
@@ -382,18 +370,19 @@
     g_assert_not_reached ();
   } else {
     TrackDetails *track = NULL;
-    char *file_path = NULL, *directory;
+    char *directory;
+    GFile *file;
     GError *error = NULL;
 
     /* Pop the next track to extract */
     gtk_tree_model_get (GTK_TREE_MODEL (track_store), &current, COLUMN_DETAILS, &track, -1);
     /* Build the filename for this track */
-    file_path = build_filename (track, &error);
+    file = build_filename (track, &error);
     if (error) {
       goto error;
     }
     /* And create the directory it lives in */
-    directory = create_directory_for (file_path, &error);
+    directory = create_directory_for (file, &error);
     if (error) {
       goto error;
     }
@@ -402,7 +391,7 @@
 
 
     goffset file_size;
-    file_size = check_file_size (file_path);
+    file_size = check_file_size (file);
 
     /* Skip if destination file can't be accessed (unexpected error). */
     /* Skip existing files if "skip all" is selected. */
@@ -415,7 +404,7 @@
     /* What if the file already exists? */
     if ((file_size > MIN_FILE_SIZE) &&
         (*overwrite_mode != OVERWRITE_ALL) &&
-        (confirm_overwrite_existing_file (file_path, overwrite_mode, file_size) == FALSE)) {
+        (confirm_overwrite_existing_file (file, overwrite_mode, file_size) == FALSE)) {
       on_completion_cb (NULL, overwrite_mode);
       return;
     }
@@ -437,7 +426,7 @@
     gtk_tree_path_free(path);
 
     /* Now actually do the extraction */
-    sj_extractor_extract_track (extractor, track, file_path, &error);
+    sj_extractor_extract_track (extractor, track, file, &error);
     if (error) {
       goto error;
     }
@@ -446,7 +435,7 @@
     on_error_cb (NULL, error, NULL);
     g_error_free (error);
 local_cleanup:
-    g_free (file_path);
+    g_object_unref (file);
   }
 }
 
@@ -852,20 +841,17 @@
   const char *p;
   char *tmp, *str, *filesystem_type = NULL;
   GString *s;
-  GFile *base_gfile;
   GFileInfo *fs_info;
 
   if (pattern == NULL || pattern[0] == 0)
     return g_strdup (" ");
   
-  base_gfile = g_file_new_for_uri (base_uri);
-  fs_info = g_file_query_filesystem_info (base_gfile, G_FILE_ATTRIBUTE_FILESYSTEM_TYPE,
+  fs_info = g_file_query_filesystem_info (base_uri, G_FILE_ATTRIBUTE_FILESYSTEM_TYPE,
                                           NULL, NULL);
   if (fs_info) {
     filesystem_type = g_file_info_get_attribute_as_string (fs_info, G_FILE_ATTRIBUTE_FILESYSTEM_TYPE);
     g_object_unref (fs_info);
   }
-  g_object_unref (base_gfile);
 
   s = g_string_new (NULL);
 

=== modified file 'src/sj-main.c'
--- src/sj-main.c	2008-02-06 10:44:54 +0000
+++ src/sj-main.c	2008-02-10 16:06:20 +0000
@@ -90,7 +90,7 @@
 GtkWidget *current_message_area;
 
 const char *path_pattern, *file_pattern;
-char *base_uri;
+GFile *base_uri;
 NautilusBurnDrive *drive = NULL;
 gboolean strip_chars;
 gboolean eject_finished;
@@ -101,7 +101,7 @@
 static gint total_no_of_tracks;
 static gint no_of_tracks_selected;
 static AlbumDetails *current_album;
-static char *current_submit_url = NULL;
+static GFile *current_submit_url = NULL;
 
 gboolean autostart = FALSE, autoplay = FALSE;
 
@@ -720,11 +720,13 @@
 static void baseuri_changed_cb (GConfClient *client, guint cnxn_id, GConfEntry *entry, gpointer user_data)
 {
   g_assert (strcmp (entry->key, GCONF_BASEURI) == 0);
-  g_free (base_uri);
+  if (base_uri) {
+    g_object_unref (base_uri);
+  }
   if (entry->value == NULL) {
     base_uri = sj_get_default_music_directory ();
   } else {
-    base_uri = g_strdup (gconf_value_get_string (entry->value));
+    base_uri = g_file_new_for_uri (gconf_value_get_string (entry->value));
   }
   /* TODO: sanity check the URI somewhat */
 }
@@ -931,7 +933,9 @@
   if (!drive)
     sj_debug (DEBUG_CD, "Attempting to re-read NULL drive\n");
 
-  g_free (current_submit_url);
+  if (current_submit_url) {
+    g_object_unref (current_submit_url);
+  }
   current_submit_url = NULL;
   gtk_widget_set_sensitive (submit_menuitem, FALSE);
 
@@ -1259,7 +1263,8 @@
   GError *error = NULL;
 
   if (current_submit_url) {
-    if (!gnome_url_show (current_submit_url, &error)) {
+    char *uri = g_file_get_uri (current_submit_url);
+    if (!gnome_url_show (uri, &error)) {
       GtkWidget *dialog;
 
       dialog = gtk_message_dialog_new (GTK_WINDOW (main_window),
@@ -1276,6 +1281,7 @@
       gtk_widget_destroy (dialog);
       g_error_free (error);
     }
+    g_free (uri);
   }
 
 }
@@ -1847,7 +1853,7 @@
 
   nautilus_burn_shutdown ();
 
-  g_free (base_uri);
+  g_object_unref (base_uri);
   g_object_unref (metadata);
   g_object_unref (extractor);
   g_object_unref (gconf_client);

=== modified file 'src/sj-prefs.c'
--- src/sj-prefs.c	2008-01-23 16:39:59 +0000
+++ src/sj-prefs.c	2008-02-10 14:47:34 +0000
@@ -189,11 +189,14 @@
     base_uri = gconf_value_get_string (entry->value);
 
   if (base_uri == NULL || base_uri[0] == '\0') {
-    char *dir;
+    GFile *dir;
+    char *dir_uri;
 
     dir = sj_get_default_music_directory ();
-    gtk_file_chooser_set_current_folder_uri (GTK_FILE_CHOOSER (basepath_fcb), dir);
-    g_free (dir);
+    dir_uri = g_file_get_uri (dir);
+    gtk_file_chooser_set_current_folder_uri (GTK_FILE_CHOOSER (basepath_fcb), dir_uri);
+    g_free (dir_uri);
+    g_object_unref (dir);
   } else {
     g_return_if_fail (entry->value->type == GCONF_VALUE_STRING);
     current_uri = gtk_file_chooser_get_current_folder_uri (GTK_FILE_CHOOSER (basepath_fcb));

=== modified file 'src/sound-juicer.h'
--- src/sound-juicer.h	2007-12-22 14:34:12 +0000
+++ src/sound-juicer.h	2008-02-10 14:55:06 +0000
@@ -31,6 +31,7 @@
 #include <nautilus-burn-drive.h>
 #include <gconf/gconf-client.h>
 #include <glade/glade-xml.h>
+#include <gio/gio.h>
 #include <gtk/gtkwidget.h>
 #include <gtk/gtk.h>
 #include <gtk/gtkliststore.h>
@@ -101,7 +102,7 @@
 /**
  * The root path to write files too
  */
-extern char *base_uri;
+extern GFile *base_uri;
 
 /**
  * The pattern to expand when naming folders

