From 6404fa33afc5b4961fea47f8eefd07f5b4ff913a Mon Sep 17 00:00:00 2001 From: lukefromdc Date: Sun, 23 Oct 2016 20:24:17 -0400 Subject: libunique builds: enable eject notifications We no longer need to use any GtkApplication features for this so enable it in libunique builds too. Tested with and without libunique in GTK 3.22 --- libcaja-private/caja-file-operations.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'libcaja-private/caja-file-operations.c') diff --git a/libcaja-private/caja-file-operations.c b/libcaja-private/caja-file-operations.c index 705a25b9..a1172533 100644 --- a/libcaja-private/caja-file-operations.c +++ b/libcaja-private/caja-file-operations.c @@ -55,9 +55,7 @@ #include #include #include -#if ENABLE_LIBUNIQUE == (FALSE) #include -#endif #include "caja-file-changes-queue.h" #include "caja-file-private.h" #include "caja-desktop-icon-file.h" @@ -195,7 +193,7 @@ typedef struct { #define COPY_FORCE _("Copy _Anyway") NotifyNotification *unmount_notify; -#if ENABLE_LIBUNIQUE == (FALSE) + void caja_application_notify_unmount_show (const gchar *message) { @@ -220,7 +218,7 @@ caja_application_notify_unmount_show (const gchar *message) notify_notification_show (unmount_notify, NULL); g_strfreev (strings); } -#endif + static void mark_desktop_file_trusted (CommonJob *common, GCancellable *cancellable, @@ -2099,9 +2097,9 @@ unmount_mount_callback (GObject *source_object, if (error != NULL) { g_error_free (error); } -#if ENABLE_LIBUNIQUE == (FALSE) + caja_application_notify_unmount_show ("It is now safe to remove the drive"); -#endif + eel_remove_weak_pointer (&data->parent_window); g_object_unref (data->mount); g_free (data); @@ -2120,9 +2118,9 @@ do_unmount (UnmountData *data) NULL, unmount_mount_callback, data); -#if ENABLE_LIBUNIQUE == (FALSE) + caja_application_notify_unmount_show ("writing data to the drive-do not unplug"); -#endif + } else { g_mount_unmount_with_operation (data->mount, 0, -- cgit v1.2.1