Mercurial > audlegacy
diff src/audacious/input.c @ 2645:ee5854651a96 trunk
[svn] Don't show a warning dialog when trying to add .{jpeg,jpg,txt} files.
author | js |
---|---|
date | Mon, 26 Mar 2007 09:21:40 -0700 |
parents | b3ca1bfcae6c |
children | 09b404d61ebd |
line wrap: on
line diff
--- a/src/audacious/input.c Sat Mar 24 23:25:20 2007 -0700 +++ b/src/audacious/input.c Mon Mar 26 09:21:40 2007 -0700 @@ -290,10 +290,25 @@ !gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(object)); } +static gchar *extname(const char *filename) +{ + gchar *ext = strrchr(filename, '.'); + + if (ext != NULL) { + ++ext; + return ext; + } + else return ""; +} void input_show_unplayable_files(const gchar * filename) { + if (!strcmp(extname(filename), "jpeg") || + !strcmp(extname(filename), "jpg") || + !strcmp(extname(filename), "txt")) + return; + static GtkWidget *dialog = NULL; static GtkListStore *store = NULL;