aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Coulson <chrisccoulson@ubuntu.com>2011-03-01 11:15:19 +0000
committerChris Coulson <chrisccoulson@ubuntu.com>2011-03-01 11:15:19 +0000
commitb678e3199d416efe0dc55d7f46c4124b673a2ae6 (patch)
tree7765f1391840b60978aa002b96dfd74a8e9c604b
parent6fd3cb9d03b1418aaf550e4069f18e0dca8c7054 (diff)
downloadlibdbusmenu-b678e3199d416efe0dc55d7f46c4124b673a2ae6.tar.gz
libdbusmenu-b678e3199d416efe0dc55d7f46c4124b673a2ae6.tar.bz2
libdbusmenu-b678e3199d416efe0dc55d7f46c4124b673a2ae6.zip
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
-rw-r--r--libdbusmenu-glib/menuitem.c9
1 files 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