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



commit 23cb1f89f96a38811d3284e8027802ceacfb53d9
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 c9c1f31..efb258d 100644
--- a/composer/e-composer-private.c
+++ b/composer/e-composer-private.c
@@ -1133,6 +1133,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]