From b678e3199d416efe0dc55d7f46c4124b673a2ae6 Mon Sep 17 00:00:00 2001 From: Chris Coulson Date: Tue, 1 Mar 2011 11:15:19 +0000 Subject: The last commit causes the warning in dbusmenu_menuitem_property_is_default to be thrown when removing a property that has no default value. This warning seems bogus though, as any property that is not in the menuitems local property list is a default value (as that is what dbusmenu_menuitem_property_get* will return). Simplify this function to work like this and drop the warning --- libdbusmenu-glib/menuitem.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/libdbusmenu-glib/menuitem.c b/libdbusmenu-glib/menuitem.c index 61e59c3..855f4ee 100644 --- a/libdbusmenu-glib/menuitem.c +++ b/libdbusmenu-glib/menuitem.c @@ -1752,13 +1752,8 @@ dbusmenu_menuitem_property_is_default (DbusmenuMenuitem * mi, const gchar * prop return FALSE; } - currentval = dbusmenu_defaults_default_get(priv->defaults, menuitem_get_type(mi), property); - if (currentval != NULL) { - return TRUE; - } - - g_warn_if_reached(); - return FALSE; + /* If we haven't stored it locally, then it's the default */ + return TRUE; } /* Check to see if this menu item has been sent into the bus yet or -- cgit v1.2.3