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
1=== modified file 'libdbusmenu-glib/client.c'
2--- libdbusmenu-glib/client.c 2011-03-23 15:48:52 +0000
3+++ libdbusmenu-glib/client.c 2011-03-25 15:52:52 +0000
4@@ -598,10 +598,10 @@
5 }
6
7 /* Callback all the folks we can find */
8- GVariant * child = g_variant_get_child_value(params, 0);
9+ GVariant * parent = g_variant_get_child_value(params, 0);
10 GVariantIter iter;
11- g_variant_iter_init(&iter, child);
12- g_variant_unref(child);
13+ g_variant_iter_init(&iter, parent);
14+ GVariant * child;
15 while ((child = g_variant_iter_next_value(&iter)) != NULL) {
16 if (g_strcmp0(g_variant_get_type_string(child), "(ia{sv})") != 0) {
17 g_warning("Properties return signature is not '(ia{sv})' it is '%s'", g_variant_get_type_string(child));
18@@ -632,6 +632,7 @@
19 g_variant_unref(properties);
20 g_variant_unref(child);
21 }
22+ g_variant_unref(parent);
23 g_variant_unref(params);
24
25 /* Provide errors for those who we can't */
26@@ -1370,7 +1371,7 @@
27 GList * current_props = dbusmenu_menuitem_properties_list(DBUSMENU_MENUITEM(data));
28 GList * tmp = NULL;
29
30- if (properties != NULL) {
31+ if (properties != NULL && have_error == FALSE) {
32 GVariantIter iter;
33 g_variant_iter_init(&iter, properties);
34 gchar * name; GVariant * value;
35@@ -1378,7 +1379,7 @@
36 /* Remove the entries from the current list that we have new
37 values for. This way we don't create signals of them being
38 removed with the duplication of the value being changed. */
39- while (g_variant_iter_loop(&iter, "{sv}", &name, &value) && have_error == FALSE) {
40+ while (g_variant_iter_loop(&iter, "{sv}", &name, &value)) {
41 for (tmp = current_props; tmp != NULL; tmp = g_list_next(tmp)) {
42 if (g_strcmp0((gchar *)tmp->data, name) == 0) {
43 current_props = g_list_delete_link(current_props, tmp);

Subscribers

People subscribed via source and target branches