Index: PlaylistView.cs
===================================================================
RCS file: /cvs/gnome/banshee/src/PlaylistView.cs,v
retrieving revision 1.36
diff -u -r1.36 PlaylistView.cs
--- PlaylistView.cs	5 Jan 2006 22:48:36 -0000	1.36
+++ PlaylistView.cs	12 Jan 2006 22:56:56 -0000
@@ -287,10 +287,21 @@
                 model.IterTrackInfo(b).LastPlayed);
         }
         
+        /* Sort by Artist, Album, Track */
         public int DefaultTreeIterCompareFunc(TreeModel _model, TreeIter a, 
             TreeIter b)
         {
-            return 0;
+        		TrackInfo tracka = model.IterTrackInfo (a);
+        		TrackInfo trackb = model.IterTrackInfo (b);
+        		
+        		int result;
+        		if ((result = StringFieldCompare (tracka.Artist, trackb.Artist)) != 0)
+				return result;
+				
+			if ((result = StringFieldCompare (tracka.Album, trackb.Album)) != 0)
+				return result;	
+			
+			return LongFieldCompare ((long) tracka.TrackNumber, (long) trackb.TrackNumber);
         }
             
         public TrackInfo IterTrackInfo(TreeIter iter)
