[Commits] [SCM] claws branch, master, updated. 3.13.2-162-g6295af1

wwp at claws-mail.org wwp at claws-mail.org
Sun Jul 3 10:45:40 CEST 2016


The branch, master has been updated
       via  6295af1f9553d53f6e96b79b444b3d52ea72ae3b (commit)
      from  a5fb6aac0a75ff1d54d932ab1daa5c5ce922e8b8 (commit)

Summary of changes:
 src/plugins/notification/notification_trayicon.c |   16 +++++++++++-----
 1 file changed, 11 insertions(+), 5 deletions(-)


- Log -----------------------------------------------------------------
commit 6295af1f9553d53f6e96b79b444b3d52ea72ae3b
Author: wwp <wwp at free.fr>
Date:   Sun Jul 3 10:40:32 2016 +0200

    notification plug-in: skip SMTP-only accounts when building the
    'Get mail from account' menu.

diff --git a/src/plugins/notification/notification_trayicon.c b/src/plugins/notification/notification_trayicon.c
index c4a5442..7201837 100644
--- a/src/plugins/notification/notification_trayicon.c
+++ b/src/plugins/notification/notification_trayicon.c
@@ -53,8 +53,9 @@
 #include "gtk/gtkutils.h"
 #include "inc.h"
 
-static void notification_trayicon_account_list_reset(const gchar *name,
-														gpointer callback);
+static void notification_trayicon_account_list_reset(const gchar *,
+														gpointer,
+														gboolean);
 
 static GdkPixbuf* notification_trayicon_create(void);
 
@@ -343,7 +344,8 @@ gboolean notification_trayicon_main_window_got_iconified(gpointer source,
 }
 
 static void notification_trayicon_account_list_reset(const gchar *menuname,
-													gpointer callback)
+													gpointer callback,
+													gboolean receive)
 {
     GList *cur_ac;
 	GtkWidget *menu, *submenu;
@@ -361,6 +363,10 @@ static void notification_trayicon_account_list_reset(const gchar *menuname,
 	for(cur_ac = account_list; cur_ac != NULL; cur_ac = cur_ac->next) {
 		ac_prefs = (PrefsAccount *)cur_ac->data;
 
+		/* accounts list for receiving: skip SMTP-only accounts */
+		if (receive && ac_prefs->protocol == A_NONE)
+			continue;
+
 		menuitem = gtk_menu_item_new_with_label
 						(ac_prefs->account_name ? ac_prefs->account_name
 						: _("Untitled"));
@@ -379,9 +385,9 @@ gboolean notification_trayicon_account_list_changed(gpointer source,
 {
 	if (notify_config.trayicon_enabled) {
 	  	notification_trayicon_account_list_reset("/Menus/SysTrayiconPopup/GetMailAcc",
-												(gpointer)trayicon_get_from_account_cb);
+												(gpointer)trayicon_get_from_account_cb, TRUE);
 		notification_trayicon_account_list_reset("/Menus/SysTrayiconPopup/EmailAcc",
-												(gpointer)trayicon_compose_acc_cb);
+												(gpointer)trayicon_compose_acc_cb, FALSE);
 	}
 	return FALSE;
 }

-----------------------------------------------------------------------


hooks/post-receive
-- 
Claws Mail


More information about the Commits mailing list