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



commit 233ca61041338ab7507a7de9647674a2308b3b8d
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 9a7f225..e0b561c 100644
--- a/composer/e-composer-private.c
+++ b/composer/e-composer-private.c
@@ -1146,6 +1146,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]