aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMilan Crha <mcrha@redhat.com>2009-12-15 18:36:21 +0800
committerMilan Crha <mcrha@redhat.com>2009-12-15 18:36:21 +0800
commit794efcbda8d47fe266f762c8f4358a6d3444050a (patch)
tree642252060d44f82f9766b7864fe0cc3d186b734b
parent7658b02a5ca7554405e0bcc80ee11d4f002ba695 (diff)
downloadgsoc2013-evolution-794efcbda8d47fe266f762c8f4358a6d3444050a.tar
gsoc2013-evolution-794efcbda8d47fe266f762c8f4358a6d3444050a.tar.gz
gsoc2013-evolution-794efcbda8d47fe266f762c8f4358a6d3444050a.tar.bz2
gsoc2013-evolution-794efcbda8d47fe266f762c8f4358a6d3444050a.tar.lz
gsoc2013-evolution-794efcbda8d47fe266f762c8f4358a6d3444050a.tar.xz
gsoc2013-evolution-794efcbda8d47fe266f762c8f4358a6d3444050a.tar.zst
gsoc2013-evolution-794efcbda8d47fe266f762c8f4358a6d3444050a.zip
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.
-rw-r--r--mail/em-composer-utils.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/mail/em-composer-utils.c b/mail/em-composer-utils.c
index 2586e91fec..71c75c119d 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) {