aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2010-11-15 16:20:35 -0600
committerTed Gould <ted@gould.cx>2010-11-15 16:20:35 -0600
commitab90d78d2079ac5dbdd8c6ae259e893559307246 (patch)
treecd9c25ffe97eb707084c5da10b15240f553c1050
parent1b970b18f1ef93c597ae4d079eba78340eaced20 (diff)
downloadlibdbusmenu-ab90d78d2079ac5dbdd8c6ae259e893559307246.tar.gz
libdbusmenu-ab90d78d2079ac5dbdd8c6ae259e893559307246.tar.bz2
libdbusmenu-ab90d78d2079ac5dbdd8c6ae259e893559307246.zip
Removing the lookup in the properties to see if an item should be replaced, since we're calling all of them, I don't think we want any leftovers.
-rw-r--r--libdbusmenu-glib/client.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/libdbusmenu-glib/client.c b/libdbusmenu-glib/client.c
index 18cbfce..f25ed7d 100644
--- a/libdbusmenu-glib/client.c
+++ b/libdbusmenu-glib/client.c
@@ -1116,11 +1116,11 @@ menuitem_get_properties_replace_cb (GVariant * properties, GError * error, gpoin
GList * current_props = NULL;
for (current_props = dbusmenu_menuitem_properties_list(DBUSMENU_MENUITEM(data));
- current_props != NULL ; current_props = g_list_next(current_props)) {
- if (have_error || g_hash_table_lookup(properties, current_props->data) == NULL) {
- dbusmenu_menuitem_property_remove(DBUSMENU_MENUITEM(data), (const gchar *)current_props->data);
- }
+ current_props != NULL && have_error == FALSE;
+ current_props = g_list_next(current_props)) {
+ dbusmenu_menuitem_property_remove(DBUSMENU_MENUITEM(data), (const gchar *)current_props->data);
}
+ g_list_free(current_props);
if (!have_error) {
menuitem_get_properties_cb(properties, error, data);