From dbc14e936f99d632a044d8f336a2747329594b8b Mon Sep 17 00:00:00 2001 From: Sergio Villar Senin Date: Wed, 24 Jun 2009 18:09:07 +0200 Subject: [PATCH] Fixes NB#124313, remove new email notifications when the account is removed --- src/modest-ui-actions.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/modest-ui-actions.c b/src/modest-ui-actions.c index c69a15e..d4353b3 100644 --- a/src/modest-ui-actions.c +++ b/src/modest-ui-actions.c @@ -6864,8 +6864,15 @@ modest_ui_actions_on_delete_account (GtkWindow *parent_window, g_free (default_account_name); removed = modest_account_mgr_remove_account (account_mgr, account_name); - if (!removed) + if (removed) { + /* Close all email notifications, we cannot + distinguish if the notification belongs to + this account or not, so for safety reasons + we remove them all */ + modest_platform_remove_new_mail_notifications (FALSE); + } else { g_warning ("%s: modest_account_mgr_remove_account() failed.\n", __FUNCTION__); + } } return removed; } -- 1.7.9.5