diff options
author | Yan Li <yanli@infradead.org> | 2009-11-05 11:50:34 +0800 |
---|---|---|
committer | Yan Li <yanli@infradead.org> | 2009-11-05 12:06:48 +0800 |
commit | 50ffa65a7aee41c5fa319f64dd3bd3ffdd2be0b3 (patch) | |
tree | f2cb2faaf0e266230ede8620bb7992e037f961ce | |
parent | 6660aa57d943066bdd14751dae8a26e8a2cd32dd (diff) | |
download | gsoc2013-evolution-50ffa65a7aee41c5fa319f64dd3bd3ffdd2be0b3.tar.gz gsoc2013-evolution-50ffa65a7aee41c5fa319f64dd3bd3ffdd2be0b3.tar.zst gsoc2013-evolution-50ffa65a7aee41c5fa319f64dd3bd3ffdd2be0b3.zip |
Bug #596027: In Anjal, although invalid mail address warning popup, mail's tab closed automatically
A new field "mail_sent" is added to the Composer to indicate whether the
mail is sent successfully or not. This is needed by Anjal to know
whether it can destroy the composer or not.
(backported from df1f9b3b33de886c5b9a63b0ee6e722bfea4b2e0 of master)
-rw-r--r-- | composer/e-composer-private.c | 4 | ||||
-rw-r--r-- | composer/e-composer-private.h | 11 | ||||
-rw-r--r-- | composer/e-msg-composer.c | 14 | ||||
-rw-r--r-- | composer/e-msg-composer.h | 3 | ||||
-rw-r--r-- | mail/em-composer-utils.c | 3 |
5 files changed, 35 insertions, 0 deletions
diff --git a/composer/e-composer-private.c b/composer/e-composer-private.c index 9a506fa862..e2260c47e5 100644 --- a/composer/e-composer-private.c +++ b/composer/e-composer-private.c @@ -1,3 +1,5 @@ +/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ + /* * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -274,6 +276,8 @@ e_composer_private_init (EMsgComposer *composer) G_OBJECT (header), "visible", G_OBJECT (action), "active"); } + + priv->mail_sent = FALSE; } void diff --git a/composer/e-composer-private.h b/composer/e-composer-private.h index 49d9ae6d74..8803cf97bd 100644 --- a/composer/e-composer-private.h +++ b/composer/e-composer-private.h @@ -1,3 +1,5 @@ +/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ + /* * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -115,7 +117,16 @@ struct _EMsgComposerPrivate { guint notify_id; + /* This send option is available only for Novell GroupWise and + Microsoft Exchange accounts */ gboolean send_invoked; + + /* The mail composed has been sent. This bit will be set when + the mail passed sanity checking and is sent out, which + indicates that the composer can be destroyed. This bit can + be set/get by using API + e_msg_composer_{set,get}_mail_sent(). */ + gboolean mail_sent; }; void e_composer_private_init (EMsgComposer *composer); diff --git a/composer/e-msg-composer.c b/composer/e-msg-composer.c index f18659ed9d..828a14ec13 100644 --- a/composer/e-msg-composer.c +++ b/composer/e-msg-composer.c @@ -4186,3 +4186,17 @@ e_save_spell_languages (GList *spell_languages) g_error_free (error); } } + +void e_msg_composer_set_mail_sent (EMsgComposer *composer, gboolean mail_sent) +{ + g_return_val_if_fail (composer != NULL, FALSE); + + composer->priv->mail_sent = mail_sent; +} + +gboolean e_msg_composer_get_mail_sent (EMsgComposer *composer) +{ + g_return_val_if_fail (composer != NULL, FALSE); + + return composer->priv->mail_sent; +} diff --git a/composer/e-msg-composer.h b/composer/e-msg-composer.h index 434f330e9a..e1eeede6da 100644 --- a/composer/e-msg-composer.h +++ b/composer/e-msg-composer.h @@ -158,6 +158,9 @@ gboolean e_msg_composer_is_exiting (EMsgComposer *composer); GList * e_load_spell_languages (void); void e_save_spell_languages (GList *spell_languages); +void e_msg_composer_set_mail_sent (EMsgComposer *composer, gboolean mail_sent); +gboolean e_msg_composer_get_mail_sent (EMsgComposer *composer); + G_END_DECLS #endif /* E_MSG_COMPOSER_H */ diff --git a/mail/em-composer-utils.c b/mail/em-composer-utils.c index 1484a1f80d..1800d4c515 100644 --- a/mail/em-composer-utils.c +++ b/mail/em-composer-utils.c @@ -1,3 +1,5 @@ +/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ + /* * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -440,6 +442,7 @@ em_utils_composer_send_cb (EMsgComposer *composer, gpointer user_data) camel_object_ref (mail_folder); /* mail the message */ + e_msg_composer_set_mail_sent (composer, TRUE); info = camel_message_info_new(NULL); camel_message_info_set_flags(info, CAMEL_MESSAGE_SEEN, ~0); |