diff options
author | Ted Gould <ted@gould.cx> | 2010-02-09 23:30:04 -0600 |
---|---|---|
committer | Ted Gould <ted@gould.cx> | 2010-02-09 23:30:04 -0600 |
commit | 20a6ad89877a6f0a4c279fdda313499e64ff8b5a (patch) | |
tree | 24b7c5fc21458085111f283a1cc269c6d8db457b | |
parent | 8b2d9eb519c695b71ca08fd4afb71b086160d8b4 (diff) | |
download | libdbusmenu-20a6ad89877a6f0a4c279fdda313499e64ff8b5a.tar.gz libdbusmenu-20a6ad89877a6f0a4c279fdda313499e64ff8b5a.tar.bz2 libdbusmenu-20a6ad89877a6f0a4c279fdda313499e64ff8b5a.zip |
Stealing (caching) all of the properties now too!
-rw-r--r-- | libdbusmenu-glib/menuitem-proxy.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/libdbusmenu-glib/menuitem-proxy.c b/libdbusmenu-glib/menuitem-proxy.c index 22d2d61..0bbfd26 100644 --- a/libdbusmenu-glib/menuitem-proxy.c +++ b/libdbusmenu-glib/menuitem-proxy.c @@ -228,6 +228,13 @@ add_menuitem (DbusmenuMenuitemProxy * pmi, DbusmenuMenuitem * mi) priv->sig_child_moved = g_signal_connect(G_OBJECT(priv->mi), DBUSMENU_MENUITEM_SIGNAL_CHILD_MOVED, G_CALLBACK(proxy_item_child_moved), pmi); /* Grab (cache) Properties */ + GList * props = dbusmenu_menuitem_properties_list(priv->mi); + GList * prop; + for (prop = props; prop != NULL; prop = g_list_next(prop)) { + gchar * prop_name = (gchar *)prop->data; + dbusmenu_menuitem_property_set_value(DBUSMENU_MENUITEM(pmi), prop_name, dbusmenu_menuitem_property_get_value(priv->mi, prop_name)); + } + g_list_free(props); /* Go through children and wrap them */ @@ -262,6 +269,8 @@ remove_menuitem (DbusmenuMenuitemProxy * pmi) g_object_unref(G_OBJECT(priv->mi)); priv->mi = NULL; + /* Remove our own children */ + return; } |