evolution r34784 - in trunk: . plugins/mail-notification plugins/new-mail-notify po



Author: sragavan
Date: Wed Jan  9 15:10:48 2008
New Revision: 34784
URL: http://svn.gnome.org/viewvc/evolution?rev=34784&view=rev

Log:
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.




Removed:
   trunk/plugins/new-mail-notify/
Modified:
   trunk/ChangeLog
   trunk/configure.in
   trunk/plugins/mail-notification/ChangeLog
   trunk/plugins/mail-notification/Makefile.am
   trunk/plugins/mail-notification/mail-notification.c
   trunk/po/ChangeLog
   trunk/po/POTFILES.in

Modified: trunk/configure.in
==============================================================================
--- trunk/configure.in	(original)
+++ trunk/configure.in	Wed Jan  9 15:10:48 2008
@@ -1697,11 +1697,11 @@
 plugins_base="$plugins_base_always $SA_JUNK_PLUGIN $BF_JUNK_PLUGIN $EXCHANGE_PLUGIN $MONO_PLUGIN" 
 all_plugins_base="$plugins_base_always sa-junk-plugin bogo-junk-plugin exchange-operations mono"
 
-plugins_standard_always="bbdb subject-thread save-calendar select-one-source copy-tool mail-to-task mark-calendar-offline audio-inline mailing-list-actions new-mail-notify default-mailer import-ics-attachments prefer-plain mail-notification attachment-reminder face" 
+plugins_standard_always="bbdb subject-thread save-calendar select-one-source copy-tool mail-to-task mark-calendar-offline audio-inline mailing-list-actions default-mailer import-ics-attachments prefer-plain mail-notification attachment-reminder face backup-restore" 
 plugins_standard="$plugins_standard_always"
 all_plugins_standard="$plugins_standard"
 
-plugins_experimental_always="backup-restore folder-unsubscribe mail-to-meeting save-attachments external-editor"
+plugins_experimental_always="folder-unsubscribe mail-to-meeting save-attachments external-editor"
 plugins_experimental="$plugins_experimental_always $IPOD_SYNC $TNEF_ATTACHMENTS"
 all_plugins_experimental="$plugins_experimental_always ipod-sync tnef-attachments"
 
@@ -1767,24 +1767,27 @@
 	fi
 fi
 
-if echo ${plugins_enabled} | grep "new-mail-notify" > /dev/null ; then
-	if ${PKG_CONFIG} --exists dbus-glib-1 ; then
-		dnl **************************************************
-		dnl * New Mail Notify plugin
-		dnl **************************************************
-		PKG_CHECK_MODULES(NMN, dbus-glib-1)
-		AC_SUBST(NMN_CFLAGS)
-		AC_SUBST(NMN_LIBS)
-
-		# Get the version of the DBus API, so we can hack around API changes until the API stabilises:
-		# multiply by 1000 to convert decimal to integer; so e.g. 0.31 become 310
-		# since preprocessor values must be integral
-		DBUS_VERSION="`$PKG_CONFIG --modversion dbus-1 | $AWK '{print 1000 * $1}'`"
-		AC_SUBST(DBUS_VERSION)
-	else
-		plugins_enabled=`echo $plugins_enabled | sed -e "s/new-mail-notify//g"`
-		echo "warning: dbus-glib-1 was not found, new-mail-notify plugin will not be built."
-	fi
+if ${PKG_CONFIG} --exists dbus-glib-1 ; then
+	dnl **************************************************
+	dnl * Mail Notification plugin's DBus messages
+	dnl **************************************************
+	PKG_CHECK_MODULES(NMN, dbus-glib-1)
+	AC_SUBST(NMN_CFLAGS)
+	AC_SUBST(NMN_LIBS)
+
+	# Get the version of the DBus API, so we can hack around API changes until the API stabilises:
+	# multiply by 1000 to convert decimal to integer; so e.g. 0.31 become 310
+	# since preprocessor values must be integral
+	DBUS_VERSION="`$PKG_CONFIG --modversion dbus-1 | $AWK '{print 1000 * $1}'`"
+	AC_SUBST(DBUS_VERSION)
+	AC_DEFINE(HAVE_DBUS,1,[Define if you have DBUS support])
+	AC_SUBST(HAVE_DBUS)
+	AM_CONDITIONAL(ENABLE_DBUS, true)
+	
+else
+	echo "warning: dbus-glib-1 was not found, Mail notification plugins's dbus message support not built"
+	AM_CONDITIONAL(ENABLE_DBUS, false)
+
 fi
 
 if echo ${plugins_enabled} | grep "exchange-operations" > /dev/null ; then
@@ -1964,7 +1967,6 @@
 plugins/mail-to-meeting/Makefile
 plugins/mail-to-task/Makefile
 plugins/mono/Makefile
-plugins/new-mail-notify/Makefile
 plugins/subject-thread/Makefile
 plugins/save-attachments/Makefile
 plugins/save-calendar/Makefile

Modified: trunk/plugins/mail-notification/Makefile.am
==============================================================================
--- trunk/plugins/mail-notification/Makefile.am	(original)
+++ trunk/plugins/mail-notification/Makefile.am	Wed Jan  9 15:10:48 2008
@@ -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 @@
 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

Modified: trunk/plugins/mail-notification/mail-notification.c
==============================================================================
--- trunk/plugins/mail-notification/mail-notification.c	(original)
+++ trunk/plugins/mail-notification/mail-notification.c	Wed Jan  9 15:10:48 2008
@@ -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 @@
 /*                           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 @@
 	return w;
 }
 
+#endif
+
 /* -------------------------------------------------------------------  */
 /*                     Notification area part                           */
 /* -------------------------------------------------------------------  */
@@ -700,9 +708,10 @@
 
 	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 @@
 
 	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 @@
 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 @@
 
 		enabled = TRUE;
 	} else {
+#ifdef HAVE_DBUS
 		enable_dbus (enable);
+#endif 
 		enable_status (enable);
 		enable_sound (enable);
 
@@ -772,10 +785,11 @@
 	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);

Modified: trunk/po/POTFILES.in
==============================================================================
--- trunk/po/POTFILES.in	(original)
+++ trunk/po/POTFILES.in	Wed Jan  9 15:10:48 2008
@@ -373,8 +373,6 @@
 plugins/mark-all-read/org-gnome-mark-all-read.eplug.xml
 plugins/mark-calendar-offline/org-gnome-mark-calendar-offline.eplug.xml
 plugins/mono/org-gnome-evolution-mono.eplug.xml
-plugins/new-mail-notify/new-mail-notify.c
-plugins/new-mail-notify/org-gnome-new-mail-notify.eplug.xml
 plugins/plugin-manager/org-gnome-plugin-manager.eplug.xml
 plugins/plugin-manager/org-gnome-plugin-manager.xml
 plugins/plugin-manager/plugin-manager.c



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]