[gnome-settings-daemon] build: Require libnotify
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-settings-daemon] build: Require libnotify
- Date: Tue, 16 Nov 2010 17:53:07 +0000 (UTC)
commit 77261e16391c5e635da309e822c4dbec80bbc3ad
Author: Bastien Nocera <hadess hadess net>
Date: Tue Nov 16 17:52:22 2010 +0000
build: Require libnotify
As we'll be building the experience around that.
configure.ac | 16 +++-----------
gnome-settings-daemon/main.c | 5 ----
plugins/a11y-keyboard/gsd-a11y-keyboard-manager.c | 22 ++++----------------
plugins/xrandr/gsd-xrandr-manager.c | 6 +---
4 files changed, 11 insertions(+), 38 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 6fe06cd..f248a5a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -102,18 +102,10 @@ dnl ---------------------------------------------------------------------------
dnl - Check for libnotify
dnl ---------------------------------------------------------------------------
-have_libnotify=no
-AC_ARG_WITH(libnotify,
- AC_HELP_STRING([--without-libnotify], [Disable notifications (default: auto)]),
- with_libnotify=$withval, with_libnotify=auto)
-
-if test "x$with_libnotify" != "xno"; then
- PKG_CHECK_MODULES(LIBNOTIFY, libnotify >= $LIBNOTIFY_REQUIRED_VERSION,
- [AC_DEFINE(HAVE_LIBNOTIFY, 1, [Define if libnotify is available])
- have_libnotify=yes], have_libnotify=no)
- if test "x$have_libnotify" = xno -a "x$with_libnotify" = xyes; then
- AC_MSG_ERROR([libnotify support requested but libraries not found])
- fi
+PKG_CHECK_MODULES(LIBNOTIFY, libnotify >= $LIBNOTIFY_REQUIRED_VERSION,
+ [have_libnotify=yes], have_libnotify=no)
+if test "x$have_libnotify" = xno ; then
+ AC_MSG_ERROR([libnotify is required to build gnome-settings-daemon])
fi
AC_SUBST(LIBNOTIFY_CFLAGS)
AC_SUBST(LIBNOTIFY_LIBS)
diff --git a/gnome-settings-daemon/main.c b/gnome-settings-daemon/main.c
index f1d3ce0..a6bc26c 100644
--- a/gnome-settings-daemon/main.c
+++ b/gnome-settings-daemon/main.c
@@ -32,10 +32,7 @@
#include <glib/gstdio.h>
#include <gtk/gtk.h>
#include <gio/gio.h>
-
-#ifdef HAVE_LIBNOTIFY
#include <libnotify/notify.h>
-#endif /* HAVE_LIBNOTIFY */
#include "gnome-settings-manager.h"
#include "gnome-settings-profile.h"
@@ -274,9 +271,7 @@ main (int argc, char *argv[])
g_log_set_default_handler (gsd_log_default_handler, NULL);
-#ifdef HAVE_LIBNOTIFY
notify_init ("gnome-settings-daemon");
-#endif /* HAVE_LIBNOTIFY */
bus_register ();
diff --git a/plugins/a11y-keyboard/gsd-a11y-keyboard-manager.c b/plugins/a11y-keyboard/gsd-a11y-keyboard-manager.c
index 13fe60e..e665d00 100644
--- a/plugins/a11y-keyboard/gsd-a11y-keyboard-manager.c
+++ b/plugins/a11y-keyboard/gsd-a11y-keyboard-manager.c
@@ -36,14 +36,11 @@
#include <gdk/gdk.h>
#include <gdk/gdkx.h>
#include <gtk/gtk.h>
+#include <libnotify/notify.h>
#include <X11/XKBlib.h>
#include <X11/extensions/XKBstr.h>
-#ifdef HAVE_LIBNOTIFY
-#include <libnotify/notify.h>
-#endif /* HAVE_LIBNOTIFY */
-
#include "gnome-settings-profile.h"
#include "gsd-a11y-keyboard-manager.h"
#include "gsd-a11y-preferences-dialog.h"
@@ -67,9 +64,7 @@ struct GsdA11yKeyboardManagerPrivate
GSettings *settings;
-#ifdef HAVE_LIBNOTIFY
NotifyNotification *notification;
-#endif /* HAVE_LIBNOTIFY */
};
static void gsd_a11y_keyboard_manager_class_init (GsdA11yKeyboardManagerClass *klass);
@@ -446,7 +441,6 @@ maybe_show_status_icon (GsdA11yKeyboardManager *manager)
gtk_status_icon_set_visible (manager->priv->status_icon, show);
}
-#ifdef HAVE_LIBNOTIFY
static void
on_notification_closed (NotifyNotification *notification,
GsdA11yKeyboardManager *manager)
@@ -507,13 +501,11 @@ on_sticky_keys_action (NotifyNotification *notification,
}
}
-#endif /* HAVE_LIBNOTIFY */
-
static gboolean
ax_slowkeys_warning_post_bubble (GsdA11yKeyboardManager *manager,
gboolean enabled)
{
-#ifdef HAVE_LIBNOTIFY
+#if 1
gboolean res;
const char *title;
const char *message;
@@ -570,9 +562,7 @@ ax_slowkeys_warning_post_bubble (GsdA11yKeyboardManager *manager,
}
return res;
-#else
- return FALSE;
-#endif /* HAVE_LIBNOTIFY */
+#endif /* 1 */
}
@@ -647,7 +637,7 @@ static gboolean
ax_stickykeys_warning_post_bubble (GsdA11yKeyboardManager *manager,
gboolean enabled)
{
-#ifdef HAVE_LIBNOTIFY
+#if 1
gboolean res;
const char *title;
const char *message;
@@ -707,9 +697,7 @@ ax_stickykeys_warning_post_bubble (GsdA11yKeyboardManager *manager,
}
return res;
-#else
- return FALSE;
-#endif /* HAVE_LIBNOTIFY */
+#endif /* 1 */
}
static void
diff --git a/plugins/xrandr/gsd-xrandr-manager.c b/plugins/xrandr/gsd-xrandr-manager.c
index 3a558f1..8197c31 100644
--- a/plugins/xrandr/gsd-xrandr-manager.c
+++ b/plugins/xrandr/gsd-xrandr-manager.c
@@ -46,9 +46,7 @@
#include <libgnome-desktop/gnome-rr.h>
#include <libgnome-desktop/gnome-rr-labeler.h>
-#ifdef HAVE_LIBNOTIFY
#include <libnotify/notify.h>
-#endif
#include "gsd-enums.h"
#include "gnome-settings-profile.h"
@@ -1078,7 +1076,7 @@ generate_fn_f7_configs (GsdXrandrManager *mgr)
static void
error_message (GsdXrandrManager *mgr, const char *primary_text, GError *error_to_display, const char *secondary_text)
{
-#ifdef HAVE_LIBNOTIFY
+#if 1
NotifyNotification *notification;
g_assert (error_to_display == NULL || secondary_text == NULL);
@@ -1098,7 +1096,7 @@ error_message (GsdXrandrManager *mgr, const char *primary_text, GError *error_to
gtk_dialog_run (GTK_DIALOG (dialog));
gtk_widget_destroy (dialog);
-#endif /* HAVE_LIBNOTIFY */
+#endif /* 1 */
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]