From owner-freebsd-ports-bugs@FreeBSD.ORG Thu May 12 19:10:15 2011 Return-Path: Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7247A1065772 for ; Thu, 12 May 2011 19:10:15 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 914E98FC18 for ; Thu, 12 May 2011 19:10:10 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id p4CJAACW071910 for ; Thu, 12 May 2011 19:10:10 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id p4CJAABC071909; Thu, 12 May 2011 19:10:10 GMT (envelope-from gnats) Resent-Date: Thu, 12 May 2011 19:10:10 GMT Resent-Message-Id: <201105121910.p4CJAABC071909@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Marcin Wisnicki Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CE5811065673 for ; Thu, 12 May 2011 19:04:36 +0000 (UTC) (envelope-from mwisnicki+freebsd@gmail.com) Received: from mail-ww0-f50.google.com (mail-ww0-f50.google.com [74.125.82.50]) by mx1.freebsd.org (Postfix) with ESMTP id 385B48FC17 for ; Thu, 12 May 2011 19:04:35 +0000 (UTC) Received: by wwc33 with SMTP id 33so2070520wwc.31 for ; Thu, 12 May 2011 12:04:35 -0700 (PDT) Received: by 10.216.240.12 with SMTP id d12mr574548wer.8.1305225545162; Thu, 12 May 2011 11:39:05 -0700 (PDT) Received: from (static-78-8-147-77.ssp.dialog.net.pl [78.8.147.77]) by mx.google.com with ESMTPS id n52sm757166wer.24.2011.05.12.11.39.00 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 12 May 2011 11:39:02 -0700 (PDT) Received: by (sSMTP sendmail emulation); Thu, 12 May 2011 20:38:59 +0200 Message-Id: <4dcc2946.4af5d80a.4dfc.4db3@mx.google.com> Date: Thu, 12 May 2011 20:38:59 +0200 From: Marcin Wisnicki Sender: =?UTF-8?Q?Marcin_Wi=C5=9Bnicki?= To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: Subject: ports/156982: [MAINTAINER] mail/mail-notification: unbreak evolution and fix other things X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 May 2011 19:10:15 -0000 >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 +.include .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 +.include 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 ++#include ++#if !EDS_CHECK_VERSION(2,29,0) + #include ++#endif + #include + #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 + #include + #include ++#include + #include ++#if EDS_CHECK_VERSION(2,29,0) ++#include ++#include ++#else + #include + #include + #include ++#endif + #include + #include + #include +@@ -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 +-#include ++#include + #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 + #include + #include +-#include ++#include + #if EDS_CHECK_VERSION(2,29,0) + #include + #include +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 + #include + #include +-#include ++#include + #include + #include + #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: