? metadata/Makefile
? metadata/Makefile.in
? player/Makefile
? player/Makefile.in
Index: lib/rb-string-helpers.c
===================================================================
RCS file: /cvs/gnome/rhythmbox/lib/rb-string-helpers.c,v
retrieving revision 1.15
diff -u -p -r1.15 rb-string-helpers.c
--- lib/rb-string-helpers.c	17 Dec 2003 02:22:29 -0000	1.15
+++ lib/rb-string-helpers.c	6 Feb 2004 06:13:35 -0000
@@ -180,3 +180,33 @@ rb_get_sort_key (const char *string)
 	return collated;
 }
 
+/*
+  Produces a sort key without extraneous 'little words'.
+  Right now this is hard-wired to just drop leading "The".
+*/
+
+char *
+rb_get_sort_key_reduced (const char *string)
+{
+	static char *folded_the = NULL;
+	static size_t folded_the_len = 0;
+	char *collated, *folded, *folded_orig;
+
+	if (folded_the == NULL) {
+		folded_the = g_utf8_casefold ("the ", -1);
+		folded_the_len = strlen (folded_the);
+	}
+
+	folded_orig = g_utf8_casefold (string, -1);
+	folded = folded_orig;
+	if (! strncmp (folded, folded_the, folded_the_len)) {
+		folded += folded_the_len;
+		g_strchug (folded);
+	}
+
+	collated = g_utf8_collate_key (folded, -1);
+	g_free (folded_orig);
+
+	return collated;
+}
+
Index: lib/rb-string-helpers.h
===================================================================
RCS file: /cvs/gnome/rhythmbox/lib/rb-string-helpers.h,v
retrieving revision 1.11
diff -u -p -r1.11 rb-string-helpers.h
--- lib/rb-string-helpers.h	16 Nov 2003 16:56:42 -0000	1.11
+++ lib/rb-string-helpers.h	6 Feb 2004 06:13:35 -0000
@@ -34,6 +34,8 @@ int	rb_utf8_strncasecmp		(gconstpointer 
 
 char *	rb_get_sort_key			(const char *string);
 
+char *  rb_get_sort_key_reduced         (const char *string);
+
 G_END_DECLS
 
 #endif /* __RB_STRING_HELPERS_H */
Index: rhythmdb/rhythmdb-tree.c
===================================================================
RCS file: /cvs/gnome/rhythmbox/rhythmdb/rhythmdb-tree.c,v
retrieving revision 1.42
diff -u -p -r1.42 rhythmdb-tree.c
--- rhythmdb/rhythmdb-tree.c	4 Feb 2004 06:01:39 -0000	1.42
+++ rhythmdb/rhythmdb-tree.c	6 Feb 2004 06:13:35 -0000
@@ -985,6 +985,13 @@ get_or_create_artist (RhythmDBTree *db, 
 
 	if (G_UNLIKELY (artist == NULL)) {
 		artist = rhythmdb_tree_property_new (db, name);
+
+		/* Replace the artist sort key by a reduced sort key.
+		   This does the right thing wrt sorting artist names
+		   that begin with 'The'. */
+		g_free (artist->sort_key);
+		artist->sort_key = rb_get_sort_key_reduced (name);
+
 		artist->children = g_hash_table_new_full (g_str_hash, g_str_equal,
 							  (GDestroyNotify) g_free,
 							  NULL);
