[gnome-applets/wip/segeiger/window-picker-in-process] windowpicker/task-title.c: Disconnect signal handlers in dispose function
- From: Sebastian Geiger <segeiger src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-applets/wip/segeiger/window-picker-in-process] windowpicker/task-title.c: Disconnect signal handlers in dispose function
- Date: Sun, 7 Jun 2015 18:36:16 +0000 (UTC)
commit cfc363eb35d010cc254b063d052f2e0cdf2bdc2d
Author: Sebastian Geiger <sbastig gmx net>
Date: Sun Jun 7 20:35:28 2015 +0200
windowpicker/task-title.c: Disconnect signal handlers in dispose function
windowpicker/src/task-title.c | 13 ++++++++++++-
1 files changed, 12 insertions(+), 1 deletions(-)
---
diff --git a/windowpicker/src/task-title.c b/windowpicker/src/task-title.c
index 242fc01..72cd8b3 100644
--- a/windowpicker/src/task-title.c
+++ b/windowpicker/src/task-title.c
@@ -405,11 +405,21 @@ task_title_setup (TaskTitle *title)
}
static void
+task_title_dispose (GObject *object) {
+ TaskTitle *title = TASK_TITLE (object);
+
+ g_signal_handlers_disconnect_by_func (title, on_active_window_changed, title);
+ g_signal_handlers_disconnect_by_func (title, on_button_press, NULL);
+ disconnect_window (title);
+
+ G_OBJECT_CLASS (task_title_parent_class)->finalize (object);
+}
+
+static void
task_title_finalize (GObject *object)
{
TaskTitle *title = TASK_TITLE (object);
- disconnect_window (title);
g_object_unref (title->priv->quit_icon);
G_OBJECT_CLASS (task_title_parent_class)->finalize (object);
@@ -443,6 +453,7 @@ task_title_class_init (TaskTitleClass *klass)
GObjectClass *obj_class = G_OBJECT_CLASS (klass);
obj_class->constructor = task_title_constructor;
+ obj_class->dispose = task_title_dispose;
obj_class->finalize = task_title_finalize;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]