[evolution/wip/webkit-composer: 418/966] Disconnect existing handlers when connecting the composer widget to WebKit's load-status signal.



commit e1924ec820ff02c610a358b8446fe0776560797b
Author: Tomas Popela <tpopela redhat com>
Date:   Fri Jul 12 13:51:08 2013 +0200

    Disconnect existing handlers when connecting the composer widget to WebKit's load-status signal.

 composer/e-composer-private.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/composer/e-composer-private.c b/composer/e-composer-private.c
index 2429b71..2f86ae4 100644
--- a/composer/e-composer-private.c
+++ b/composer/e-composer-private.c
@@ -1144,6 +1144,10 @@ e_composer_update_signature (EMsgComposer *composer)
        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) {
+               /* Disconnect previous handlers */
+               g_signal_handlers_disconnect_by_func (
+                       WEBKIT_WEB_VIEW (editor_widget),
+                       G_CALLBACK (composer_web_view_load_status_changed_cb), composer);
                g_signal_connect (
                        WEBKIT_WEB_VIEW(editor_widget), "notify::load-status",
                        G_CALLBACK (composer_web_view_load_status_changed_cb), composer);


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