ports/156982: [MAINTAINER] mail/mail-notification: unbreak evolution and fix other things

Marcin Wisnicki mwisnicki+freebsd at gmail.com
Thu May 12 19:10:15 UTC 2011


>Number:         156982
>Category:       ports
>Synopsis:       [MAINTAINER] mail/mail-notification: unbreak evolution and fix other things
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          maintainer-update
>Submitter-Id:   current-users
>Arrival-Date:   Thu May 12 19:10:10 UTC 2011
>Closed-Date:
>Last-Modified:
>Originator:     Marcin Wisnicki
>Release:        FreeBSD 8.2-STABLE i386
>Organization:
>Environment:
System: FreeBSD ghost.pnet.one.pl 8.2-STABLE FreeBSD 8.2-STABLE #2: Wed Apr 20 20:49:16 CEST 2011
>Description:
- unbreak Evolution support with evolution-2.32
- bring other patches from Fedora (keep the naming!)
- remove MD5 checksum
- properly use bsd.port.options.mk

Added file(s):
- files/patch-50-evolution
- files/patch-52-sasl_encode64
- files/patch-53-evolution-gtkhtml
- files/patch-54-camel_headers
- files/patch-56-weak
- files/patch-57-popup-attach
- files/patch-58-kde-trayicon

Generated with FreeBSD Port Tools 0.99
>How-To-Repeat:
>Fix:

--- mail-notification-5.4_8.patch begins here ---
diff -ruN --exclude=CVS /usr/ports/mail/mail-notification.orig/Makefile /usr/ports/mail/mail-notification/Makefile
--- /usr/ports/mail/mail-notification.orig/Makefile	2010-08-22 19:16:38.000000000 +0200
+++ /usr/ports/mail/mail-notification/Makefile	2011-05-12 18:58:36.000000000 +0200
@@ -7,7 +7,7 @@
 
 PORTNAME=	mail-notification
 DISTVERSION=	5.4
-PORTREVISION=	7
+PORTREVISION=	8
 CATEGORIES=	mail ipv6
 MASTER_SITES=	${MASTER_SITE_SAVANNAH}
 MASTER_SITE_SUBDIR=	mailnotify
@@ -45,7 +45,7 @@
 		SYLPHEED "Sylpheed support" on \
 		YAHOO "Yahoo! Mail support" on
 
-.include <bsd.port.pre.mk>
+.include <bsd.port.options.mk>
 
 .if defined(WITHOUT_MBOX)
 JB_CONF_ARGS+=	mbox=no
@@ -94,11 +94,8 @@
 EVO_VERSION!=	make -C ${PORTSDIR}/mail/evolution -V EVO_VERSION
 BUILD_DEPENDS+=	${LOCALBASE}/libdata/pkgconfig/evolution-plugin.pc:${PORTSDIR}/mail/evolution
 RUN_DEPENDS+=	${LOCALBASE}/libdata/pkgconfig/evolution-plugin.pc:${PORTSDIR}/mail/evolution
+USE_GNOME+=	gtkhtml3
 PLIST_SUB+=	EVOLUTION="" EVO_VERSION=${EVO_VERSION}
-# Work around the fact that MN is using evolution's private(?) api that is not part of
-# evolution-plugin thus it's includes are not covered by pkgconfig metadata.
-# That path is frozen at 3.14 even for later versions of libgtkhtml.
-CFLAGS+=	-I${LOCALBASE}/include/libgtkhtml-3.14 -I${LOCALBASE}/include/libgtkhtml-3.14/editor
 .endif
 .if defined(WITHOUT_MOZILLA)
 JB_CONF_ARGS+=	mozilla=no
@@ -120,8 +117,7 @@
 .if defined(WITHOUT_SSL)
 JB_CONF_ARGS+=	ssl=no
 .else
-# we can't use USE_OPENSSL=yes after including bsd.port.pre.mk
-.include "${PORTSDIR}/Mk/bsd.openssl.mk"
+USE_OPENSSL=	yes
 .endif
 .if defined(WITHOUT_SASL)
 JB_CONF_ARGS+=	sasl=no
@@ -143,4 +139,4 @@
 do-install:
 	cd ${WRKSRC} && ./jb install
 
