diff options
author | Ted Gould <ted@gould.cx> | 2011-03-21 11:54:49 -0500 |
---|---|---|
committer | Ted Gould <ted@gould.cx> | 2011-03-21 11:54:49 -0500 |
commit | b0889bb2cb63e1dd08b87e3c45a1e12fb237a6c2 (patch) | |
tree | 64a7282ec0394d68a70d193e9e48688ef6525b46 /libdbusmenu-glib | |
parent | 9f73955ad07742884819edb0da91d6f71e5bb310 (diff) | |
download | libdbusmenu-b0889bb2cb63e1dd08b87e3c45a1e12fb237a6c2.tar.gz libdbusmenu-b0889bb2cb63e1dd08b87e3c45a1e12fb237a6c2.tar.bz2 libdbusmenu-b0889bb2cb63e1dd08b87e3c45a1e12fb237a6c2.zip |
Moving from iter_next to iter_loop on a couple more iterators
Diffstat (limited to 'libdbusmenu-glib')
-rw-r--r-- | libdbusmenu-glib/client.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/libdbusmenu-glib/client.c b/libdbusmenu-glib/client.c index 77154fb..ff74bbf 100644 --- a/libdbusmenu-glib/client.c +++ b/libdbusmenu-glib/client.c @@ -1153,7 +1153,7 @@ menuproxy_prop_changed_cb (GDBusProxy * proxy, GVariant * properties, GStrv inva GVariantIter iters; gchar * key; GVariant * value; g_variant_iter_init(&iters, properties); - while (g_variant_iter_next(&iters, "{sv}", &key, &value)) { + while (g_variant_iter_loop(&iters, "{sv}", &key, &value)) { if (g_strcmp0(key, "TextDirection") == 0) { if (g_variant_is_of_type(value, G_VARIANT_TYPE_VARIANT)) { GVariant * tmp = g_variant_get_variant(value); @@ -1181,9 +1181,6 @@ menuproxy_prop_changed_cb (GDBusProxy * proxy, GVariant * properties, GStrv inva priv->icon_dirs = g_variant_dup_strv(value, NULL); dirs_changed = TRUE; } - - g_variant_unref(value); - g_free(key); } if (olddir != priv->text_direction) { @@ -1258,10 +1255,9 @@ menuproxy_signal_cb (GDBusProxy * proxy, gchar * sender, gchar * signal, GVarian g_variant_iter_init(&properties, propv); gchar * property; - while (g_variant_iter_next(&properties, "s", &property)) { + while (g_variant_iter_loop(&properties, "s", &property)) { /* g_debug("Removing property '%s' on %d", property, id); */ dbusmenu_menuitem_property_remove(menuitem, property); - g_free(property); } g_variant_unref(ritem); g_variant_unref(propv); |