diff options
author | Ted Gould <ted@canonical.com> | 2009-09-03 11:54:39 -0500 |
---|---|---|
committer | Ted Gould <ted@canonical.com> | 2009-09-03 11:54:39 -0500 |
commit | 299c398f84aa427600aa5a6ade9fb84ee6cf49be (patch) | |
tree | 6aeeffd19b04362ab652422e6e1cb684f322b235 /libdbusmenu-gtk | |
parent | def1cec9b003a821d1c91ae0acf1cd0a6a6a30a4 (diff) | |
download | libdbusmenu-299c398f84aa427600aa5a6ade9fb84ee6cf49be.tar.gz libdbusmenu-299c398f84aa427600aa5a6ade9fb84ee6cf49be.tar.bz2 libdbusmenu-299c398f84aa427600aa5a6ade9fb84ee6cf49be.zip |
Fixing some string checking. Truth is a bitch.
Diffstat (limited to 'libdbusmenu-gtk')
-rw-r--r-- | libdbusmenu-gtk/client.c | 9 |
1 files changed, 3 insertions, 6 deletions
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 |