From 299c398f84aa427600aa5a6ade9fb84ee6cf49be Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Thu, 3 Sep 2009 11:54:39 -0500 Subject: Fixing some string checking. Truth is a bitch. --- libdbusmenu-gtk/client.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'libdbusmenu-gtk') diff --git a/libdbusmenu-gtk/client.c b/libdbusmenu-gtk/client.c index 3733432..1106e3a 100644 --- a/libdbusmenu-gtk/client.c +++ b/libdbusmenu-gtk/client.c @@ -332,11 +332,8 @@ new_item_seperator (DbusmenuMenuitem * newitem, DbusmenuMenuitem * parent, Dbusm static void image_property_handle (DbusmenuMenuitem * item, const gchar * property, const gchar * value, gpointer userdata) { - if (g_strcmp0(property, DBUSMENU_MENUITEM_PROP_ICON) || - g_strcmp0(property, DBUSMENU_MENUITEM_PROP_ICON_DATA)) { - /* We're only looking at these two properties here */ - return; - } + /* We're only looking at these two properties here */ + g_return_if_fail(!g_strcmp0(property, DBUSMENU_MENUITEM_PROP_ICON) || !g_strcmp0(property, DBUSMENU_MENUITEM_PROP_ICON_DATA)); if (value == NULL || value[0] == '\0') { /* This means that we're unsetting a value. */ @@ -358,7 +355,7 @@ image_property_handle (DbusmenuMenuitem * item, const gchar * property, const gc GtkWidget * gtkimage = gtk_image_menu_item_get_image(GTK_IMAGE_MENU_ITEM(gimi)); /* Now figure out what to change */ - if (g_strcmp0(property, DBUSMENU_MENUITEM_PROP_ICON)) { + if (!g_strcmp0(property, DBUSMENU_MENUITEM_PROP_ICON)) { const gchar * iconname = dbusmenu_menuitem_property_get(item, property); if (iconname == NULL) { /* If there is no name, by golly we want no -- cgit v1.2.3