summaryrefslogtreecommitdiff
path: root/programs/gvfs-mount.c
diff options
context:
space:
mode:
authorAlexander Larsson <alexl@src.gnome.org>2007-09-13 13:15:17 +0000
committerAlexander Larsson <alexl@src.gnome.org>2007-09-13 13:15:17 +0000
commit5d734abfdf98c8fe925a66b3ae506f7b5851821e (patch)
treefc6c4e968430310217b7a9299caaea46eab6b8ba /programs/gvfs-mount.c
parentca15ee6eebe5269343b005b3f77775cf244f80d3 (diff)
downloadgvfs-5d734abfdf98c8fe925a66b3ae506f7b5851821e.tar.gz
Update mounting APIs
Original git commit by Alexander Larsson <alexl@redhat.com> at 1178202740 +0200 svn path=/trunk/; revision=502
Diffstat (limited to 'programs/gvfs-mount.c')
-rw-r--r--programs/gvfs-mount.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/programs/gvfs-mount.c b/programs/gvfs-mount.c
index 9d01655c..7a4539b7 100644
--- a/programs/gvfs-mount.c
+++ b/programs/gvfs-mount.c
@@ -74,10 +74,15 @@ ask_password_cb (GMountOperation *op,
}
static void
-mount_done_cb (GMountOperation *op,
- gboolean succeeded,
- GError *error)
+mount_done_cb (GObject *vfs,
+ GAsyncResult *res,
+ gpointer user_data)
{
+ gboolean succeeded;
+ GError *error = NULL;
+
+ succeeded = g_mount_for_location_finish (res, &error);
+
if (!succeeded)
g_print ("Error mounting location: %s\n", error->message);
@@ -98,9 +103,8 @@ mount (GFile *file)
op = g_mount_operation_new ();
g_signal_connect (op, "ask_password", (GCallback)ask_password_cb, NULL);
- g_signal_connect (op, "done", (GCallback)mount_done_cb, NULL);
- g_file_mount (file, op);
+ g_mount_for_location (file, op, mount_done_cb, op);
outstanding_mounts++;
}