diff options
Diffstat (limited to 'gnome2-apps/gnome-mount/libnotify.patch')
-rw-r--r-- | gnome2-apps/gnome-mount/libnotify.patch | 77 |
1 files changed, 77 insertions, 0 deletions
diff --git a/gnome2-apps/gnome-mount/libnotify.patch b/gnome2-apps/gnome-mount/libnotify.patch new file mode 100644 index 0000000000..35dc2f0d26 --- /dev/null +++ b/gnome2-apps/gnome-mount/libnotify.patch @@ -0,0 +1,77 @@ +--- src/gnome-mount.c.orig ++++ src/gnome-mount.c +@@ -41,7 +41,11 @@ + #include <gdk/gdkx.h> + #include "copy-paste/gnome-password-dialog.h" + #include <gnome-keyring.h> ++#include <gtk/gtk.h> ++ ++#ifdef ENABLE_NOTIFY + #include <libnotify/notify.h> ++#endif + + #if !defined(NOTIFY_EXPIRES_NEVER) + #define NOTIFY_EXPIRES_NEVER 0 +@@ -1549,17 +1553,21 @@ + + static guint unmount_cache_timeout_id = -1; + ++#ifdef ENABLE_NOTIFY + static NotifyNotification *unmount_note = NULL; ++#endif + + static gboolean unmount_note_is_eject = FALSE; + static char *unmount_note_drive_name = NULL; + ++#ifdef ENABLE_NOTIFY + static void + unmount_note_close_func (NotifyNotification *note, gpointer user_data) + { + g_debug ("in unmount_note_close_func()"); + unmount_note = NULL; + } ++#endif + + static gboolean + unmount_cache_timeout_func (gpointer data) +@@ -1602,13 +1610,16 @@ + g_strchug (unmount_note_drive_name); + g_debug ("Setting up 750ms timer for Flushing Cache dialog"); + unmount_cache_timeout_id = g_timeout_add (750, unmount_cache_timeout_func, NULL); ++#ifdef ENABLE_NOTIFY + unmount_note = NULL; ++#endif + } + + static void + unmount_cache_timeout_cancel (gboolean was_success) + { + g_source_remove (unmount_cache_timeout_id); ++#ifdef ENABLE_NOTIFY + if (unmount_note != NULL) { + if (was_success) { + char *summary; +@@ -1628,6 +1639,7 @@ + notify_notification_show (unmount_note, NULL); + } + } ++#endif + } + + static gboolean unmount_still_in_progress = FALSE; +--- configure.in.orig ++++ configure.in +@@ -100,8 +100,11 @@ + AC_SUBST(NAUTILUS_LIBS) + fi + +-PKG_CHECK_MODULES([NOTIFY], [libnotify >= 0.3.0], [enable_notify=yes], [enable_notify=yes]) +-if test "x$enable_notify" != "xno"; then ++AC_ARG_ENABLE(libnotify, ++ AS_HELP_STRING([--enable-libnotify],[Use libnotify]), ++ ,[enable_libnotify=yes]) ++if test "x$enable_libnotify" != "xno"; then ++ PKG_CHECK_MODULES([NOTIFY], [libnotify >= 0.3.0]) + AC_DEFINE_UNQUOTED([ENABLE_NOTIFY], 1, [Enable notifications with libnotify]) + AC_SUBST(NOTIFY_CFLAGS) + AC_SUBST(NOTIFY_LIBS) |