[gtk+/wip/gmenu] Disconnect handlers in dispose
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/wip/gmenu] Disconnect handlers in dispose
- Date: Sat, 3 Dec 2011 22:04:22 +0000 (UTC)
commit 909d9f80d06900cacc6bcdfa82d1e9275bbb89e4
Author: Matthias Clasen <mclasen redhat com>
Date: Sat Dec 3 17:03:57 2011 -0500
Disconnect handlers in dispose
gtk/gtkapplicationwindow.c | 16 ++++++++++++++--
1 files changed, 14 insertions(+), 2 deletions(-)
---
diff --git a/gtk/gtkapplicationwindow.c b/gtk/gtkapplicationwindow.c
index c4a4d01..4a290a3 100644
--- a/gtk/gtkapplicationwindow.c
+++ b/gtk/gtkapplicationwindow.c
@@ -509,8 +509,20 @@ gtk_application_window_dispose (GObject *object)
g_clear_object (&window->priv->menubar_section);
g_clear_object (&window->priv->actions);
- G_OBJECT_CLASS (gtk_application_window_parent_class)
- ->dispose (object);
+ if (window->priv->menubar_handler)
+ {
+ g_signal_handler_disconnect (gtk_widget_get_settings (GTK_WIDGET (object)),
+ window->priv->menubar_handler);
+ window->priv->menubar_handler = 0;
+ }
+ if (window->priv->menu_handler)
+ {
+ g_signal_handler_disconnect (gtk_widget_get_settings (GTK_WIDGET (object)),
+ window->priv->menu_handler);
+ window->priv->menu_handler = 0;
+ }
+
+ G_OBJECT_CLASS (gtk_application_window_parent_class)->dispose (object);
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]