changeset 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 67082557b2c4
children db74f7ecf22d
files ChangeLog src/audacious/build_stamp.c src/audacious/input.c
diffstat 3 files changed, 24 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Sat Mar 24 23:25:20 2007 -0700
+++ b/ChangeLog	Mon Mar 26 09:21:40 2007 -0700
@@ -1,3 +1,11 @@
+2007-03-25 06:25:20 +0000  Yoshiki Yazawa <yaz@cc.rim.or.jp>
+  revision [4310]
+  - glib-2.13.0 requires g_thread_init() to be called before all other GLib functions.
+  
+  trunk/src/audacious/main.c |   22 ++++++++++++----------
+  1 file changed, 12 insertions(+), 10 deletions(-)
+
+
 2007-03-23 17:51:02 +0000  Yoshiki Yazawa <yaz@cc.rim.or.jp>
   revision [4308]
   - rename libgnuintl.h.in to libgnuintl.h
--- a/src/audacious/build_stamp.c	Sat Mar 24 23:25:20 2007 -0700
+++ b/src/audacious/build_stamp.c	Mon Mar 26 09:21:40 2007 -0700
@@ -1,2 +1,2 @@
 #include <glib.h>
-const gchar *svn_stamp = "20070323-4308";
+const gchar *svn_stamp = "20070325-4310";
--- 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;