gnome-mount r182 - in trunk: . src
- From: cosimoc svn gnome org
- To: svn-commits-list gnome org
- Subject: gnome-mount r182 - in trunk: . src
- Date: Fri, 27 Jun 2008 09:47:54 +0000 (UTC)
Author: cosimoc
Date: Fri Jun 27 09:47:54 2008
New Revision: 182
URL: http://svn.gnome.org/viewvc/gnome-mount?rev=182&view=rev
Log:
2008-06-27 Cosimo Cecchi <cosimoc gnome org>
* configure.in:
* src/gnome-mount.c: (unmount_cache_timeout_start),
(unmount_cache_timeout_cancel):
Make the dependency on libnotify really optional. (#511507).
Modified:
trunk/ChangeLog
trunk/configure.in
trunk/src/gnome-mount.c
Modified: trunk/configure.in
==============================================================================
--- trunk/configure.in (original)
+++ trunk/configure.in Fri Jun 27 09:47:54 2008
@@ -105,7 +105,7 @@
AC_SUBST(NAUTILUS_LIBS)
fi
-PKG_CHECK_MODULES([NOTIFY], [libnotify >= 0.3.0], [enable_notify=yes], [enable_notify=yes])
+PKG_CHECK_MODULES([NOTIFY], [libnotify >= 0.3.0], [enable_notify=yes], [enable_notify=no])
if test "x$enable_notify" != "xno"; then
AC_DEFINE_UNQUOTED([ENABLE_NOTIFY], 1, [Enable notifications with libnotify])
AC_SUBST(NOTIFY_CFLAGS)
Modified: trunk/src/gnome-mount.c
==============================================================================
--- trunk/src/gnome-mount.c (original)
+++ trunk/src/gnome-mount.c Fri Jun 27 09:47:54 2008
@@ -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;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]