[gimp] app: disconnect the "add" and "remove" handlers on dialog destruction
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] app: disconnect the "add" and "remove" handlers on dialog destruction
- Date: Sun, 2 Oct 2016 18:36:41 +0000 (UTC)
commit de87b0ac68e21512a34a0201670a1e1615637aef
Author: Michael Natterer <mitch gimp org>
Date: Sun Oct 2 20:34:24 2016 +0200
app: disconnect the "add" and "remove" handlers on dialog destruction
Broke this in the last commit.
app/dialogs/quit-dialog.c | 11 +++++------
1 files changed, 5 insertions(+), 6 deletions(-)
---
diff --git a/app/dialogs/quit-dialog.c b/app/dialogs/quit-dialog.c
index fb874d8..394e9ba 100644
--- a/app/dialogs/quit-dialog.c
+++ b/app/dialogs/quit-dialog.c
@@ -270,12 +270,11 @@ quit_close_all_dialog_new (Gimp *gimp,
FALSE, FALSE, 0);
gtk_widget_show (private->hint_label);
- g_signal_connect (private->images, "add",
- G_CALLBACK (quit_close_all_dialog_container_changed),
- private);
- g_signal_connect (private->images, "remove",
- G_CALLBACK (quit_close_all_dialog_container_changed),
- private);
+ closure = g_cclosure_new (G_CALLBACK (quit_close_all_dialog_container_changed),
+ private, NULL);
+ g_object_watch_closure (G_OBJECT (private->dialog), closure);
+ g_signal_connect_closure (private->images, "add", closure, FALSE);
+ g_signal_connect_closure (private->images, "remove", closure, FALSE);
quit_close_all_dialog_container_changed (private->images, NULL,
private);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]