aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/mail-notification/mail-notification.c
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/mail-notification.c
parent959b1463cb7e51bf68cfa8d8654af006ed2ffbcf (diff)
downloadgsoc2013-evolution-77aa984d1b67e06cf757510c80da2e3e51fc9ec1.tar.gz
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/mail-notification.c')
-rw-r--r--plugins/mail-notification/mail-notification.c22
1 files changed, 18 insertions, 4 deletions
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);