[gnome-color-manager] Port to libnotify 0.7.0
- From: Richard Hughes <rhughes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-color-manager] Port to libnotify 0.7.0
- Date: Mon, 18 Oct 2010 15:12:21 +0000 (UTC)
commit 746605db63399f9c03d2bfce2cd4ed916d5291c4
Author: Richard Hughes <richard hughsie com>
Date: Mon Oct 18 16:12:03 2010 +0100
Port to libnotify 0.7.0
configure.ac | 8 ++------
contrib/gnome-color-manager.spec.in | 2 +-
src/gcm-session.c | 6 +-----
src/gcm-utils.h | 19 -------------------
4 files changed, 4 insertions(+), 31 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 0dc7d80..479986b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -161,12 +161,8 @@ if test x$has_vte = xyes; then
AC_DEFINE(HAVE_VTE,1,[Use VTE terminal widget])
fi
-dnl **** Check for NOTIFY ****
-PKG_CHECK_MODULES(NOTIFY, libnotify >= 0.5.0, has_libnotify=yes, has_libnotify=no)
-AM_CONDITIONAL(HAVE_NOTIFY, test x$libnotify = xyes)
-if test x$has_libnotify = xyes; then
- AC_DEFINE(HAVE_NOTIFY,1,[Use session notifications])
-fi
+dnl **** Check for libnotify ****
+PKG_CHECK_MODULES(NOTIFY, libnotify >= 0.7.0)
dnl **** Check for SANE ****
AC_ARG_ENABLE(sane, AS_HELP_STRING([--enable-sane],[Enable SANE support for scanner support]), enable_sane=$enableval,
diff --git a/contrib/gnome-color-manager.spec.in b/contrib/gnome-color-manager.spec.in
index b93c5f4..1bd4aee 100644
--- a/contrib/gnome-color-manager.spec.in
+++ b/contrib/gnome-color-manager.spec.in
@@ -37,7 +37,7 @@ BuildRequires: libtiff-devel
BuildRequires: libexif-devel
BuildRequires: exiv2-devel
BuildRequires: libcanberra-devel
-BuildRequires: libnotify-devel >= 0.5.0
+BuildRequires: libnotify-devel >= 0.7.0
BuildRequires: glib2-devel >= 2.25.9-2
%description
diff --git a/src/gcm-session.c b/src/gcm-session.c
index b89be6e..9c348fe 100644
--- a/src/gcm-session.c
+++ b/src/gcm-session.c
@@ -24,9 +24,7 @@
#include <glib/gi18n.h>
#include <gtk/gtk.h>
#include <locale.h>
-#ifdef HAVE_NOTIFY
#include <libnotify/notify.h>
-#endif
#include "gcm-client.h"
#include "gcm-device-xrandr.h"
@@ -68,7 +66,6 @@ gcm_session_check_idle_cb (gpointer user_data)
return TRUE;
}
-#ifdef HAVE_NOTIFY
/**
* gcm_session_notify_cb:
**/
@@ -90,7 +87,6 @@ gcm_session_notify_cb (NotifyNotification *notification, gchar *action, gpointer
}
}
}
-#endif
/**
* gcm_session_notify_recalibrate:
@@ -103,7 +99,7 @@ gcm_session_notify_recalibrate (const gchar *title, const gchar *message, GcmDev
NotifyNotification *notification;
/* show a bubble */
- notification = notify_notification_new (title, message, GCM_STOCK_ICON, NULL);
+ notification = notify_notification_new (title, message, GCM_STOCK_ICON);
notify_notification_set_timeout (notification, GCM_SESSION_NOTIFY_TIMEOUT);
notify_notification_set_urgency (notification, NOTIFY_URGENCY_LOW);
diff --git a/src/gcm-utils.h b/src/gcm-utils.h
index 95139fe..0d35d7d 100644
--- a/src/gcm-utils.h
+++ b/src/gcm-utils.h
@@ -63,25 +63,6 @@
#define GCM_PREFS_PACKAGE_NAME_COLOR_PROFILES "shared-color-profiles"
#define GCM_PREFS_PACKAGE_NAME_COLOR_PROFILES_EXTRA "shared-color-profiles-extra"
-/* libnotify dummy code */
-#ifndef HAVE_NOTIFY
-#define notify_init(f1) /* nothing */
-#define notify_is_initted(f1) FALSE
-#define notify_notification_close(f1,f2) TRUE
-#define notify_notification_show(f1,f2) TRUE
-#define notify_notification_set_timeout(f1,f2) /* nothing */
-#define notify_notification_set_urgency(f1,f2) /* nothing */
-#define notify_notification_add_action(f1,f2,f3,f4,f5,f6) /* nothing */
-#define NotifyNotification GtkWidget
-#define NotifyUrgency guint
-#define notify_notification_new(f1,f2,f3,f4) gtk_fixed_new()
-#define notify_notification_new_with_status_icon(f1,f2,f3,f4) gtk_fixed_new()
-#define NOTIFY_URGENCY_LOW 0
-#define NOTIFY_URGENCY_NORMAL 1
-#define NOTIFY_URGENCY_CRITICAL 2
-#define NOTIFY_EXPIRES_NEVER 0
-#endif
-
gboolean gcm_utils_mkdir_for_filename (const gchar *filename,
GError **error);
gboolean gcm_utils_mkdir_and_copy (GFile *source,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]