[evolution/gnome-2-28] Bug #250046 - Do not count Post To addresses when not shown



commit 794efcbda8d47fe266f762c8f4358a6d3444050a
Author: Milan Crha <mcrha redhat com>
Date:   Tue Dec 15 11:36:21 2009 +0100

    Bug #250046 - Do not count Post To addresses when not shown
    
    This is just a part of the above mentioned bug, the part which allows
    notification to user that he/she didn't fill any recipient.

 mail/em-composer-utils.c |   15 ++++++++++-----
 1 files changed, 10 insertions(+), 5 deletions(-)
---
diff --git a/mail/em-composer-utils.c b/mail/em-composer-utils.c
index 2586e91..71c75c1 100644
--- a/mail/em-composer-utils.c
+++ b/mail/em-composer-utils.c
@@ -265,10 +265,10 @@ composer_get_message (EMsgComposer *composer, gboolean save_html_object_data)
 	GConfClient *gconf;
 	EAccount *account;
 	gint i;
-	GList *postlist;
 	EMEvent *eme;
 	EMEventTargetComposer *target;
 	EComposerHeaderTable *table;
+	EComposerHeader *post_to_header;
 
 	gconf = mail_config_get_gconf_client ();
 	table = e_msg_composer_get_header_table (composer);
@@ -322,10 +322,15 @@ composer_get_message (EMsgComposer *composer, gboolean save_html_object_data)
 
 	camel_object_unref (cia);
 
-	postlist = e_composer_header_table_get_post_to (table);
-	num_post = g_list_length(postlist);
-	g_list_foreach(postlist, (GFunc)g_free, NULL);
-	g_list_free(postlist);
+	post_to_header = e_composer_header_table_get_header (table, E_COMPOSER_HEADER_POST_TO);
+	if (e_composer_header_get_visible (post_to_header)) {
+		GList *postlist;
+
+		postlist = e_composer_header_table_get_post_to (table);
+		num_post = g_list_length (postlist);
+		g_list_foreach (postlist, (GFunc)g_free, NULL);
+		g_list_free (postlist);
+	}
 
 	/* I'm sensing a lack of love, er, I mean recipients. */
 	if (num == 0 && num_post == 0) {



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]