Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 257753
Collapse All | Expand All

(-)gnome-mount@181/src/gnome-mount.c (+12 lines)
Lines 41-47 Link Here
41
#include <gdk/gdkx.h>
41
#include <gdk/gdkx.h>
42
#include "copy-paste/gnome-password-dialog.h"
42
#include "copy-paste/gnome-password-dialog.h"
43
#include <gnome-keyring.h>
43
#include <gnome-keyring.h>
44
#include <gtk/gtk.h>
45
46
#ifdef ENABLE_NOTIFY
44
#include <libnotify/notify.h>
47
#include <libnotify/notify.h>
48
#endif
45
49
46
#if !defined(NOTIFY_EXPIRES_NEVER)
50
#if !defined(NOTIFY_EXPIRES_NEVER)
47
#define NOTIFY_EXPIRES_NEVER 0
51
#define NOTIFY_EXPIRES_NEVER 0
Lines 1549-1565 Link Here
1549
1553
1550
static guint unmount_cache_timeout_id = -1;
1554
static guint unmount_cache_timeout_id = -1;
1551
1555
1556
#ifdef ENABLE_NOTIFY
1552
static NotifyNotification *unmount_note = NULL;
1557
static NotifyNotification *unmount_note = NULL;
1558
#endif
1553
1559
1554
static gboolean unmount_note_is_eject = FALSE;
1560
static gboolean unmount_note_is_eject = FALSE;
1555
static char *unmount_note_drive_name = NULL;
1561
static char *unmount_note_drive_name = NULL;
1556
1562
1563
#ifdef ENABLE_NOTIFY
1557
static void
1564
static void
1558
unmount_note_close_func (NotifyNotification *note, gpointer user_data)
1565
unmount_note_close_func (NotifyNotification *note, gpointer user_data)
1559
{
1566
{
1560
       g_debug ("in unmount_note_close_func()");
1567
       g_debug ("in unmount_note_close_func()");
1561
       unmount_note = NULL;
1568
       unmount_note = NULL;
1562
}
1569
}
1570
#endif
1563
1571
1564
static gboolean
1572
static gboolean
1565
unmount_cache_timeout_func (gpointer data)
1573
unmount_cache_timeout_func (gpointer data)
Lines 1602-1614 Link Here
1602
	g_strchug (unmount_note_drive_name);
1610
	g_strchug (unmount_note_drive_name);
1603
	g_debug ("Setting up 750ms timer for Flushing Cache dialog");
1611
	g_debug ("Setting up 750ms timer for Flushing Cache dialog");
1604
	unmount_cache_timeout_id = g_timeout_add (750, unmount_cache_timeout_func, NULL);
1612
	unmount_cache_timeout_id = g_timeout_add (750, unmount_cache_timeout_func, NULL);
1613
#ifdef ENABLE_NOTIFY
1605
	unmount_note = NULL;
1614
	unmount_note = NULL;
1615
#endif
1606
}
1616
}
1607
1617
1608
static void
1618
static void
1609
unmount_cache_timeout_cancel (gboolean was_success)
1619
unmount_cache_timeout_cancel (gboolean was_success)
1610
{
1620
{
1611
	g_source_remove (unmount_cache_timeout_id);
1621
	g_source_remove (unmount_cache_timeout_id);
1622
#ifdef ENABLE_NOTIFY
1612
	if (unmount_note != NULL) {
1623
	if (unmount_note != NULL) {
1613
		if (was_success) {
1624
		if (was_success) {
1614
			char *summary;
1625
			char *summary;
Lines 1628-1633 Link Here
1628
			notify_notification_show (unmount_note, NULL);
1639
			notify_notification_show (unmount_note, NULL);
1629
		}
1640
		}
1630
	}
1641
	}
1642
#endif
1631
}
1643
}
1632
1644
1633
static gboolean unmount_still_in_progress = FALSE;
1645
static gboolean unmount_still_in_progress = FALSE;
(-)gnome-mount@181/configure.in~ (-1 / +1 lines)
Lines 100-107 Link Here
100
   AC_SUBST(NAUTILUS_LIBS)
100
   AC_SUBST(NAUTILUS_LIBS)
101
fi
101
fi
102
102
103
PKG_CHECK_MODULES([NOTIFY], [libnotify >= 0.3.0], [enable_notify=yes], [enable_notify=yes])
104
if test "x$enable_notify" != "xno"; then
103
if test "x$enable_notify" != "xno"; then
104
   PKG_CHECK_MODULES([NOTIFY], [libnotify >= 0.3.0])
105
   AC_DEFINE_UNQUOTED([ENABLE_NOTIFY], 1, [Enable notifications with libnotify])
105
   AC_DEFINE_UNQUOTED([ENABLE_NOTIFY], 1, [Enable notifications with libnotify])
106
   AC_SUBST(NOTIFY_CFLAGS)
106
   AC_SUBST(NOTIFY_CFLAGS)
107
   AC_SUBST(NOTIFY_LIBS)
107
   AC_SUBST(NOTIFY_LIBS)

Return to bug 257753