From c2eb33badf85c0b4550605a1c45d7040304c29bb Mon Sep 17 00:00:00 2001 From: Albert Astals Date: Thu, 25 Oct 2012 17:13:35 +0200 Subject: Use g_variant_compare --- libdbusmenu-glib/client.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libdbusmenu-glib') 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; -- cgit v1.2.3