aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2010-07-20 12:58:29 -0500
committerTed Gould <ted@gould.cx>2010-07-20 12:58:29 -0500
commitae9a8d2c2fa9b657b20516737bf72dbc2be7102d (patch)
tree60c79e89013e875981971aaf1d788fb974f369c2
parent508c02c4188070e326839a3bbbf3e161592d7e4f (diff)
downloadlibdbusmenu-ae9a8d2c2fa9b657b20516737bf72dbc2be7102d.tar.gz
libdbusmenu-ae9a8d2c2fa9b657b20516737bf72dbc2be7102d.tar.bz2
libdbusmenu-ae9a8d2c2fa9b657b20516737bf72dbc2be7102d.zip
Slight optimization to not create a useless structure.
-rw-r--r--libdbusmenu-glib/client.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/libdbusmenu-glib/client.c b/libdbusmenu-glib/client.c
index b59aecd..b68c3b3 100644
--- a/libdbusmenu-glib/client.c
+++ b/libdbusmenu-glib/client.c
@@ -618,10 +618,9 @@ id_update (DBusGProxy * proxy, gint id, DbusmenuClient * client)
DbusmenuMenuitem * menuitem = dbusmenu_menuitem_find_id(priv->root, id);
g_return_if_fail(menuitem != NULL);
- gchar * properties[1] = {NULL}; /* This gets them all */
g_debug("Getting properties");
g_object_ref(menuitem);
- get_properties_globber(client, id, (const gchar **)properties, menuitem_get_properties_cb, menuitem);
+ get_properties_globber(client, id, NULL, menuitem_get_properties_cb, menuitem);
return;
}
@@ -1073,18 +1072,16 @@ parse_layout_xml(DbusmenuClient * client, xmlNodePtr node, DbusmenuMenuitem * it
propdata->item = item;
propdata->parent = parent;
- gchar * properties[1] = {NULL}; /* This gets them all */
g_object_ref(item);
- get_properties_globber(client, id, (const gchar **)properties, menuitem_get_properties_new_cb, propdata);
+ get_properties_globber(client, id, NULL, menuitem_get_properties_new_cb, propdata);
} else {
g_warning("Unable to allocate memory to get properties for menuitem. This menuitem will never be realized.");
}
} else {
/* Refresh the properties */
/* XXX: We shouldn't need to get the properties everytime we reuse an entry */
- gchar * properties[1] = {NULL}; /* This gets them all */
g_object_ref(item);
- get_properties_globber(client, id, (const gchar **)properties, menuitem_get_properties_replace_cb, item);
+ get_properties_globber(client, id, NULL, menuitem_get_properties_replace_cb, item);
}
xmlNodePtr children;