# HG changeset patch # User yaz # Date 1164475521 28800 # Node ID 99d652a3bf67e35ecc15aad8d6e8393e496710fc # Parent beaeb1990cb48b64b5f2b6e183e0d435b6f11c72 [svn] jump to file improvement: - case insensitive search - AND search with keywords diff -r beaeb1990cb4 -r 99d652a3bf67 ChangeLog --- a/ChangeLog Sat Nov 25 00:31:33 2006 -0800 +++ b/ChangeLog Sat Nov 25 09:25:21 2006 -0800 @@ -1,3 +1,11 @@ +2006-11-25 08:31:33 +0000 Yoshiki Yazawa + revision [3005] + - now filepopup can find newly added images immediately. + + trunk/audacious/ui_fileinfo.c | 39 +++++++++++++++++---------------------- + 1 file changed, 17 insertions(+), 22 deletions(-) + + 2006-11-24 17:49:06 +0000 Jonathan Schleifer revision [3003] Fixed wrong help, it has to be --with-rc-path. diff -r beaeb1990cb4 -r 99d652a3bf67 audacious/mainwin.c --- a/audacious/mainwin.c Sat Nov 25 00:31:33 2006 -0800 +++ b/audacious/mainwin.c Sat Nov 25 09:25:21 2006 -0800 @@ -1843,12 +1843,22 @@ mainwin_jump_to_file_match(const gchar * song, gchar ** keys) { gint i = 0; - - for (i = 0; keys[i] != NULL; i++) - if (strstr(song, keys[i])) - return TRUE; - - return FALSE; + gboolean rv = TRUE; + + while (keys[i]) { + gint len = strlen(keys[i]); + gint j = 0; + while (*(song + j)) { + if (!g_strncasecmp(song + j, keys[i], len)) + goto found; + j++; + } + rv = FALSE; + found: + i++; + } + + return rv; } /* FIXME: Clear the entry when the list gets updated */ @@ -1957,7 +1967,7 @@ * In any case the string to match should _never_ contain * something the user can't actually see in the playlist. */ - if (words[0] != NULL && strlen(words[0]) > 3) + if (words[0] != NULL) match = mainwin_jump_to_file_match(title, words); else match = TRUE;