From 54b282cf4fbac0d4dfbbe90caa2a206eb088f76d Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Fri, 4 Sep 2009 18:15:52 -0400 Subject: Make dbus-glib mandatory. --- plugins/mail-notification/Makefile.am | 11 ++--------- plugins/mail-notification/mail-notification.c | 18 +++--------------- 2 files changed, 5 insertions(+), 24 deletions(-) (limited to 'plugins') 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 #include -#ifdef HAVE_DBUS #include #include -#endif #include @@ -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; -- cgit v1.2.3