Merge lp:~mterry/libdbusmenu/741726 into lp:libdbusmenu/0.5

Proposed by Michael Terry
Status: Merged
Merged at revision: 284
Proposed branch: lp:~mterry/libdbusmenu/741726
Merge into: lp:libdbusmenu/0.5
Diff against target: 43 lines (+6/-5)
1 file modified
libdbusmenu-glib/client.c (+6/-5)
To merge this branch: bzr merge lp:~mterry/libdbusmenu/741726
Reviewer Review Type Date Requested Status
Mikkel Kamstrup Erlandsen (community) Approve
Review via email: mp+54882@code.launchpad.net

Description of the change

See bug for details.

To post a comment you must log in.
Revision history for this message
Mikkel Kamstrup Erlandsen (kamstrup) wrote :

 review approve

Looks good to me, and I agree with your analysis on the bug report

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'libdbusmenu-glib/client.c'
--- libdbusmenu-glib/client.c 2011-03-23 15:48:52 +0000
+++ libdbusmenu-glib/client.c 2011-03-25 15:52:52 +0000
@@ -598,10 +598,10 @@
598 }598 }
599599
600 /* Callback all the folks we can find */600 /* Callback all the folks we can find */
601 GVariant * child = g_variant_get_child_value(params, 0);601 GVariant * parent = g_variant_get_child_value(params, 0);
602 GVariantIter iter;602 GVariantIter iter;
603 g_variant_iter_init(&iter, child);603 g_variant_iter_init(&iter, parent);
604 g_variant_unref(child);604 GVariant * child;
605 while ((child = g_variant_iter_next_value(&iter)) != NULL) {605 while ((child = g_variant_iter_next_value(&iter)) != NULL) {
606 if (g_strcmp0(g_variant_get_type_string(child), "(ia{sv})") != 0) {606 if (g_strcmp0(g_variant_get_type_string(child), "(ia{sv})") != 0) {
607 g_warning("Properties return signature is not '(ia{sv})' it is '%s'", g_variant_get_type_string(child));607 g_warning("Properties return signature is not '(ia{sv})' it is '%s'", g_variant_get_type_string(child));
@@ -632,6 +632,7 @@
632 g_variant_unref(properties);632 g_variant_unref(properties);
633 g_variant_unref(child);633 g_variant_unref(child);
634 }634 }
635 g_variant_unref(parent);
635 g_variant_unref(params);636 g_variant_unref(params);
636637
637 /* Provide errors for those who we can't */638 /* Provide errors for those who we can't */
@@ -1370,7 +1371,7 @@
1370 GList * current_props = dbusmenu_menuitem_properties_list(DBUSMENU_MENUITEM(data));1371 GList * current_props = dbusmenu_menuitem_properties_list(DBUSMENU_MENUITEM(data));
1371 GList * tmp = NULL;1372 GList * tmp = NULL;
13721373
1373 if (properties != NULL) {1374 if (properties != NULL && have_error == FALSE) {
1374 GVariantIter iter;1375 GVariantIter iter;
1375 g_variant_iter_init(&iter, properties);1376 g_variant_iter_init(&iter, properties);
1376 gchar * name; GVariant * value;1377 gchar * name; GVariant * value;
@@ -1378,7 +1379,7 @@
1378 /* Remove the entries from the current list that we have new1379 /* Remove the entries from the current list that we have new
1379 values for. This way we don't create signals of them being1380 values for. This way we don't create signals of them being
1380 removed with the duplication of the value being changed. */1381 removed with the duplication of the value being changed. */
1381 while (g_variant_iter_loop(&iter, "{sv}", &name, &value) && have_error == FALSE) {1382 while (g_variant_iter_loop(&iter, "{sv}", &name, &value)) {
1382 for (tmp = current_props; tmp != NULL; tmp = g_list_next(tmp)) {1383 for (tmp = current_props; tmp != NULL; tmp = g_list_next(tmp)) {
1383 if (g_strcmp0((gchar *)tmp->data, name) == 0) {1384 if (g_strcmp0((gchar *)tmp->data, name) == 0) {
1384 current_props = g_list_delete_link(current_props, tmp);1385 current_props = g_list_delete_link(current_props, tmp);

Subscribers

People subscribed via source and target branches