summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJames Henstridge <james@jamesh.id.au>2004-10-05 03:44:52 +0000
committerJames Henstridge <jamesh@src.gnome.org>2004-10-05 03:44:52 +0000
commit45943a3b437050822cde1daa9080838e34f3275b (patch)
treea971c213df9ca3bcf8c4ff0d37211c3706ad7a63 /src
parentUpdated British English translation. (diff)
downloadzenity-45943a3b437050822cde1daa9080838e34f3275b.tar.gz
zenity-45943a3b437050822cde1daa9080838e34f3275b.tar.bz2
zenity-45943a3b437050822cde1daa9080838e34f3275b.zip
g_strdown() modifies the filename, so use strcasecmp() for the comparison
2004-10-05 James Henstridge <james@jamesh.id.au> * src/util.c (zenity_util_pixbuf_new_from_file): g_strdown() modifies the filename, so use strcasecmp() for the comparison instead. Since we are comparing against fixed ASCII strings, this should have no UTF-8 issues.
Diffstat (limited to 'src')
-rw-r--r--src/util.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/util.c b/src/util.c
index a09841e8..6e9de2a7 100644
--- a/src/util.c
+++ b/src/util.c
@@ -146,13 +146,13 @@ zenity_util_fill_file_buffer (GtkTextBuffer *buffer, const gchar *filename)
GdkPixbuf *
zenity_util_pixbuf_new_from_file (GtkWidget *widget, gchar *filename)
{
- if (!strcmp (g_strdown (filename), "warning"))
+ if (!strcasecmp (filename, "warning"))
return gtk_widget_render_icon (widget, GTK_STOCK_DIALOG_WARNING, GTK_ICON_SIZE_BUTTON, NULL);
- if (!strcmp (g_strdown (filename), "info"))
+ if (!strcasecmp (filename, "info"))
return gtk_widget_render_icon (widget, GTK_STOCK_DIALOG_INFO, GTK_ICON_SIZE_BUTTON, NULL);
- if (!strcmp (g_strdown (filename), "question"))
+ if (!strcasecmp (filename, "question"))
return gtk_widget_render_icon (widget, GTK_STOCK_DIALOG_QUESTION, GTK_ICON_SIZE_BUTTON, NULL);
- if (!strcmp (g_strdown (filename), "error"))
+ if (!strcasecmp (filename, "error"))
return gtk_widget_render_icon (widget, GTK_STOCK_DIALOG_ERROR, GTK_ICON_SIZE_BUTTON, NULL);
else
return gdk_pixbuf_new_from_file (filename, NULL);
bgstack15