[evolution/wip/webkit2] Composer - Auto-generated signature doesn't change on From change



commit ad9a94d4baea9301d3f77b1ca24faa3dfbbedb3e
Author: Milan Crha <mcrha redhat com>
Date:   Wed Nov 18 12:24:56 2015 +0100

    Composer - Auto-generated signature doesn't change on From change
    
    The 'changed' signal of the mail signature combo box is changed into
    a property change notification, where fake notifications are dropped
    by e_signal_connect_notify_swapped(), thus when an identity changes
    from an account which uses an auto-generated signature to an account
    which also uses the auto-generated signature, then the signature
    wasn't updated in the message body at all.
    
    Rather than rely on fake notifications of the GLib, do always update
    auto-generated signatures on an identity change.
    
    This had been reported downstream at:
    https://bugzilla.redhat.com/show_bug.cgi?id=1282817

 composer/e-msg-composer.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/composer/e-msg-composer.c b/composer/e-msg-composer.c
index 4a08445..c87a866 100644
--- a/composer/e-msg-composer.c
+++ b/composer/e-msg-composer.c
@@ -1621,7 +1621,7 @@ msg_composer_mail_identity_changed_cb (EMsgComposer *composer)
        gboolean smime_encrypt;
        gboolean is_message_from_edit_as_new;
        const gchar *extension_name;
-       const gchar *uid;
+       const gchar *uid, *active_signature_id;
 
        table = e_msg_composer_get_header_table (composer);
        uid = e_composer_header_table_get_identity_uid (table);
@@ -1686,6 +1686,10 @@ msg_composer_mail_identity_changed_cb (EMsgComposer *composer)
        e_mail_signature_combo_box_set_identity_uid (combo_box, uid);
 
        g_object_unref (source);
+
+       active_signature_id = gtk_combo_box_get_active_id (GTK_COMBO_BOX (combo_box));
+       if (g_strcmp0 (active_signature_id, E_MAIL_SIGNATURE_AUTOGENERATED_UID) == 0)
+               e_composer_update_signature (composer);
 }
 
 static void


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