[evolution] Work around deprecation of g_mount_unmount().



commit 966f10fe2ddf8d153265be86407f185207988c2f
Author: Matthew Barnes <mbarnes redhat com>
Date:   Mon Jul 13 11:51:01 2009 -0400

    Work around deprecation of g_mount_unmount().

 plugins/publish-calendar/publish-calendar.c |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/plugins/publish-calendar/publish-calendar.c b/plugins/publish-calendar/publish-calendar.c
index 4f618a9..098b34b 100644
--- a/plugins/publish-calendar/publish-calendar.c
+++ b/plugins/publish-calendar/publish-calendar.c
@@ -129,7 +129,11 @@ unmount_done_cb (GObject *source_object, GAsyncResult *res, gpointer user_data)
 {
 	GError *error = NULL;
 
+#if GLIB_CHECK_VERSION(2,21,4)
+	g_mount_unmount_with_operation_finish (G_MOUNT (source_object), res, &error);
+#else
 	g_mount_unmount_finish (G_MOUNT (source_object), res, &error);
+#endif
 
 	if (error) {
 		g_warning ("Unmount failed: %s", error->message);
@@ -177,7 +181,11 @@ mount_ready_cb (GObject *source_object, GAsyncResult *res, gpointer user_data)
 
 	mount = g_file_find_enclosing_mount (G_FILE (source_object), NULL, NULL);
 	if (mount)
+#if GLIB_CHECK_VERSION(2,21,4)
+		g_mount_unmount_with_operation (mount, G_MOUNT_UNMOUNT_NONE, NULL, NULL, unmount_done_cb, NULL);
+#else
 		g_mount_unmount (mount, G_MOUNT_UNMOUNT_NONE, NULL, unmount_done_cb, NULL);
+#endif
 
 	g_object_unref (source_object);
 }



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