Index: src/PlaylistView.cs
===================================================================
RCS file: /cvs/gnome/banshee/src/PlaylistView.cs,v
retrieving revision 1.47
diff -u -r1.47 PlaylistView.cs
--- src/PlaylistView.cs	14 Apr 2006 15:33:43 -0000	1.47
+++ src/PlaylistView.cs	15 Apr 2006 18:07:08 -0000
@@ -58,6 +58,7 @@
             Title,
             Album,
             Genre,
+            Year,
             Time,
             Rating,
             PlayCount,
@@ -97,9 +98,12 @@
             columns.Add(new PlaylistColumn(this, Catalog.GetString("Genre"), "Genre", 
                 new TreeCellDataFunc(TrackCellGenre), new CellRendererText(),
                 4, (int)ColumnId.Genre));
-            columns.Add(new PlaylistColumn(this, Catalog.GetString("Time"), "Time", 
+            columns.Add(new PlaylistColumn(this, Catalog.GetString("Year"), "Year", 
+                new TreeCellDataFunc(TrackCellYear), new CellRendererText(),
+                5, (int)ColumnId.Year));
+           	columns.Add(new PlaylistColumn(this, Catalog.GetString("Time"), "Time", 
                 new TreeCellDataFunc(TrackCellTime), new CellRendererText(),
-                5, (int)ColumnId.Time));
+                6, (int)ColumnId.Time));
             
             RatingColumn = new PlaylistColumn(this, 
                 Catalog.GetString("Rating"), "Rating",
@@ -184,6 +188,8 @@
                 new TreeIterCompareFunc(AlbumTreeIterCompareFunc));
             model.SetSortFunc((int)ColumnId.Genre, 
                 new TreeIterCompareFunc(GenreTreeIterCompareFunc));
+            model.SetSortFunc((int)ColumnId.Year, 
+                new TreeIterCompareFunc(YearTreeIterCompareFunc));
             model.SetSortFunc((int)ColumnId.Time, 
                 new TreeIterCompareFunc(TimeTreeIterCompareFunc));
             model.SetSortFunc((int)ColumnId.Rating, 
@@ -269,6 +275,13 @@
                 model.IterTrackInfo(b).Genre);
         }
         
+        public int YearTreeIterCompareFunc(TreeModel _model, TreeIter a,
+            TreeIter b)
+        {
+            return LongFieldCompare(model.IterTrackInfo(a).Year, 
+                model.IterTrackInfo(b).Year);
+        }
+        
         public int TimeTreeIterCompareFunc(TreeModel _model, TreeIter a,
             TreeIter b)
         {
@@ -455,6 +468,18 @@
             }
             
             SetRendererAttributes((CellRendererText)cell, ti.Genre, iter);
+        }
+        
+        protected void TrackCellYear(TreeViewColumn tree_column,
+            CellRenderer cell, TreeModel tree_model, TreeIter iter)
+        {
+            TrackInfo ti = model.IterTrackInfo(iter);
+            if(ti == null) {
+                return;
+            }
+            
+            int year = ti.Year;
+            SetRendererAttributes((CellRendererText)cell, year > 0 ? Convert.ToString(year) : Catalog.GetString("N/A"), iter);
         }
         
         protected void TrackCellTime(TreeViewColumn tree_column,
