[evolution/wip/webkit-composer: 267/372] Disconnect signals properly when disposing the EEditorWidget



commit 89f799d558a3abc5a543a8a4784d9c2ea92ff696
Author: Tomas Popela <tpopela redhat com>
Date:   Fri Jun 21 12:20:44 2013 +0200

    Disconnect signals properly when disposing the EEditorWidget

 e-util/e-editor-widget.c |   16 ++++++++++++++++
 1 files changed, 16 insertions(+), 0 deletions(-)
---
diff --git a/e-util/e-editor-widget.c b/e-util/e-editor-widget.c
index 74aefbc..d620af4 100644
--- a/e-util/e-editor-widget.c
+++ b/e-util/e-editor-widget.c
@@ -755,6 +755,22 @@ editor_widget_dispose (GObject *object)
 
        g_clear_object (&priv->selection);
 
+       if (priv->aliasing_settings != NULL) {
+               g_signal_handlers_disconnect_matched (
+                       priv->aliasing_settings, G_SIGNAL_MATCH_DATA,
+                       0, 0, NULL, NULL, object);
+               g_object_unref (priv->aliasing_settings);
+               priv->aliasing_settings = NULL;
+       }
+
+       if (priv->font_settings != NULL) {
+               g_signal_handlers_disconnect_matched (
+                       priv->font_settings, G_SIGNAL_MATCH_DATA,
+                       0, 0, NULL, NULL, object);
+               g_object_unref (priv->font_settings);
+               priv->font_settings = NULL;
+       }
+
        /* Chain up to parent's dispose() method. */
        G_OBJECT_CLASS (e_editor_widget_parent_class)->dispose (object);
 }


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