[evolution/wip/webkit-composer] Bug 724653 - [webkit-composer] calendar item can't be forwarded



commit 6b89958d49e9efa68b72e58d693d05d58863f6eb
Author: Tomas Popela <tpopela redhat com>
Date:   Thu Mar 6 14:11:58 2014 +0100

    Bug 724653 - [webkit-composer] calendar item can't be forwarded

 composer/e-composer-private.c |   16 +++++++++-------
 composer/e-composer-private.h |    1 +
 composer/e-msg-composer.c     |    3 +++
 3 files changed, 13 insertions(+), 7 deletions(-)
---
diff --git a/composer/e-composer-private.c b/composer/e-composer-private.c
index 8267f66..035b0f7 100644
--- a/composer/e-composer-private.c
+++ b/composer/e-composer-private.c
@@ -134,6 +134,7 @@ e_composer_private_constructed (EMsgComposer *composer)
        priv->is_from_message = FALSE;
        priv->is_from_new_message = FALSE;
        priv->set_signature_from_message = FALSE;
+       priv->disable_signature = FALSE;
 
        e_composer_actions_init (composer);
 
@@ -196,11 +197,6 @@ e_composer_private_constructed (EMsgComposer *composer)
        priv->header_table = g_object_ref (widget);
        gtk_widget_show (widget);
 
-       g_object_bind_property (
-               editor_widget, "editable",
-               widget, "sensitive",
-               G_BINDING_SYNC_CREATE);
-
        header = e_composer_header_table_get_header (
                E_COMPOSER_HEADER_TABLE (widget),
                E_COMPOSER_HEADER_SUBJECT);
@@ -328,6 +324,12 @@ e_composer_private_constructed (EMsgComposer *composer)
                G_BINDING_SYNC_CREATE |
                G_BINDING_INVERT_BOOLEAN);
 
+       g_object_bind_property (
+               editor, "busy",
+               priv->header_table, "sensitive",
+               G_BINDING_SYNC_CREATE |
+               G_BINDING_INVERT_BOOLEAN);
+
        g_object_unref (settings);
 }
 
@@ -1242,8 +1244,8 @@ e_composer_update_signature (EMsgComposer *composer)
 
        g_return_if_fail (E_IS_MSG_COMPOSER (composer));
 
-       /* Do nothing if we're redirecting a message. */
-       if (composer->priv->redirect)
+       /* Do nothing if we're redirecting a message or we disabled the signature * on purpose */
+       if (composer->priv->redirect || composer->priv->disable_signature)
                return;
 
        table = e_msg_composer_get_header_table (composer);
diff --git a/composer/e-composer-private.h b/composer/e-composer-private.h
index 9216133..0de5207 100644
--- a/composer/e-composer-private.h
+++ b/composer/e-composer-private.h
@@ -95,6 +95,7 @@ struct _EMsgComposerPrivate {
        gboolean is_from_message;
        gboolean is_from_new_message;
        gboolean set_signature_from_message;
+       gboolean disable_signature;
 };
 
 void           e_composer_private_constructed  (EMsgComposer *composer);
diff --git a/composer/e-msg-composer.c b/composer/e-msg-composer.c
index 34bc040..09170fa 100644
--- a/composer/e-msg-composer.c
+++ b/composer/e-msg-composer.c
@@ -4196,6 +4196,9 @@ e_msg_composer_set_body (EMsgComposer *composer,
        editor_widget = e_editor_get_editor_widget (editor);
        table = e_msg_composer_get_header_table (composer);
 
+       /* Disable signature */
+       priv->disable_signature = TRUE;
+
        identity_uid = e_composer_header_table_get_identity_uid (table);
        source = e_composer_header_table_ref_source (table, identity_uid);
 


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