-.include <bsd.port.post.mk>
+.include <bsd.port.mk>
diff -ruN --exclude=CVS /usr/ports/mail/mail-notification.orig/distinfo /usr/ports/mail/mail-notification/distinfo
--- /usr/ports/mail/mail-notification.orig/distinfo	2008-07-17 20:15:34.000000000 +0200
+++ /usr/ports/mail/mail-notification/distinfo	2011-05-12 20:24:48.000000000 +0200
@@ -1,3 +1,2 @@
-MD5 (mail-notification-5.4.tar.bz2) = c8dc33a61251acb5474e56eab6b18f43
 SHA256 (mail-notification-5.4.tar.bz2) = 5dec5f3852437e7735269697c77a29a24ea230987c764523fe66dabdca815af5
 SIZE (mail-notification-5.4.tar.bz2) = 570008
diff -ruN --exclude=CVS /usr/ports/mail/mail-notification.orig/files/patch-50-evolution /usr/ports/mail/mail-notification/files/patch-50-evolution
--- /usr/ports/mail/mail-notification.orig/files/patch-50-evolution	1970-01-01 01:00:00.000000000 +0100
+++ /usr/ports/mail/mail-notification/files/patch-50-evolution	2011-05-09 20:35:29.000000000 +0200
@@ -0,0 +1,188 @@
+diff -Nrbu build/src/mn-evolution-folder-tree-server.c build/src/mn-evolution-folder-tree-server.c
+--- build/src/mn-evolution-folder-tree-server.c	2008-05-22 19:47:48.000000000 +0400
++++ build/src/mn-evolution-folder-tree-server.c	2010-09-17 17:45:05.000000000 +0400
+@@ -25,7 +25,10 @@
+ #line 24 "src/mn-evolution-folder-tree-server.gob"
+ 
+ #include <dbus/dbus.h>
++#include <libedataserver/eds-version.h>
++#if !EDS_CHECK_VERSION(2,29,0)
+ #include <mail/mail-component.h>
++#endif
+ #include <mail/em-folder-tree.h>
+ #include "mn-evolution-plugin.h"
+ #include "mn-evolution.h"
+@@ -441,10 +444,14 @@
+ {
+ #line 61 "src/mn-evolution-folder-tree-server.gob"
+ 	
++#if EDS_CHECK_VERSION(2,29,0)
++    selfp->tree = em_folder_tree_new();
++#else
+     EMFolderTreeModel *model;
+ 
+     model = mail_component_peek_tree_model(mail_component_peek());
+     selfp->tree = em_folder_tree_new_with_model(model);
++#endif
+ 
+     selfp->plug = gtk_plug_new((GdkNativeWindow) selfp->id);
+     gtk_container_add(GTK_CONTAINER(selfp->plug), selfp->tree);
+diff -Nrbu build/src/mn-evolution-server.c build/src/mn-evolution-server.c
+--- build/src/mn-evolution-server.c	2008-05-22 19:47:48.000000000 +0400
++++ build/src/mn-evolution-server.c	2010-09-17 17:45:32.000000000 +0400
+@@ -27,10 +27,16 @@
+ #include <stdio.h>
+ #include <libintl.h>
+ #include <gobject/gvaluecollector.h>
++#include <libedataserver/eds-version.h>
+ #include <camel/camel-folder.h>
++#if EDS_CHECK_VERSION(2,29,0)
++#include <shell/e-shell.h>
++#include <mail/e-mail-browser.h>
++#else
+ #include <mail/em-folder-view.h>
+ #include <mail/em-format.h>
+ #include <mail/em-message-browser.h>
++#endif
+ #include <mail/em-utils.h>
+ #include <mail/mail-session.h>
+ #include <mail/mail-tools.h>
+@@ -391,10 +397,18 @@
+     info = g_new0(FolderInfo, 1);
+     info->uri = g_strdup(uri);
+     info->folder = folder;
++#if EDS_CHECK_VERSION(2,31,0)
++    g_object_ref(folder);
++#else
+     camel_object_ref(folder);
++#endif
+ 
+     /* uncache the folder when it is deleted */
++#if EDS_CHECK_VERSION(2,31,0)
++    g_signal_connect(folder, "deleted", G_CALLBACK(self_folder_deleted_cb), info);
++#else
+     camel_object_hook_event(folder, "deleted", self_folder_deleted_cb, info);
++#endif
+ 
+     g_hash_table_replace(folders, info->uri, info);
+   }}
+@@ -413,8 +427,13 @@
+ {
+ #line 105 "src/mn-evolution-server.gob"
+ 	
++#if EDS_CHECK_VERSION(2,31,0)
++    g_signal_handlers_disconnect_by_func(info->folder, self_folder_deleted_cb, info);
++    g_object_unref(info->folder);
++#else
+     camel_object_unhook_event(info->folder, "deleted", self_folder_deleted_cb, info);
+     camel_object_unref(info->folder);
++#endif
+     g_free(info->uri);
+     g_free(info);
+   }}
+@@ -461,7 +480,11 @@
+ 	if (info)
+ 	  {
+ 	    folder = info->folder;
++#if EDS_CHECK_VERSION(2,31,0)
++	    g_object_ref(folder);
++#else
+ 	    camel_object_ref(folder);
++#endif
+ 	  }
+       }
+     else
+@@ -595,14 +618,23 @@
+ 
+ 	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);
++#if EDS_CHECK_VERSION(2,31,0)
++	g_object_unref(folder);
++#else
+ 	camel_object_unref(folder);
++#endif
+       }
+ 
+     GDK_THREADS_LEAVE();
+@@ -638,7 +670,11 @@
+     if (folder)
+       {
+ 	*ret = g_strdup(camel_folder_get_name(folder));
++#if EDS_CHECK_VERSION(2,31,0)
++	g_object_unref(folder);
++#else
+ 	camel_object_unref(folder);
++#endif
+       }
+ 
+     GDK_THREADS_LEAVE();
+@@ -673,6 +709,19 @@
+     folder = self_lookup_folder(folder_uri, err);
+     if (folder)
+       {
++#if EDS_CHECK_VERSION(2,29,0)
++	EShell *shell;
++	EShellBackend *shell_backend;
++	GtkWidget *browser;
++
++	shell = e_shell_get_default ();
++	shell_backend = e_shell_get_backend_by_name (shell, "mail");
++
++	browser = e_mail_browser_new (shell_backend);
++	e_mail_reader_set_folder (E_MAIL_READER (browser), folder, folder_uri);
++	e_mail_reader_set_message (E_MAIL_READER (browser), message_uid);
++	gtk_widget_show (browser);
++#else
+ 	GtkWidget *browser;
+ 
+ 	/* modelled after Evolution's handleuri_got_folder() */
+@@ -683,8 +732,13 @@
+ 	em_folder_view_set_folder((EMFolderView *) browser, folder, folder_uri);
+ 	em_folder_view_set_message((EMFolderView *) browser, message_uid, FALSE);
+ 	gtk_widget_show(((EMMessageBrowser *) browser)->window);
++#endif
+ 
++#if EDS_CHECK_VERSION(2,31,0)
++	g_object_unref(folder);
++#else
+ 	camel_object_unref(folder);
++#endif
+       }
+ 
+     GDK_THREADS_LEAVE();
+@@ -721,7 +775,11 @@
+     if (folder)
+       {
+ 	status = camel_folder_set_message_flags(folder, message_uid, flags, flags);
++#if EDS_CHECK_VERSION(2,31,0)
++	g_object_unref(folder);
++#else
+ 	camel_object_unref(folder);
++#endif
+ 
+ 	if (! status)
+ 	  g_set_error(err,
+diff -Nrbu src/mn-evolution-plugin.c src/mn-evolution-plugin.c
+--- src/mn-evolution-plugin.c	2008-05-22 19:45:35.000000000 +0400
++++ src/mn-evolution-plugin.c	2010-09-17 17:45:05.000000000 +0400
+@@ -204,7 +204,7 @@
+ }
+ 
+ int
+-e_plugin_lib_enable (EPluginLib *ep, int enable)
++e_plugin_lib_enable (EPlugin *ep, int enable)
+ {
+   static gboolean enabled = FALSE;
+   GError *err = NULL;
diff -ruN --exclude=CVS /usr/ports/mail/mail-notification.orig/files/patch-52-sasl_encode64 /usr/ports/mail/mail-notification/files/patch-52-sasl_encode64
--- /usr/ports/mail/mail-notification.orig/files/patch-52-sasl_encode64	1970-01-01 01:00:00.000000000 +0100
+++ /usr/ports/mail/mail-notification/files/patch-52-sasl_encode64	2011-05-09 22:10:05.000000000 +0200
@@ -0,0 +1,24 @@
+diff -up build/src/mn-pop3-mailbox.c build/src/mn-pop3-mailbox.c
+--- build/src/mn-pop3-mailbox.c	2009-05-19 10:29:58.448201837 +0200
++++ build/src/mn-pop3-mailbox.c	2009-05-19 10:23:29.356204287 +0200
+@@ -619,7 +619,7 @@ mn_pop3_mailbox_enter_auth_cb (MNClientS
+ 
+ 	if (initial_clientoutlen > 0)
+ 	  {
+-	    char buf64[initial_clientoutlen * 2]; /* Base64 is 33% larger than the data it encodes */
++	    char buf64[initial_clientoutlen * 2 + 1]; /* Base64 is 33% larger than the data it encodes */
+ 	    unsigned int outlen;
+ 	    int result;
+ 	    char *str;
+diff -up src/mn-client-session.c src/mn-client-session.c
+--- src/mn-client-session.c	2008-05-22 17:45:35.000000000 +0200
++++ src/mn-client-session.c	2009-05-19 10:29:09.112211055 +0200
+@@ -1030,7 +1030,7 @@ mn_client_session_write (MNClientSession
+ static int
+ write_base64 (MNClientSession *session, const char *buf, unsigned int len)
+ {
+-  char buf64[len * 2];		/* Base64 is 33% larger than the data it encodes */
++  char buf64[len * 2 + 1];		/* Base64 is 33% larger than the data it encodes */
+   unsigned int outlen;
+   int result;
+   char *str;
diff -ruN --exclude=CVS /usr/ports/mail/mail-notification.orig/files/patch-53-evolution-gtkhtml /usr/ports/mail/mail-notification/files/patch-53-evolution-gtkhtml
--- /usr/ports/mail/mail-notification.orig/files/patch-53-evolution-gtkhtml	1970-01-01 01:00:00.000000000 +0100
+++ /usr/ports/mail/mail-notification/files/patch-53-evolution-gtkhtml	2011-05-12 18:06:54.000000000 +0200
@@ -0,0 +1,12 @@
+diff -Nrbu jbsrc/lib/src/extras/jb-evolution-plugin.c jbsrc/lib/src/extras/jb-evolution-plugin.c
+--- jbsrc/lib/src/extras/jb-evolution-plugin.c	2008-04-27 18:47:43.000000000 +0400
++++ jbsrc/lib/src/extras/jb-evolution-plugin.c	2009-08-21 19:48:22.000000000 +0400
+@@ -41,7 +41,7 @@
+   if (! minversion)
+     minversion = "2.12";
+ 
+-  packages = g_strdup_printf("evolution-plugin >= %s", minversion);
++  packages = g_strdup_printf("evolution-plugin >= %s libgtkhtml-3.14 gtkhtml-editor-3.14", minversion);
+   result = jb_check_packages("Evolution", "evolution-plugin", packages);
+   g_free(packages);
+ 
diff -ruN --exclude=CVS /usr/ports/mail/mail-notification.orig/files/patch-54-camel_headers /usr/ports/mail/mail-notification/files/patch-54-camel_headers
--- /usr/ports/mail/mail-notification.orig/files/patch-54-camel_headers	1970-01-01 01:00:00.000000000 +0100
+++ /usr/ports/mail/mail-notification/files/patch-54-camel_headers	2011-05-09 20:37:46.000000000 +0200
@@ -0,0 +1,36 @@
+diff -Nrbu build/src/mn-evolution-message.c build/src/mn-evolution-message.c
+--- build/src/mn-evolution-message.c	2008-05-22 19:47:51.000000000 +0400
++++ build/src/mn-evolution-message.c	2010-05-04 18:13:31.000000000 +0400
+@@ -25,7 +25,7 @@
+ #line 24 "src/mn-evolution-message.gob"
+ 
+ #include <glib/gi18n.h>
+-#include <camel/camel-folder-summary.h>
++#include <camel/camel.h>
+ #include "mn-evolution-mailbox.h"
+ #include "mn-message-private.h"
+ #include "mn-evolution-client.h"
+diff -Nrbu build/src/mn-evolution-server.c build/src/mn-evolution-server.c
+--- build/src/mn-evolution-server.c	2010-05-04 18:12:56.000000000 +0400
++++ build/src/mn-evolution-server.c	2010-05-04 18:13:39.000000000 +0400
+@@ -28,7 +28,7 @@
+ #include <libintl.h>
+ #include <gobject/gvaluecollector.h>
+ #include <libedataserver/eds-version.h>
+-#include <camel/camel-folder.h>
++#include <camel/camel.h>
+ #if EDS_CHECK_VERSION(2,29,0)
+ #include <shell/e-shell.h>
+ #include <mail/e-mail-browser.h>
+diff -Nrbu src/mn-evolution-plugin.c src/mn-evolution-plugin.c
+--- src/mn-evolution-plugin.c	2010-05-04 18:12:56.000000000 +0400
++++ src/mn-evolution-plugin.c	2010-05-04 18:13:20.000000000 +0400
+@@ -24,7 +24,7 @@
+ #include <dbus/dbus.h>
+ #include <dbus/dbus-glib-lowlevel.h>
+ #include <dbus/dbus-glib-bindings.h>
+-#include <camel/camel-folder.h>
++#include <camel/camel.h>
+ #include <mail/em-event.h>
+ #include <mail/mail-tools.h>
+ #include "mn-evolution.h"
diff -ruN --exclude=CVS /usr/ports/mail/mail-notification.orig/files/patch-56-weak /usr/ports/mail/mail-notification/files/patch-56-weak
--- /usr/ports/mail/mail-notification.orig/files/patch-56-weak	1970-01-01 01:00:00.000000000 +0100
+++ /usr/ports/mail/mail-notification/files/patch-56-weak	2011-05-09 22:09:01.000000000 +0200
@@ -0,0 +1,11 @@
+diff -Nrbu build/src/mn-shell.c build/src/mn-shell.c
+--- build/src/mn-shell.c	2008-05-22 19:47:49.000000000 +0400
++++ build/src/mn-shell.c	2010-05-24 19:39:48.000000000 +0400
+@@ -1008,6 +1008,7 @@
+     Self *self = user_data;
+ 
+     /* The Notification Area applet has been terminated. Recreate the icon. */
++    mn_remove_weak_pointer(&self->icon);
+     self_init_icon(self);
+   }}
+ #line 1014 "mn-shell.c"
diff -ruN --exclude=CVS /usr/ports/mail/mail-notification.orig/files/patch-57-popup-attach /usr/ports/mail/mail-notification/files/patch-57-popup-attach
--- /usr/ports/mail/mail-notification.orig/files/patch-57-popup-attach	1970-01-01 01:00:00.000000000 +0100
+++ /usr/ports/mail/mail-notification/files/patch-57-popup-attach	2011-05-09 22:11:02.000000000 +0200
@@ -0,0 +1,45 @@
+diff -Nrbu build/src/mn-popup.c build/src/mn-popup.c
+--- build/src/mn-popup.c	2008-05-22 19:47:49.000000000 +0400
++++ build/src/mn-popup.c	2010-10-11 17:42:32.000000000 +0400
+@@ -177,6 +177,29 @@
+ #undef __GOB_FUNCTION__
+ 
+ static void 
++mn_popup_wait_for_icon_to_become_ready (void)
++{
++    int x, y;
++    int count = 0;
++
++    /* When the tray icon is created, it can still take some time before
++     * it has arrived at the correct position. This is especially the case
++     * on KDE environments. To work around this, add a little delay of at
++     * most 2 seconds before showing a popup which is attached to the notification */
++    do {
++        gdk_window_get_origin (gtk_widget_get_window (mn_shell->icon), &x, &y);
++
++        if (x != 0 || y != 0) {
++            break;
++        }
++
++        g_usleep(G_USEC_PER_SEC / 10);
++        count++;
++    } while (count < 20);
++}
++
++
++static void 
+ mn_popup_init (MNPopup * o G_GNUC_UNUSED)
+ {
+ #define __GOB_FUNCTION__ "MN:Popup::init"
+@@ -299,8 +322,10 @@
+ 		 "icon-name", "stock_mail",
+ 		 NULL);
+ 
+-    if (mn_conf_get_enum_value(MN_TYPE_POPUP_POSITION, MN_CONF_POPUPS_POSITION) == MN_POPUP_POSITION_ATTACHED)
++    if (mn_conf_get_enum_value(MN_TYPE_POPUP_POSITION, MN_CONF_POPUPS_POSITION) == MN_POPUP_POSITION_ATTACHED) {
++      mn_popup_wait_for_icon_to_become_ready();
+       g_object_set(self, "attach-widget", mn_shell->icon, NULL);
++    }
+ 
+     g_string_free(body, TRUE);
+ 
diff -ruN --exclude=CVS /usr/ports/mail/mail-notification.orig/files/patch-58-kde-trayicon /usr/ports/mail/mail-notification/files/patch-58-kde-trayicon
--- /usr/ports/mail/mail-notification.orig/files/patch-58-kde-trayicon	1970-01-01 01:00:00.000000000 +0100
+++ /usr/ports/mail/mail-notification/files/patch-58-kde-trayicon	2011-05-09 22:11:44.000000000 +0200
@@ -0,0 +1,72 @@
+diff -Nrbu build/src/mn-shell.c build/src/mn-shell.c
+--- build/src/mn-shell.c	2010-10-11 17:45:23.000000000 +0400
++++ build/src/mn-shell.c	2010-10-11 17:45:48.000000000 +0400
+@@ -313,6 +313,29 @@
+ #undef __GOB_FUNCTION__
+ 
+ static void 
++mn_shell_init_icon_base (MNShell * self)
++{
++    g_return_if_fail (self != NULL);
++    g_return_if_fail (MN_IS_SHELL (self));
++
++    self->icon = MN_MAIL_ICON(mn_mail_icon_new());
++    mn_add_weak_pointer(&self->icon);
++
++    g_object_connect(self->icon,
++                     "signal::activate", self_icon_activate_h, self,
++                     "signal::activate-mail-reader", self_icon_activate_mail_reader_h, self,
++                     "signal::activate-open-latest-message", self_icon_activate_open_latest_message_h, self,
++                     "swapped-signal::activate-consider-new-mail-as-read", self_consider_new_mail_as_read, self,
++                     "swapped-signal::activate-update", self_update, self,
++                     "signal::activate-properties", self_icon_activate_properties_h, self,
++                     "signal::activate-help", self_icon_activate_help_h, self,
++                     "signal::activate-about", self_icon_activate_about_h, self,
++                     "swapped-signal::activate-remove", self_quit, self,
++                     "signal::destroy", self_icon_destroy_h, self,
++                     NULL);
++}
++
++static void 
+ mn_shell_init (MNShell * o G_GNUC_UNUSED)
+ {
+ #define __GOB_FUNCTION__ "MN:Shell::init"
+@@ -793,22 +816,7 @@
+ {
+ #line 360 "src/mn-shell.gob"
+ 	
+-    self->icon = MN_MAIL_ICON(mn_mail_icon_new());
+-    mn_add_weak_pointer(&self->icon);
+-
+-    g_object_connect(self->icon,
+-		     "signal::activate", self_icon_activate_h, self,
+-		     "signal::activate-mail-reader", self_icon_activate_mail_reader_h, self,
+-		     "signal::activate-open-latest-message", self_icon_activate_open_latest_message_h, self,
+-		     "swapped-signal::activate-consider-new-mail-as-read", self_consider_new_mail_as_read, self,
+-		     "swapped-signal::activate-update", self_update, self,
+-		     "signal::activate-properties", self_icon_activate_properties_h, self,
+-		     "signal::activate-help", self_icon_activate_help_h, self,
+-		     "signal::activate-about", self_icon_activate_about_h, self,
+-		     "swapped-signal::activate-remove", self_quit, self,
+-		     "signal::destroy", self_icon_destroy_h, self,
+-		     NULL);
+-
++    mn_shell_init_icon_base(self);
+     self_update_sensitivity(self);
+     self_update_tooltip(self);
+     self_update_icon(self);
+@@ -1094,7 +1102,13 @@
+       }
+     else
+       {
+-	gtk_widget_hide(GTK_WIDGET(self->icon));
++	/* Re-create the icon as a regular gtk_widget_hide causes the
++	 * icon to remain visible on non-GNOME environments. We can't
++	 * use the callback self_icon_destroy_h here as it can cause an
++	 * endless recursion */
++	g_signal_handlers_disconnect_by_func(self->icon, self_icon_destroy_h, self);
++	gtk_widget_destroy(GTK_WIDGET(self->icon));
++	mn_shell_init_icon_base(self);
+ 	mn_mail_icon_set_blinking(self->icon, FALSE);
+       }
+   }}
--- mail-notification-5.4_8.patch ends here ---

>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list