aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2009-09-05 06:15:52 +0800
committerMatthew Barnes <mbarnes@redhat.com>2009-09-05 06:15:52 +0800
commit54b282cf4fbac0d4dfbbe90caa2a206eb088f76d (patch)
tree60119e9736fd5237be795b1b3d381c73ab2d5798
parent35929a37e7428d8a04415a665e3b5b6369d9fd24 (diff)
downloadgsoc2013-evolution-54b282cf4fbac0d4dfbbe90caa2a206eb088f76d.tar.gz
gsoc2013-evolution-54b282cf4fbac0d4dfbbe90caa2a206eb088f76d.tar.zst
gsoc2013-evolution-54b282cf4fbac0d4dfbbe90caa2a206eb088f76d.zip
Make dbus-glib mandatory.
-rw-r--r--configure.ac30
-rw-r--r--plugins/mail-notification/Makefile.am11
-rw-r--r--plugins/mail-notification/mail-notification.c18
3 files changed, 9 insertions, 50 deletions
diff --git a/configure.ac b/configure.ac
index 5225e7ddda..0b601aa2e3 100644
--- a/configure.ac
+++ b/configure.ac
@@ -62,9 +62,9 @@ m4_define([libxml_minimum_version], [2.7.3])
m4_define([shared_mime_info_minimum_version], [0.22])
m4_define([libpst_minimum_version], [0.6.41])
m4_define([unique_minimum_version], [1.0.8])
+m4_define([dbus_glib_minimum_version], [0.74])
dnl Optional Packages
-m4_define([dbus_minimum_version], [0.74])
m4_define([nm_minimum_version],[0.7])
m4_define([hal_minimum_version], [0.5.4])
m4_define([libnotify_minimum_version], [0.3.0])
@@ -1452,30 +1452,9 @@ AC_SUBST(TNEF_CFLAGS)
dnl ******************************
dnl Check for dbus-glib-1 and dbus
dnl ******************************
-AC_ARG_ENABLE([dbus],
- [AS_HELP_STRING([--enable-dbus],
- [enable DBUS support (default=yes)])],
- [enable_dbus=$enableval],[enable_dbus=yes])
-AC_MSG_CHECKING([if dbus support is enabled])
-AC_MSG_RESULT([$enable_dbus])
-if test "$enable_dbus" = "yes"; then
- PKG_CHECK_MODULES([DBUS_GLIB], [dbus-glib-1 >= dbus_minimum_version],
- [DBUS_SUPPORT="yes"],
- [AC_MSG_ERROR([DBUS respectively dbus-glib not found! (or version < dbus_minimum_version)!
- If you want to disable DBUS, please append --disable-dbus to configure!
- DBUS is required for NetworkManager - NetworkManager support will then be disabled, too!])])
- AC_DEFINE(DBUS_SUPPORT, 1, [dbus available])
- AC_SUBST(HAVE_DBUS)
- AC_SUBST(DBUS_GLIB_CFLAGS)
- AC_SUBST(DBUS_GLIB_LIBS)
-elif test "$enable_dbus" = "no" -a "$enable_nm" = "yes"; then
- AC_MSG_ERROR([DBUS disabled and NetworkManager enabled - this won't work!
- Disable NetworkManager (append --disable-nm to configure)!])
-else
- AC_MSG_WARN([DBUS support disabled!])
- DBUS_SUPPORT="no"
-fi
-AM_CONDITIONAL([DBUS_SUPPORT], [test "$DBUS_SUPPORT" = yes])
+PKG_CHECK_MODULES([DBUS_GLIB], [dbus-glib-1 >= dbus_glib_minimum_version])
+AC_SUBST(DBUS_GLIB_CFLAGS)
+AC_SUBST(DBUS_GLIB_LIBS)
dnl ******************************
dnl Check for NetworkManager
@@ -2127,7 +2106,6 @@ fi
echo "
LDAP support: $msg_ldap
HAL: $HAVE_HAL
- DBUS: $DBUS_SUPPORT
NetworkManager: $NM_SUPPORT
NNTP support: $msg_nntp
Pilot conduits: $msg_pilot
diff --git a/plugins/mail-notification/Makefile.am b/plugins/mail-notification/Makefile.am
index b53e6a55a6..7b74ea6ffa 100644
--- a/plugins/mail-notification/Makefile.am
+++ b/plugins/mail-notification/Makefile.am
@@ -9,14 +9,10 @@ AM_CPPFLAGS = \
-I$(top_srcdir) \
-I$(top_srcdir)/widgets \
$(EVOLUTION_MAIL_CFLAGS) \
+ $(DBUS_GLIB_CFLAGS) \
$(LIBNOTIFY_CFLAGS) \
$(CANBERRA_CFLAGS)
-if DBUS_SUPPORT
-AM_CPPFLAGS += -DDBUS_API_SUBJECT_TO_CHANGE=1 \
- $(DBUS_GLIB_CFLAGS)
-endif
-
@EVO_PLUGIN_RULE@
plugin_DATA = org-gnome-mail-notification.eplug
@@ -26,16 +22,13 @@ liborg_gnome_mail_notification_la_SOURCES = mail-notification.c
liborg_gnome_mail_notification_la_LDFLAGS = \
-module -avoid-version $(NO_UNDEFINED)
liborg_gnome_mail_notification_la_LIBADD = \
+ $(DBUS_GLIB_LIBS) \
$(CANBERRA_LIBS) \
$(LIBNOTIFY_LIBS) \
$(top_builddir)/e-util/libeutil.la \
$(top_builddir)/mail/libevolution-mail.la \
$(GNOME_PLATFORM_LIBS)
-if DBUS_SUPPORT
-liborg_gnome_mail_notification_la_LIBADD += $(DBUS_GLIB_LIBS)
-endif
-
schemadir = $(GCONF_SCHEMA_FILE_DIR)
schema_in_files = apps-evolution-mail-notification.schemas.in
schema_DATA = $(schema_in_files:.schemas.in=.schemas)
diff --git a/plugins/mail-notification/mail-notification.c b/plugins/mail-notification/mail-notification.c
index ccdbeab7e0..362b0e3410 100644
--- a/plugins/mail-notification/mail-notification.c
+++ b/plugins/mail-notification/mail-notification.c
@@ -31,10 +31,8 @@
#include <gconf/gconf-client.h>
#include <canberra-gtk.h>
-#ifdef HAVE_DBUS
#include <dbus/dbus-glib.h>
#include <dbus/dbus-glib-lowlevel.h>
-#endif
#include <time.h>
@@ -108,8 +106,6 @@ is_part_enabled (const gchar *gconf_key)
/* DBUS part */
/* ------------------------------------------------------------------- */
-#ifdef HAVE_DBUS
-
#define DBUS_PATH "/org/gnome/evolution/mail/newmail"
#define DBUS_INTERFACE "org.gnome.evolution.mail.dbus.Signal"
@@ -219,7 +215,6 @@ enable_dbus (gint enable)
bus = NULL;
}
}
-#endif
/* ------------------------------------------------------------------- */
/* Notification area part */
@@ -864,7 +859,6 @@ get_cfg_widget (void)
bridge, GCONF_KEY_NOTIFY_ONLY_INBOX,
G_OBJECT (widget), "active");
-#ifdef HAVE_DBUS
text = _("Generate a _D-Bus message");
widget = gtk_check_button_new_with_mnemonic (text);
gtk_box_pack_start (GTK_BOX (container), widget, FALSE, FALSE, 0);
@@ -873,7 +867,6 @@ get_cfg_widget (void)
gconf_bridge_bind_property (
bridge, GCONF_KEY_ENABLED_DBUS,
G_OBJECT (widget), "active");
-#endif
widget = get_config_widget_status ();
gtk_box_pack_start (GTK_BOX (container), widget, FALSE, FALSE, 0);
@@ -900,10 +893,9 @@ org_gnome_mail_new_notify (EPlugin *ep, EMEventTargetFolder *t)
g_static_mutex_lock (&mlock);
-#ifdef HAVE_DBUS
if (is_part_enabled (GCONF_KEY_ENABLED_DBUS))
new_notify_dbus (t);
-#endif
+
if (is_part_enabled (GCONF_KEY_ENABLED_STATUS))
new_notify_status (t);
@@ -923,10 +915,9 @@ org_gnome_mail_read_notify (EPlugin *ep, EMEventTargetMessage *t)
g_static_mutex_lock (&mlock);
-#ifdef HAVE_DBUS
if (is_part_enabled (GCONF_KEY_ENABLED_DBUS))
read_notify_dbus (t);
-#endif
+
if (is_part_enabled (GCONF_KEY_ENABLED_STATUS))
read_notify_status (t);
@@ -940,18 +931,15 @@ gint
e_plugin_lib_enable (EPlugin *ep, gint enable)
{
if (enable) {
-#ifdef HAVE_DBUS
if (is_part_enabled (GCONF_KEY_ENABLED_DBUS))
enable_dbus (enable);
-#endif
+
if (is_part_enabled (GCONF_KEY_ENABLED_SOUND))
enable_sound (enable);
enabled = TRUE;
} else {
-#ifdef HAVE_DBUS
enable_dbus (enable);
-#endif
enable_sound (enable);
enabled = FALSE;