diff options
author | Stefano Karapetsas <[email protected]> | 2013-02-18 13:55:46 -0800 |
---|---|---|
committer | Stefano Karapetsas <[email protected]> | 2013-02-18 13:55:46 -0800 |
commit | 0f21ea2e034a258a69a194b8a9ed46cb57f20f5d (patch) | |
tree | 5e42635341a58e948508f09e2ba2aa37a7487daf | |
parent | 6f12750fb05e6284b4356a6648a47ce202ff2d39 (diff) | |
parent | 9ee6ae64330b0f0066ef07a663e4d1bca6510f2c (diff) | |
download | mate-settings-daemon-0f21ea2e034a258a69a194b8a9ed46cb57f20f5d.tar.bz2 mate-settings-daemon-0f21ea2e034a258a69a194b8a9ed46cb57f20f5d.tar.xz |
Merge pull request #40 from glensc/libnotify
use libnotify 0.7, not libmatenotify
-rw-r--r-- | configure.ac | 32 | ||||
-rw-r--r-- | plugins/a11y-keyboard/Makefile.am | 4 | ||||
-rw-r--r-- | plugins/a11y-keyboard/msd-a11y-keyboard-manager.c | 32 | ||||
-rw-r--r-- | plugins/housekeeping/Makefile.am | 4 | ||||
-rw-r--r-- | plugins/housekeeping/msd-disk-space.c | 2 | ||||
-rw-r--r-- | plugins/xrandr/Makefile.am | 4 | ||||
-rw-r--r-- | plugins/xrandr/msd-xrandr-manager.c | 11 |
7 files changed, 43 insertions, 46 deletions
diff --git a/configure.ac b/configure.ac index ea3f569..e91ca27 100644 --- a/configure.ac +++ b/configure.ac @@ -53,7 +53,7 @@ GLIB_REQUIRED_VERSION=2.17.3 GTK_REQUIRED_VERSION=2.24.0 GIO_REQUIRED_VERSION=2.26.0 MATE_DESKTOP_REQUIRED_VERSION=1.5.0 -LIBMATENOTIFY_REQUIRED_VERSION=1.1.0 +LIBNOTIFY_REQUIRED_VERSION=0.7.0 EXTRA_COMPILE_WARNINGS(yes) @@ -99,24 +99,24 @@ dnl --------------------------------------------------------------------------- PKG_CHECK_MODULES(MATE_DESKTOP, mate-desktop-2.0 >= $MATE_DESKTOP_REQUIRED_VERSION) dnl --------------------------------------------------------------------------- -dnl - Check for libmatenotify +dnl - Check for libnotify dnl --------------------------------------------------------------------------- -have_libmatenotify=no -AC_ARG_WITH(libmatenotify, - AC_HELP_STRING([--without-libmatenotify], [Disable notifications (default: auto)]), - with_libmatenotify=$withval, with_libmatenotify=auto) - -if test "x$with_libmatenotify" != "xno"; then - PKG_CHECK_MODULES(LIBMATENOTIFY, libmatenotify >= $LIBMATENOTIFY_REQUIRED_VERSION, - [AC_DEFINE(HAVE_LIBMATENOTIFY, 1, [Define if libmatenotify is available]) - have_libmatenotify=yes], have_libmatenotify=no) - if test "x$have_libmatenotify" = xno -a "x$with_libmatenotify" = xyes; then - AC_MSG_ERROR([libmatenotify support requested but libraries not found]) +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 fi -AC_SUBST(LIBMATENOTIFY_CFLAGS) -AC_SUBST(LIBMATENOTIFY_LIBS) +AC_SUBST(LIBNOTIFY_CFLAGS) +AC_SUBST(LIBNOTIFY_LIBS) dnl --------------------------------------------------------------------------- dnl - Check for D-Bus @@ -530,7 +530,7 @@ echo " dbus-1 system.d dir: ${DBUS_SYS_DIR} PolicyKit support: ${HAVE_POLKIT} - Libmatenotify support: ${have_libmatenotify} + Libnotify support: ${have_libnotify} GStreamer support: ${have_gstreamer} PulseAudio support: ${have_pulse} Smartcard support: ${have_smartcard_support} diff --git a/plugins/a11y-keyboard/Makefile.am b/plugins/a11y-keyboard/Makefile.am index 78737a0..39fa42a 100644 --- a/plugins/a11y-keyboard/Makefile.am +++ b/plugins/a11y-keyboard/Makefile.am @@ -52,7 +52,7 @@ liba11y_keyboard_la_CPPFLAGS = \ liba11y_keyboard_la_CFLAGS = \ $(SETTINGS_PLUGIN_CFLAGS) \ - $(LIBMATENOTIFY_CFLAGS) \ + $(LIBNOTIFY_CFLAGS) \ $(AM_CFLAGS) liba11y_keyboard_la_LDFLAGS = \ @@ -62,7 +62,7 @@ liba11y_keyboard_la_LDFLAGS = \ liba11y_keyboard_la_LIBADD = \ $(SETTINGS_PLUGIN_LIBS) \ $(XF86MISC_LIBS) \ - $(LIBMATENOTIFY_LIBS) \ + $(LIBNOTIFY_LIBS) \ $(NULL) plugin_in_files = \ diff --git a/plugins/a11y-keyboard/msd-a11y-keyboard-manager.c b/plugins/a11y-keyboard/msd-a11y-keyboard-manager.c index d20d16d..af45b9b 100644 --- a/plugins/a11y-keyboard/msd-a11y-keyboard-manager.c +++ b/plugins/a11y-keyboard/msd-a11y-keyboard-manager.c @@ -46,9 +46,9 @@ #include <X11/extensions/XIproto.h> #endif -#ifdef HAVE_LIBMATENOTIFY -#include <libmatenotify/notify.h> -#endif /* HAVE_LIBMATENOTIFY */ +#ifdef HAVE_LIBNOTIFY +#include <libnotify/notify.h> +#endif /* HAVE_LIBNOTIFY */ #include "mate-settings-profile.h" #include "msd-a11y-keyboard-manager.h" @@ -72,9 +72,9 @@ struct MsdA11yKeyboardManagerPrivate GSettings *settings; -#ifdef HAVE_LIBMATENOTIFY +#ifdef HAVE_LIBNOTIFY NotifyNotification *notification; -#endif /* HAVE_LIBMATENOTIFY */ +#endif /* HAVE_LIBNOTIFY */ }; static void msd_a11y_keyboard_manager_class_init (MsdA11yKeyboardManagerClass *klass); @@ -497,7 +497,7 @@ maybe_show_status_icon (MsdA11yKeyboardManager *manager) gtk_status_icon_set_visible (manager->priv->status_icon, show); } -#ifdef HAVE_LIBMATENOTIFY +#ifdef HAVE_LIBNOTIFY static void on_notification_closed (NotifyNotification *notification, MsdA11yKeyboardManager *manager) @@ -558,13 +558,13 @@ on_sticky_keys_action (NotifyNotification *notification, } } -#endif /* HAVE_LIBMATENOTIFY */ +#endif /* HAVE_LIBNOTIFY */ static gboolean ax_slowkeys_warning_post_bubble (MsdA11yKeyboardManager *manager, gboolean enabled) { -#ifdef HAVE_LIBMATENOTIFY +#ifdef HAVE_LIBNOTIFY gboolean res; const char *title; const char *message; @@ -591,8 +591,7 @@ ax_slowkeys_warning_post_bubble (MsdA11yKeyboardManager *manager, msd_a11y_keyboard_manager_ensure_status_icon (manager); manager->priv->notification = notify_notification_new (title, message, - "preferences-desktop-accessibility", - NULL); + "preferences-desktop-accessibility"); notify_notification_attach_to_status_icon (manager->priv->notification, manager->priv->status_icon); notify_notification_set_timeout (manager->priv->notification, NOTIFICATION_TIMEOUT * 1000); @@ -625,7 +624,7 @@ ax_slowkeys_warning_post_bubble (MsdA11yKeyboardManager *manager, return res; #else return FALSE; -#endif /* HAVE_LIBMATENOTIFY */ +#endif /* HAVE_LIBNOTIFY */ } @@ -700,7 +699,7 @@ static gboolean ax_stickykeys_warning_post_bubble (MsdA11yKeyboardManager *manager, gboolean enabled) { -#ifdef HAVE_LIBMATENOTIFY +#ifdef HAVE_LIBNOTIFY gboolean res; const char *title; const char *message; @@ -730,8 +729,7 @@ ax_stickykeys_warning_post_bubble (MsdA11yKeyboardManager *manager, msd_a11y_keyboard_manager_ensure_status_icon (manager); manager->priv->notification = notify_notification_new (title, message, - "preferences-desktop-accessibility", - NULL); + "preferences-desktop-accessibility"); notify_notification_attach_to_status_icon (manager->priv->notification, manager->priv->status_icon); notify_notification_set_timeout (manager->priv->notification, NOTIFICATION_TIMEOUT * 1000); @@ -764,7 +762,7 @@ ax_stickykeys_warning_post_bubble (MsdA11yKeyboardManager *manager, return res; #else return FALSE; -#endif /* HAVE_LIBMATENOTIFY */ +#endif /* HAVE_LIBNOTIFY */ } static void @@ -1250,9 +1248,9 @@ msd_a11y_keyboard_manager_init (MsdA11yKeyboardManager *manager) { manager->priv = MSD_A11Y_KEYBOARD_MANAGER_GET_PRIVATE (manager); -#ifdef HAVE_LIBMATENOTIFY +#ifdef HAVE_LIBNOTIFY notify_init ("mate-settings-daemon"); -#endif /* HAVE_LIBMATENOTIFY */ +#endif /* HAVE_LIBNOTIFY */ } static void diff --git a/plugins/housekeeping/Makefile.am b/plugins/housekeeping/Makefile.am index 4eb4517..0429c31 100644 --- a/plugins/housekeeping/Makefile.am +++ b/plugins/housekeeping/Makefile.am @@ -20,12 +20,12 @@ libhousekeeping_la_CPPFLAGS = \ libhousekeeping_la_CFLAGS = \ $(SETTINGS_PLUGIN_CFLAGS) \ $(GIOUNIX_CFLAGS) \ - $(LIBMATENOTIFY_CFLAGS) \ + $(LIBNOTIFY_CFLAGS) \ $(AM_CFLAGS) libhousekeeping_la_LDFLAGS = $(MSD_PLUGIN_LDFLAGS) -libhousekeeping_la_LIBADD = $(SETTINGS_PLUGIN_LIBS) $(GIOUNIX_LIBS) $(LIBMATENOTIFY_LIBS) +libhousekeeping_la_LIBADD = $(SETTINGS_PLUGIN_LIBS) $(GIOUNIX_LIBS) $(LIBNOTIFY_LIBS) plugin_in_files = housekeeping.mate-settings-plugin.in diff --git a/plugins/housekeeping/msd-disk-space.c b/plugins/housekeeping/msd-disk-space.c index 59c7527..9728752 100644 --- a/plugins/housekeeping/msd-disk-space.c +++ b/plugins/housekeeping/msd-disk-space.c @@ -21,7 +21,7 @@ * */ -/* gcc -DHAVE_LIBMATENOTIFY -DTEST -Wall `pkg-config --cflags --libs gobject-2.0 gio-unix-2.0 glib-2.0 gtk+-2.0 libmatenotify` -o msd-disk-space-test msd-disk-space.c */ +/* gcc -DHAVE_LIBNOTIFY -DTEST -Wall `pkg-config --cflags --libs gobject-2.0 gio-unix-2.0 glib-2.0 gtk+-2.0 libnotify` -o msd-disk-space-test msd-disk-space.c */ #include "config.h" diff --git a/plugins/xrandr/Makefile.am b/plugins/xrandr/Makefile.am index b4afb93..55c01fe 100644 --- a/plugins/xrandr/Makefile.am +++ b/plugins/xrandr/Makefile.am @@ -54,7 +54,7 @@ libxrandr_la_CPPFLAGS = \ libxrandr_la_CFLAGS = \ $(SETTINGS_PLUGIN_CFLAGS) \ - $(LIBMATENOTIFY_CFLAGS) \ + $(LIBNOTIFY_CFLAGS) \ $(MATE_DESKTOP_CFLAGS) \ $(AM_CFLAGS) @@ -63,7 +63,7 @@ libxrandr_la_LDFLAGS = \ libxrandr_la_LIBADD = \ $(SETTINGS_PLUGIN_LIBS) \ - $(LIBMATENOTIFY_LIBS) \ + $(LIBNOTIFY_LIBS) \ $(MATE_DESKTOP_LIBS) plugin_in_files = \ diff --git a/plugins/xrandr/msd-xrandr-manager.c b/plugins/xrandr/msd-xrandr-manager.c index f7f1f88..13a1b19 100644 --- a/plugins/xrandr/msd-xrandr-manager.c +++ b/plugins/xrandr/msd-xrandr-manager.c @@ -46,8 +46,8 @@ #include <libmateui/mate-rr.h> #include <libmateui/mate-rr-labeler.h> -#ifdef HAVE_LIBMATENOTIFY -#include <libmatenotify/notify.h> +#ifdef HAVE_LIBNOTIFY +#include <libnotify/notify.h> #endif #include "mate-settings-profile.h" @@ -1079,7 +1079,7 @@ generate_fn_f7_configs (MsdXrandrManager *mgr) static void error_message (MsdXrandrManager *mgr, const char *primary_text, GError *error_to_display, const char *secondary_text) { -#ifdef HAVE_LIBMATENOTIFY +#ifdef HAVE_LIBNOTIFY MsdXrandrManagerPrivate *priv = mgr->priv; NotifyNotification *notification; @@ -1093,8 +1093,7 @@ error_message (MsdXrandrManager *mgr, const char *primary_text, GError *error_to else notification = notify_notification_new (primary_text, error_to_display ? error_to_display->message : secondary_text, - MSD_XRANDR_ICON_NAME, - NULL); + MSD_XRANDR_ICON_NAME); notify_notification_show (notification, NULL); /* NULL-GError */ #else @@ -1107,7 +1106,7 @@ error_message (MsdXrandrManager *mgr, const char *primary_text, GError *error_to gtk_dialog_run (GTK_DIALOG (dialog)); gtk_widget_destroy (dialog); -#endif /* HAVE_LIBMATENOTIFY */ +#endif /* HAVE_LIBNOTIFY */ } static void |