[evolution/gnome-3-18] Bug 756743 - Attachment reminder warning dialog shown twice in offline mode
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution/gnome-3-18] Bug 756743 - Attachment reminder warning dialog shown twice in offline mode
- Date: Mon, 19 Oct 2015 10:11:15 +0000 (UTC)
commit 364d807b25adefbe261fdfd5bb39098565abe16d
Author: Milan Crha <mcrha redhat com>
Date: Mon Oct 19 12:10:11 2015 +0200
Bug 756743 - Attachment reminder warning dialog shown twice in offline mode
composer/e-composer-private.h | 1 +
composer/e-msg-composer.c | 17 ++++++++++++-----
2 files changed, 13 insertions(+), 5 deletions(-)
---
diff --git a/composer/e-composer-private.h b/composer/e-composer-private.h
index 3b42140..a87a842 100644
--- a/composer/e-composer-private.h
+++ b/composer/e-composer-private.h
@@ -104,6 +104,7 @@ struct _EMsgComposerPrivate {
gboolean dnd_is_uri;
gboolean check_if_signature_is_changed;
gboolean ignore_next_signature_change;
+ gboolean is_sending_message;
gint focused_entry_selection_start;
gint focused_entry_selection_end;
diff --git a/composer/e-msg-composer.c b/composer/e-msg-composer.c
index 855cf04..6bace77 100644
--- a/composer/e-msg-composer.c
+++ b/composer/e-msg-composer.c
@@ -4036,10 +4036,14 @@ msg_composer_send_cb (EMsgComposer *composer,
view = e_html_editor_get_view (editor);
e_html_editor_view_set_changed (view, TRUE);
+ composer->priv->is_sending_message = TRUE;
+
g_signal_emit (
composer, signals[SEND], 0,
message, context->activity);
+ composer->priv->is_sending_message = FALSE;
+
g_object_unref (message);
async_context_free (context);
@@ -4237,15 +4241,18 @@ e_msg_composer_save_to_outbox (EMsgComposer *composer)
EHTMLEditor *editor;
AsyncContext *context;
GCancellable *cancellable;
- gboolean proceed_with_save = TRUE;
g_return_if_fail (E_IS_MSG_COMPOSER (composer));
- /* This gives the user a chance to abort the save. */
- g_signal_emit (composer, signals[PRESEND], 0, &proceed_with_save);
+ if (!composer->priv->is_sending_message) {
+ gboolean proceed_with_save = TRUE;
- if (!proceed_with_save)
- return;
+ /* This gives the user a chance to abort the save. */
+ g_signal_emit (composer, signals[PRESEND], 0, &proceed_with_save);
+
+ if (!proceed_with_save)
+ return;
+ }
editor = e_msg_composer_get_editor (composer);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]