diff options
author | Albert Astals <albert.astals@canonical.com> | 2012-10-25 17:13:35 +0200 |
---|---|---|
committer | Albert Astals <albert.astals@canonical.com> | 2012-10-25 17:13:35 +0200 |
commit | c2eb33badf85c0b4550605a1c45d7040304c29bb (patch) | |
tree | 03fc5e18a1f1f767be339d96f9a3972ca6e1d7e5 | |
parent | 64ed9ef0bf0799ea025f60c3ef1f0a9c2350cdbd (diff) | |
download | libdbusmenu-c2eb33badf85c0b4550605a1c45d7040304c29bb.tar.gz libdbusmenu-c2eb33badf85c0b4550605a1c45d7040304c29bb.tar.bz2 libdbusmenu-c2eb33badf85c0b4550605a1c45d7040304c29bb.zip |
Use g_variant_compare
-rw-r--r-- | libdbusmenu-glib/client.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libdbusmenu-glib/client.c b/libdbusmenu-glib/client.c index 4ec9d3b..de3b2e8 100644 --- a/libdbusmenu-glib/client.c +++ b/libdbusmenu-glib/client.c @@ -2178,7 +2178,7 @@ parse_layout_xml(DbusmenuClient * client, GVariant * layout, DbusmenuMenuitem * g_variant_unref(child_props); old_type = dbusmenu_menuitem_property_get_variant(cs_mi, DBUSMENU_MENUITEM_PROP_TYPE); - if ((old_type == new_type) || (old_type != NULL && new_type != NULL && g_strcmp0(g_variant_get_string (old_type, NULL), g_variant_get_string (new_type, NULL)) == 0)) { + if ((old_type == new_type) || (old_type != NULL && new_type != NULL && g_variant_compare(old_type, new_type) == 0)) { // Only recycle the menu item if it's of the same type oldchildren = g_list_remove(oldchildren, cs_mi); childmi = cs_mi; |