From 43225d8aaa32cd5aac3c99a1b285d510839f8709 Mon Sep 17 00:00:00 2001 From: Denis Gorodnichev Date: Sat, 10 May 2014 16:37:49 +0400 Subject: fix drivemount crash workaround for bug https://bugzilla.gnome.org/show_bug.cgi?id=586392 --- drivemount/drive-button.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'drivemount') diff --git a/drivemount/drive-button.c b/drivemount/drive-button.c index 51f13c1c..94e3ae0f 100644 --- a/drivemount/drive-button.c +++ b/drivemount/drive-button.c @@ -800,18 +800,23 @@ run_command (DriveButton *self, const char *command) g_free (device_path); } +static void dummy_async_ready_callback(GObject *source_object, GAsyncResult *res, gpointer user_data) { + /* do nothing */ +} + static void mount_drive (DriveButton *self, GtkWidget *item) { if (self->volume) { GMountOperation *mount_op = gtk_mount_operation_new (NULL); g_volume_mount (self->volume, G_MOUNT_MOUNT_NONE, - mount_op, NULL, NULL, NULL); + mount_op, NULL, dummy_async_ready_callback, NULL); g_object_unref (mount_op); } else { g_return_if_reached(); } } + static void unmount_drive (DriveButton *self, GtkWidget *item) { @@ -822,12 +827,12 @@ unmount_drive (DriveButton *self, GtkWidget *item) if (mount) { g_mount_unmount_with_operation (mount, G_MOUNT_UNMOUNT_NONE, - NULL, NULL, NULL, NULL); + NULL, NULL, dummy_async_ready_callback, NULL); g_object_unref (mount); } } else if (self->mount) { g_mount_unmount_with_operation (self->mount, G_MOUNT_UNMOUNT_NONE, - NULL, NULL, NULL, NULL); + NULL, NULL, dummy_async_ready_callback, NULL); } else { g_return_if_reached(); } -- cgit v1.2.1