[evolution/wip/webkit-composer: 780/966] Bug #708731 - [webkit-composer] Cannot set signature to none on re-edit



commit bda24d175dd210af2b6928c0ebc782c8ef654b19
Author: Tomas Popela <tpopela redhat com>
Date:   Thu Jan 23 14:44:51 2014 +0100

    Bug #708731 - [webkit-composer] Cannot set signature to none on re-edit

 composer/e-composer-private.c |    7 +++++--
 composer/e-composer-private.h |    1 +
 2 files changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/composer/e-composer-private.c b/composer/e-composer-private.c
index 5b2a824..f3be785 100644
--- a/composer/e-composer-private.c
+++ b/composer/e-composer-private.c
@@ -133,6 +133,7 @@ e_composer_private_constructed (EMsgComposer *composer)
 
        priv->is_from_message = FALSE;
        priv->is_from_new_message = FALSE;
+       priv->set_signature_from_message = FALSE;
 
        e_composer_actions_init (composer);
 
@@ -1103,11 +1104,13 @@ insert:
                id = webkit_dom_element_get_id (WEBKIT_DOM_ELEMENT (node));
 
                /* When we are editing a message with signature we need to set active
-                * signature id in signature combo box otherwise no signature will be added */
-               if (composer->priv->is_from_message) {
+                * signature id in signature combo box otherwise no signature will be
+                * added but we have to do it just once when the composer opens */
+               if (composer->priv->is_from_message && composer->priv->set_signature_from_message) {
                        gchar *name = webkit_dom_element_get_attribute (WEBKIT_DOM_ELEMENT (node), "name");
                        gtk_combo_box_set_active_id (GTK_COMBO_BOX (combo_box), name);
                        g_free (name);
+                       composer->priv->set_signature_from_message = FALSE;
                }
 
                if (id && (strlen (id) == 1) && (*id == '1')) {
diff --git a/composer/e-composer-private.h b/composer/e-composer-private.h
index 3fa7d12..c9d554f 100644
--- a/composer/e-composer-private.h
+++ b/composer/e-composer-private.h
@@ -94,6 +94,7 @@ struct _EMsgComposerPrivate {
 
        gboolean is_from_message;
        gboolean is_from_new_message;
+       gboolean set_signature_from_message;
 };
 
 void           e_composer_private_constructed  (EMsgComposer *composer);


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