aboutsummaryrefslogtreecommitdiff
path: root/libdbusmenu-gtk/parser.c
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2011-02-24 10:33:40 -0600
committerTed Gould <ted@gould.cx>2011-02-24 10:33:40 -0600
commit409fd25a05c9bae08330fcd0a0c1a4fb00835073 (patch)
tree17f07adcfad6b27461bfecfe5e9358181fda827d /libdbusmenu-gtk/parser.c
parentdc6b4bb04ed3af5311ca234fdb119c47228abc30 (diff)
parent233e2b72456b70ea86c163f25c08d5fa1981b42c (diff)
downloadlibdbusmenu-409fd25a05c9bae08330fcd0a0c1a4fb00835073.tar.gz
libdbusmenu-409fd25a05c9bae08330fcd0a0c1a4fb00835073.tar.bz2
libdbusmenu-409fd25a05c9bae08330fcd0a0c1a4fb00835073.zip
Track the parent inside the menuitem instead of with a data property externally.
Diffstat (limited to 'libdbusmenu-gtk/parser.c')
-rw-r--r--libdbusmenu-gtk/parser.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/libdbusmenu-gtk/parser.c b/libdbusmenu-gtk/parser.c
index a68508b..8f1286c 100644
--- a/libdbusmenu-gtk/parser.c
+++ b/libdbusmenu-gtk/parser.c
@@ -303,10 +303,6 @@ parse_menu_structure_helper (GtkWidget * widget, RecurseContext * recurse)
/* Oops, let's tell our parents about us */
if (peek == NULL) {
- /* TODO: Should we set a weak ref on the parent? */
- g_object_set_data (G_OBJECT (thisitem),
- "dbusmenu-parent",
- recurse->parent);
gint pos = get_child_position (widget);
if (pos >= 0)
dbusmenu_menuitem_child_add_position (recurse->parent,
@@ -795,7 +791,7 @@ widget_notify_cb (GtkWidget *widget,
G_CALLBACK (widget_notify_cb),
child);
- DbusmenuMenuitem *parent = g_object_get_data (G_OBJECT (child), "dbusmenu-parent");
+ DbusmenuMenuitem *parent = dbusmenu_menuitem_get_parent (child);
if (DBUSMENU_IS_MENUITEM (parent) && DBUSMENU_IS_MENUITEM (child))
{