[gtk+] Avoid a warning when finalizing toolbars
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] Avoid a warning when finalizing toolbars
- Date: Thu, 2 Dec 2010 04:33:58 +0000 (UTC)
commit dd678ac323b81e67bb1dea488f2123efee7e3500
Author: Matthias Clasen <mclasen redhat com>
Date: Wed Dec 1 23:32:35 2010 -0500
Avoid a warning when finalizing toolbars
Recent changes cause disposing menus to emit ::deactivate. So better
disconnect the deactivate handler first.
gtk/gtktoolbar.c | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/gtk/gtktoolbar.c b/gtk/gtktoolbar.c
index 007d039..5d914fa 100644
--- a/gtk/gtktoolbar.c
+++ b/gtk/gtktoolbar.c
@@ -3125,8 +3125,12 @@ gtk_toolbar_finalize (GObject *object)
g_timer_destroy (priv->timer);
if (priv->menu)
- gtk_widget_destroy (GTK_WIDGET (priv->menu));
-
+ {
+ g_signal_handlers_disconnect_by_func (priv->menu,
+ menu_deactivated, toolbar);
+ gtk_widget_destroy (GTK_WIDGET (priv->menu));
+ }
+
if (priv->idle_id)
g_source_remove (priv->idle_id);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]