[evolution/wip/webkit2] 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/wip/webkit2] Bug 756743 - Attachment reminder warning dialog shown twice in offline mode
- Date: Wed, 2 Mar 2016 13:23:12 +0000 (UTC)
commit 9e3d5458d69cf89adb447f42299e07e1636efd3c
Author: Milan Crha <mcrha redhat com>
Date: Wed Mar 2 14:23:08 2016 +0100
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 7f798b4..716c829 100644
--- a/composer/e-composer-private.h
+++ b/composer/e-composer-private.h
@@ -102,6 +102,7 @@ struct _EMsgComposerPrivate {
gboolean set_signature_from_message;
gboolean drop_occured;
gboolean dnd_is_uri;
+ 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 7a337ef..bfa6a21 100644
--- a/composer/e-msg-composer.c
+++ b/composer/e-msg-composer.c
@@ -4022,10 +4022,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);
@@ -4223,15 +4227,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]