changeset 2819:75b12d24b7dc trunk

[svn] match the whole filename when tag isn't available, but i couldnt figure out how to do this all the time because it kept crashing...
author majeru
date Sun, 03 Jun 2007 18:03:40 -0700
parents 1252b26587ad
children 81604260bc08
files ChangeLog src/audacious/build_stamp.c src/audacious/ui_jumptotrack.c
diffstat 3 files changed, 27 insertions(+), 16 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Sun Jun 03 06:34:33 2007 -0700
+++ b/ChangeLog	Sun Jun 03 18:03:40 2007 -0700
@@ -1,3 +1,11 @@
+2007-06-03 13:34:33 +0000  
+  revision [4662]
+  * Update Japanese translation.
+  
+  trunk/po/ja.po |    8 ++++----
+  1 file changed, 4 insertions(+), 4 deletions(-)
+
+
 2007-06-01 23:02:59 +0000  Jonathan Schleifer <js@h3c.de>
   revision [4660]
   FreeBSD make doesn't support -include. Revert until it's fixed.
--- a/src/audacious/build_stamp.c	Sun Jun 03 06:34:33 2007 -0700
+++ b/src/audacious/build_stamp.c	Sun Jun 03 18:03:40 2007 -0700
@@ -1,2 +1,2 @@
 #include <glib.h>
-const gchar *svn_stamp = "20070601-4660";
+const gchar *svn_stamp = "20070603-4662";
--- a/src/audacious/ui_jumptotrack.c	Sun Jun 03 06:34:33 2007 -0700
+++ b/src/audacious/ui_jumptotrack.c	Sun Jun 03 18:03:40 2007 -0700
@@ -351,18 +351,14 @@
          playlist_glist = g_list_next(playlist_glist))
     {
         PlaylistEntry *entry = PLAYLIST_ENTRY(playlist_glist->data);
-        const gchar *title;
-        gchar *filename = NULL;
-
-        title = entry->title;
-        if (!title) {
+        const gchar *title=NULL;
+        gchar   *filename = NULL;
         filename = str_to_utf8(entry->filename);
-
-            if (strchr(filename, '/'))
-                title = strrchr(filename, '/') + 1;
-            else
+        if (entry->title)
+                title = entry->title;
+        else
                 title = filename;
-        }
+        /*we are matching all the path not just the filename or title*/
 
         /* Compare the reg.expressions to the string - if all the
            regexp in regex_list match, add to the ListStore */
@@ -376,16 +372,23 @@
          * In any case the string to match should _never_ contain
          * something the user can't actually see in the playlist.
          */
+        //g_print ("it passed\n");
         if (regex_list != NULL)
-            match = ui_jump_to_track_match(title, regex_list);
+                match = ui_jump_to_track_match(title, regex_list);
         else
-            match = TRUE;
+                match = TRUE;
 
         if (match) {
-            gtk_list_store_append(store, &iter);
-            gtk_list_store_set(store, &iter, 0, song_index + 1 , 1, title, -1);
+                if (entry->title)
+                        title = g_strdup(entry->title);
+                else if (strchr(entry->filename, '/'))
+                        title = str_to_utf8(strrchr(entry->filename, '/') + 1);
+                else
+                        title = str_to_utf8(entry->filename);
+                
+                gtk_list_store_append(store, &iter);
+                gtk_list_store_set(store, &iter, 0, song_index + 1 , 1, title, -1);
         }
-
         song_index++;
 
         if (filename) {