[gimp] app: oops, need to disconnect from the device list signals in dispose()
- From: Michael Natterer <mitch src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gimp] app: oops, need to disconnect from the device list signals in dispose()
- Date: Mon, 15 Feb 2010 12:13:18 +0000 (UTC)
commit 55c8c86e49f284f7636bcbb0abc33da70ef0cb5e
Author: Michael Natterer <mitch gimp org>
Date: Mon Feb 15 13:11:58 2010 +0100
app: oops, need to disconnect from the device list signals in dispose()
app/widgets/gimpdeviceeditor.c | 19 +++++++++++++++++++
1 files changed, 19 insertions(+), 0 deletions(-)
---
diff --git a/app/widgets/gimpdeviceeditor.c b/app/widgets/gimpdeviceeditor.c
index e651e11..32af3f9 100644
--- a/app/widgets/gimpdeviceeditor.c
+++ b/app/widgets/gimpdeviceeditor.c
@@ -72,6 +72,7 @@ struct _GimpDeviceEditorPrivate
static GObject * gimp_device_editor_constructor (GType type,
guint n_params,
GObjectConstructParam *params);
+static void gimp_device_editor_dispose (GObject *object);
static void gimp_device_editor_set_property (GObject *object,
guint property_id,
const GValue *value,
@@ -108,6 +109,7 @@ gimp_device_editor_class_init (GimpDeviceEditorClass *klass)
GObjectClass *object_class = G_OBJECT_CLASS (klass);
object_class->constructor = gimp_device_editor_constructor;
+ object_class->dispose = gimp_device_editor_dispose;
object_class->set_property = gimp_device_editor_set_property;
object_class->get_property = gimp_device_editor_get_property;
@@ -240,6 +242,23 @@ gimp_device_editor_constructor (GType type,
}
static void
+gimp_device_editor_dispose (GObject *object)
+{
+ GimpDeviceEditorPrivate *private = GIMP_DEVICE_EDITOR_GET_PRIVATE (object);
+ GimpContainer *devices = gimp_devices_get_list (private->gimp);
+
+ g_signal_handlers_disconnect_by_func (devices,
+ gimp_device_editor_add_device,
+ object);
+
+ g_signal_handlers_disconnect_by_func (devices,
+ gimp_device_editor_remove_device,
+ object);
+
+ G_OBJECT_CLASS (parent_class)->dispose (object);
+}
+
+static void
gimp_device_editor_set_property (GObject *object,
guint property_id,
const GValue *value,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]