summaryrefslogtreecommitdiff
blob: 2521b05263ad213ee66600d0e7b257e256bcb52d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
# fix libnotify automagic dep
# https://bugs.gentoo.org/show_bug.cgi?id=257753
diff -ur gnome-mount@181/ChangeLog gnome-mount@182/ChangeLog
--- gnome-mount@181/src/gnome-mount.c	2009-02-05 10:04:54.000000000 +0100
+++ gnome-mount@182/src/gnome-mount.c	2009-02-05 10:08:36.000000000 +0100
@@ -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;
--- gnome-mount@181/configure.in	2008-02-25 22:54:20.000000000 +0100
+++ gnome-mount@182/configure.in	2009-02-05 10:25:25.000000000 +0100
@@ -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)