From 4222ceb8b29f0fd45e90a3e9260bfd44accebf23 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Tue, 9 Feb 2010 14:40:54 -0600 Subject: Reffing it and pulling it into the private struct. --- libdbusmenu-glib/menuitem-proxy.c | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'libdbusmenu-glib') diff --git a/libdbusmenu-glib/menuitem-proxy.c b/libdbusmenu-glib/menuitem-proxy.c index d91ecfd..39315ae 100644 --- a/libdbusmenu-glib/menuitem-proxy.c +++ b/libdbusmenu-glib/menuitem-proxy.c @@ -167,6 +167,17 @@ handle_event (DbusmenuMenuitem * mi, const gchar * name, const GValue * value, g static void add_menuitem (DbusmenuMenuitemProxy * pmi, DbusmenuMenuitem * mi) { + /* Put it in private */ + DbusmenuMenuitemProxyPrivate * priv = DBUSMENU_MENUITEM_PROXY_GET_PRIVATE(pmi); + if (priv->mi != NULL) { + remove_menuitem(pmi); + } + priv->mi = mi; + g_object_ref(G_OBJECT(priv->mi)); + + /* Attach signals */ + + /* Go through children and wrap them */ return; } -- cgit v1.2.3