On Mit, 2009-03-18 at 09:56 +0100, Michel Dänzer wrote:
> Note that just rebuilding against evolution-dev 2.24 makes the plugin
> load but crash Evolution on startup. See
> https://bugs.launchpad.net/mail-notification/+bug/251031 (the Ubuntu
> package referenced there has an extended patch which doesn't require a
> newer gob2).
> 
> Moreover, while that patch fixes the crash, updates to the monitored
> Evolution mailboxes no longer seem to be noticed properly. I think
> https://bugs.launchpad.net/ubuntu/+source/mail-notification/+bug/292482
> is about this, but I haven't found any fix for this yet. Adding -Wall to
> the build doesn't give any warnings in the Evolution related code
> either.

After some fiddling in the Mail Notification preferences, it seems fine
again. I'm not sure, but I think removing and re-adding problematic
Evolution mailboxes did the trick, so maybe some Evolution internal
identification such as the URI changed or something like that.

So it would be great if there could be a new upload with the attached
patch, downloaded from
http://patches.ubuntu.com/m/mail-notification/extracted/02-fix_evolution_crash_on_startup.diff
 . 5.4.dfsg.1-1+b1 will crash evolution on startup, at least if the 
mail-notification daemon is running and there are Evolution mailboxes 
configured in it.


-- 
Earthling Michel Dänzer           |                http://www.vmware.com
Libre software enthusiast         |          Debian, X and DRI developer
#
# Ubuntu: https://launchpad.net/bugs/251031
# Upstream: none
# Description: the behaviour of the function camel_folder_summary_array (which
#  is called by the function camel_folder_get_summary) has changed.
#  Instead of a GPtrArray containing CamelMessageInfo pointers, the function
#  now returns a GPtrArray containing uid's (char*).
#  Thanks to Erik van Pienbroek for the initial patch.
#  Unfortunately, patching a ".gob" file means re-running gob2 but
#  mail-notification requires gob2 2.0.16, which does not exist as of today. To
#  workaround this, patch the generated file too, and touch the corresponding
#  stamp file so gob2 is not needed.
#
---
 src/mn-evolution-server.gob             |    5 +++++
 build/src/mn-evolution-server.c         |    3 ++-
 build/src/mn-evolution-server.gob.stamp |    1 +
 3 files changed, 8 insertions(+), 1 deletion(-)

Index: mail-notification-5.4.dfsg.1/src/mn-evolution-server.gob
===================================================================
--- src/mn-evolution-server.gob.orig
+++ src/mn-evolution-server.gob
@@ -230,17 +230,22 @@
 	int i;
 
 	*ret = g_ptr_array_new();
 
 	summary = camel_folder_get_summary(folder);
 
 	for (i = 0; i < summary->len; i++)
 	  {
+#if EDS_CHECK_VERSION(2,23,5)
+	    char *uid = summary->pdata[i];
+	    CamelMessageInfo *info = camel_folder_get_message_info(folder, uid);
+#else
 	    CamelMessageInfo *info = summary->pdata[i];
+#endif
 
 	    if ((camel_message_info_flags(info) & CAMEL_MESSAGE_SEEN) == 0)
 	      g_ptr_array_add(*ret, self_camel_message_info_to_dbus_struct(info));
 	  }
 
 	camel_folder_free_summary(folder, summary);
 	camel_object_unref(folder);
       }
Index: mail-notification-5.4.dfsg.1/build/src/mn-evolution-server.c
===================================================================
--- build/src/mn-evolution-server.c.orig
+++ build/src/mn-evolution-server.c
@@ -590,17 +590,18 @@
 	int i;
 
 	*ret = g_ptr_array_new();
 
 	summary = camel_folder_get_summary(folder);
 
 	for (i = 0; i < summary->len; i++)
 	  {
-	    CamelMessageInfo *info = summary->pdata[i];
+	    char *uid = summary->pdata[i];
+	    CamelMessageInfo *info = camel_folder_get_message_info(folder, uid);
 
 	    if ((camel_message_info_flags(info) & CAMEL_MESSAGE_SEEN) == 0)
 	      g_ptr_array_add(*ret, self_camel_message_info_to_dbus_struct(info));
 	  }
 
 	camel_folder_free_summary(folder, summary);
 	camel_object_unref(folder);
       }
Index: mail-notification-5.4.dfsg.1/build/src/mn-evolution-server.gob.stamp
===================================================================
--- build/src/mn-evolution-server.gob.stamp.orig
+++ build/src/mn-evolution-server.gob.stamp
@@ -0,0 +1 @@
+touched

Reply via email to