[gnome-builder/gnome-builder-3-20] layout: use weak unref instead of clear_weak_pointer
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder/gnome-builder-3-20] layout: use weak unref instead of clear_weak_pointer
- Date: Wed, 11 May 2016 06:50:25 +0000 (UTC)
commit 8da43ea175fe3212aa666db7a59e6eb7abb1839e
Author: Christian Hergert <chergert redhat com>
Date: Wed May 11 09:49:56 2016 +0300
layout: use weak unref instead of clear_weak_pointer
This was not a weak pointer, it was a full weak-ref callback. So we need
to use the proper weak_unref procedure.
libide/ide-layout.c | 9 ++++++++-
1 files changed, 8 insertions(+), 1 deletions(-)
---
diff --git a/libide/ide-layout.c b/libide/ide-layout.c
index 3fd16e8..b630232 100644
--- a/libide/ide-layout.c
+++ b/libide/ide-layout.c
@@ -112,7 +112,14 @@ ide_layout_hierarchy_changed (GtkWidget *widget,
{
g_signal_handler_disconnect (old_toplevel, priv->focus_handler);
priv->focus_handler = 0;
- ide_clear_weak_pointer (&priv->active_view);
+
+ if (priv->active_view)
+ {
+ g_object_weak_unref (G_OBJECT (priv->active_view),
+ (GWeakNotify)ide_layout_active_view_weak_cb,
+ self);
+ priv->active_view = NULL;
+ }
}
toplevel = gtk_widget_get_toplevel (widget);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]