iconhelper: small code simplification

https://bugzilla.gnome.org/show_bug.cgi?id=687025
This commit is contained in:
Sébastien Wilmet 2013-01-17 14:43:35 +01:00
parent 1d410ec960
commit 2c3b9a89a9

View File

@ -413,7 +413,7 @@ _gtk_icon_helper_set_icon_name (GtkIconHelper *self,
_gtk_icon_helper_clear (self); _gtk_icon_helper_clear (self);
if (icon_name != NULL && if (icon_name != NULL &&
g_strcmp0 (icon_name, "") != 0) icon_name[0] != '\0')
{ {
self->priv->storage_type = GTK_IMAGE_ICON_NAME; self->priv->storage_type = GTK_IMAGE_ICON_NAME;
self->priv->icon_name = g_strdup (icon_name); self->priv->icon_name = g_strdup (icon_name);
@ -470,7 +470,7 @@ _gtk_icon_helper_set_stock_id (GtkIconHelper *self,
_gtk_icon_helper_clear (self); _gtk_icon_helper_clear (self);
if (stock_id != NULL && if (stock_id != NULL &&
g_strcmp0 (stock_id, "") != 0) stock_id[0] != '\0')
{ {
self->priv->storage_type = GTK_IMAGE_STOCK; self->priv->storage_type = GTK_IMAGE_STOCK;
self->priv->stock_id = g_strdup (stock_id); self->priv->stock_id = g_strdup (stock_id);