aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/mail-notification
diff options
context:
space:
mode:
authorSrinivasa Ragavan <sragavan@novell.com>2008-01-09 23:10:48 +0800
committerSrinivasa Ragavan <sragavan@src.gnome.org>2008-01-09 23:10:48 +0800
commit77aa984d1b67e06cf757510c80da2e3e51fc9ec1 (patch)
treec82df11e60eb045b207379fa5180328774ba58af /plugins/mail-notification
parent959b1463cb7e51bf68cfa8d8654af006ed2ffbcf (diff)
downloadgsoc2013-evolution-77aa984d1b67e06cf757510c80da2e3e51fc9ec1.tar
gsoc2013-evolution-77aa984d1b67e06cf757510c80da2e3e51fc9ec1.tar.gz
gsoc2013-evolution-77aa984d1b67e06cf757510c80da2e3e51fc9ec1.tar.bz2
gsoc2013-evolution-77aa984d1b67e06cf757510c80da2e3e51fc9ec1.tar.lz
gsoc2013-evolution-77aa984d1b67e06cf757510c80da2e3e51fc9ec1.tar.xz
gsoc2013-evolution-77aa984d1b67e06cf757510c80da2e3e51fc9ec1.tar.zst
gsoc2013-evolution-77aa984d1b67e06cf757510c80da2e3e51fc9ec1.zip
** Fix for bug #492702
2008-01-09 Srinivasa Ragavan <sragavan@novell.com> ** Fix for bug #492702 * configure.in: Just disable the dbus message part of mail notification if dbus isn't there. Also remove new-mail-notify plugin. svn path=/trunk/; revision=34784
Diffstat (limited to 'plugins/mail-notification')
-rw-r--r--plugins/mail-notification/ChangeLog10
-rw-r--r--plugins/mail-notification/Makefile.am18
-rw-r--r--plugins/mail-notification/mail-notification.c22
3 files changed, 40 insertions, 10 deletions
diff --git a/plugins/mail-notification/ChangeLog b/plugins/mail-notification/ChangeLog
index 6769229333..cbab0377ab 100644
--- a/plugins/mail-notification/ChangeLog
+++ b/plugins/mail-notification/ChangeLog
@@ -1,3 +1,13 @@
+2008-01-09 Srinivasa Ragavan <sragavan@novell.com>
+
+ ** Fix for bug #492702
+
+ * Makefile.am:
+ * mail-notification.c: (org_gnome_mail_new_notify),
+ (org_gnome_mail_read_notify), (e_plugin_lib_enable),
+ (e_plugin_lib_get_configure_widget): Make the dbus portion of the
+ plugin conditional if it is there.
+
2008-01-02 Srinivasa Ragavan <sragavan@novell.com>
* mail-notification.c: (new_notify_status): Show the actual displayed
diff --git a/plugins/mail-notification/Makefile.am b/plugins/mail-notification/Makefile.am
index 8b93fe3e3c..38b4f051f7 100644
--- a/plugins/mail-notification/Makefile.am
+++ b/plugins/mail-notification/Makefile.am
@@ -1,10 +1,13 @@
INCLUDES = \
-I$(top_srcdir) \
- -DDBUS_API_SUBJECT_TO_CHANGE=1 \
- -DDBUS_VERSION=$(DBUS_VERSION) \
$(EVOLUTION_MAIL_CFLAGS) \
- $(LIBNOTIFY_CFLAGS) \
- $(NMN_CFLAGS)
+ $(LIBNOTIFY_CFLAGS)
+
+if ENABLE_DBUS
+INCLUDES += -DDBUS_API_SUBJECT_TO_CHANGE=1 \
+ -DDBUS_VERSION=$(DBUS_VERSION) \
+ $(NMN_CFLAGS)
+endif
@EVO_PLUGIN_RULE@
@@ -14,8 +17,11 @@ plugin_LTLIBRARIES = liborg-gnome-mail-notification.la
liborg_gnome_mail_notification_la_SOURCES = mail-notification.c
liborg_gnome_mail_notification_la_LDFLAGS = \
-module -avoid-version \
- $(LIBNOTIFY_LIBS) \
- $(NMN_LIBS)
+ $(LIBNOTIFY_LIBS)
+
+if ENABLE_DBUS
+liborg_gnome_mail_notification_la_LDFLAGS += $(NMN_LIBS)
+endif
schemadir = $(GCONF_SCHEMA_FILE_DIR)
schema_in_files = apps-evolution-mail-notification.schemas.in
diff --git a/plugins/mail-notification/mail-notification.c b/plugins/mail-notification/mail-notification.c
index 6ad9b7f20b..c2b1f59410 100644
--- a/plugins/mail-notification/mail-notification.c
+++ b/plugins/mail-notification/mail-notification.c
@@ -29,8 +29,12 @@
#include <gtk/gtk.h>
#include <gconf/gconf-client.h>
#include <libgnome/libgnome.h>
+
+#ifdef HAVE_DBUS
#include <dbus/dbus-glib.h>
#include <dbus/dbus-glib-lowlevel.h>
+#endif
+
#include <time.h>
#include "e-util/e-config.h"
@@ -111,6 +115,8 @@ set_part_enabled (const gchar *gconf_key, gboolean enable)
/* DBUS part */
/* ------------------------------------------------------------------- */
+#ifdef HAVE_DBUS
+
#define DBUS_PATH "/org/gnome/evolution/mail/newmail"
#define DBUS_INTERFACE "org.gnome.evolution.mail.dbus.Signal"
@@ -254,6 +260,8 @@ get_config_widget_dbus (void)
return w;
}
+#endif
+
/* ------------------------------------------------------------------- */
/* Notification area part */
/* ------------------------------------------------------------------- */
@@ -700,9 +708,10 @@ 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);
@@ -722,9 +731,10 @@ 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);
@@ -738,9 +748,10 @@ int
e_plugin_lib_enable (EPluginLib *ep, int 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_STATUS))
enable_status (enable);
@@ -749,7 +760,9 @@ e_plugin_lib_enable (EPluginLib *ep, int enable)
enabled = TRUE;
} else {
+#ifdef HAVE_DBUS
enable_dbus (enable);
+#endif
enable_status (enable);
enable_sound (enable);
@@ -772,10 +785,11 @@ e_plugin_lib_get_configure_widget (EPlugin *epl)
gtk_widget_show (check);
gtk_box_pack_start (GTK_BOX (vbox), check, FALSE, FALSE, 0);
+#ifdef HAVE_DBUS
cfg = get_config_widget_dbus ();
if (cfg)
gtk_box_pack_start (GTK_BOX (vbox), cfg, FALSE, FALSE, 0);
-
+#endif
cfg = get_config_widget_status ();
if (cfg)
gtk_box_pack_start (GTK_BOX (vbox), cfg, FALSE, FALSE, 0);