[evolution/wip/webkit-composer: 696/966] Bug #689804 - [webkit-composer] Signature not auto-added



commit 661d9dd92e1622fa4caf33ee382bca194f8def30
Author: Tomas Popela <tpopela redhat com>
Date:   Tue Apr 23 10:51:53 2013 +0200

    Bug #689804 - [webkit-composer] Signature not auto-added
    
    We have to wait until the email body is loaded in WebKit.

 composer/e-composer-private.c |   15 +++++++++++++++
 1 files changed, 15 insertions(+), 0 deletions(-)
---
diff --git a/composer/e-composer-private.c b/composer/e-composer-private.c
index 24e05e9..4fc5202 100644
--- a/composer/e-composer-private.c
+++ b/composer/e-composer-private.c
@@ -1202,6 +1202,21 @@ e_composer_update_signature (EMsgComposer *composer)
                        WEBKIT_WEB_VIEW(editor_widget), "notify::load-status",
                        G_CALLBACK (composer_web_view_load_status_changed_cb), composer);
                return;
+
+       g_free (composer->priv->selected_signature_uid);
+       composer->priv->selected_signature_uid = g_strdup (signature_uid);
+
+       combo_box = e_composer_header_table_get_signature_combo_box (table);
+       editor = e_msg_composer_get_editor (composer);
+       editor_widget = e_editor_get_editor_widget (editor);
+
+       status = webkit_web_view_get_load_status (WEBKIT_WEB_VIEW (editor_widget));
+       /* If document is not loaded, we will wait for him */
+       if (status != WEBKIT_LOAD_FINISHED) {
+               g_signal_connect (
+                       WEBKIT_WEB_VIEW(editor_widget), "notify::load-status",
+                       G_CALLBACK (composer_web_view_load_status_changed_cb), composer);
+               return;
        }
 
        /* XXX Signature files should be local and therefore load quickly,


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