[Commits] notification_plugin.c 1.1.2.43 1.1.2.44 notification_popup.c 1.1.2.32 1.1.2.33 notification_trayicon.c 1.1.2.37 1.1.2.38

miras at claws-mail.org miras at claws-mail.org
Tue Jan 3 01:27:01 CET 2012


Update of /home/claws-mail/plugins/notification/src
In directory claws-mail:/tmp/cvs-serv9711/src

Modified Files:
      Tag: gtk2
	notification_plugin.c notification_popup.c 
	notification_trayicon.c 
Log Message:
2012-01-03 [mir]	0.29cvs2

	* src/notification_plugin.c
	* src/notification_popup.c
	* src/notification_trayicon.c
	    Necessary changes to be able to load when
	    claws-mail is compiled to use the new
	    address book.

Index: notification_trayicon.c
===================================================================
RCS file: /home/claws-mail/plugins/notification/src/Attic/notification_trayicon.c,v
retrieving revision 1.1.2.37
retrieving revision 1.1.2.38
diff -u -d -r1.1.2.37 -r1.1.2.38
--- notification_trayicon.c	22 Oct 2011 17:11:07 -0000	1.1.2.37
+++ notification_trayicon.c	3 Jan 2012 00:26:59 -0000	1.1.2.38
@@ -36,7 +36,12 @@
 #include "prefs_common.h"
 #include "alertpanel.h"
 #include "gtk/menu.h"
-#include "addrindex.h"
+#ifndef USE_NEW_ADDRBOOK
+    #include "addrindex.h"
+#else
+    #include "addressbook-dbus.h"
+#endif
+
 #include "gtk/manage_window.h"
 #include "common/utils.h"
 #include "gtk/gtkutils.h"
@@ -481,7 +486,17 @@
 
 static void trayicon_addressbook_cb(GtkAction *action, gpointer data)
 {
-  addressbook_open(NULL);
+#ifndef USE_NEW_ADDRBOOK
+    addressbook_open(NULL);
+#else
+    GError* error = NULL;
+
+    addressbook_dbus_open(FALSE, &error);
+    if (error) {
+	g_warning("%s", error->message);
+	g_error_free(error);
+    }
+#endif
 }
 
 static void trayicon_toggle_offline_cb(GtkAction *action, gpointer data)
@@ -587,7 +602,9 @@
 {
   gchar *summary = NULL;
   gchar *utf8_str = NULL;
+#ifndef USE_NEW_ADDRBOOK
   GdkPixbuf *pixbuf;
+#endif
   GList *caps = NULL;
   gboolean support_actions = FALSE;
 
@@ -644,6 +661,7 @@
     return FALSE;
   }
 
+#ifndef USE_NEW_ADDRBOOK
   /* Icon */
   pixbuf = NULL;
   if(msginfo && msginfo->from) {
@@ -679,6 +697,7 @@
   }
   else /* This is not fatal */
     debug_print("Notification plugin: Icon could not be loaded.\n");
+#endif
 
   /* timeout */
   notify_notification_set_timeout(popup.notification, notify_config.trayicon_popup_timeout);

Index: notification_popup.c
===================================================================
RCS file: /home/claws-mail/plugins/notification/src/Attic/notification_popup.c,v
retrieving revision 1.1.2.32
retrieving revision 1.1.2.33
diff -u -d -r1.1.2.32 -r1.1.2.33
--- notification_popup.c	2 Jun 2011 22:30:18 -0000	1.1.2.32
+++ notification_popup.c	3 Jan 2012 00:26:59 -0000	1.1.2.33
@@ -24,7 +24,9 @@
 #include "mainwindow.h"
 #include "procmsg.h"
 #include "folder.h"
-#include "addrindex.h"
+#ifndef USE_NEW_ADDRBOOK
+    #include "addrindex.h"
+#endif
 #include "common/utils.h"
 #include "gtk/gtkutils.h"
 
@@ -279,7 +281,9 @@
 static gboolean notification_libnotify_create(MsgInfo *msginfo,
 					      NotificationFolderType nftype)
 {
+#ifndef USE_NEW_ADDRBOOK
   GdkPixbuf *pixbuf;
+#endif
   NotificationPopup *ppopup;
   gchar *summary = NULL;
   gchar *text = NULL;
@@ -377,6 +381,7 @@
 				   GINT_TO_POINTER(nftype),
 				   notification_libnotify_free_func);
 
+#ifndef USE_NEW_ADDRBOOK
   /* Icon */
   pixbuf = NULL;
   if(msginfo && msginfo->from) {
@@ -412,6 +417,7 @@
   }
   else /* This is not fatal */
     debug_print("Notification plugin: Icon could not be loaded.\n");
+#endif
 
   /* timeout */
   notify_notification_set_timeout(ppopup->notification, notify_config.popup_timeout);

Index: notification_plugin.c
===================================================================
RCS file: /home/claws-mail/plugins/notification/src/Attic/notification_plugin.c,v
retrieving revision 1.1.2.43
retrieving revision 1.1.2.44
diff -u -d -r1.1.2.43 -r1.1.2.44
--- notification_plugin.c	22 Oct 2011 17:11:07 -0000	1.1.2.43
+++ notification_plugin.c	3 Jan 2012 00:26:59 -0000	1.1.2.44
@@ -214,7 +214,8 @@
   bind_textdomain_codeset(TEXTDOMAIN, "UTF-8");
 
   /* Version check */
-  if(!check_plugin_version(MAKE_NUMERIC_VERSION(3,7,10,41),
+  /* No be able to test against new-contacts */
+  if(!check_plugin_version(MAKE_NUMERIC_VERSION(3,7,10,16),
 			   VERSION_NUMERIC, _("Notification"), error))
     return -1;
 



More information about the Commits mailing list