banshee r3926 - in trunk/banshee: . src/Core/Banshee.ThickClient/Banshee.Gui.Dialogs



Author: abock
Date: Sat May 17 22:18:34 2008
New Revision: 3926
URL: http://svn.gnome.org/viewvc/banshee?rev=3926&view=rev

Log:
2008-05-17  Aaron Bockover  <abock gnome org>

    * src/Core/Banshee.ThickClient/Banshee.Gui.Dialogs/TrackEditor.cs: Added
    Genre list population back to the track editor (BGO #533530)



Modified:
   trunk/banshee/ChangeLog
   trunk/banshee/src/Core/Banshee.ThickClient/Banshee.Gui.Dialogs/TrackEditor.cs

Modified: trunk/banshee/src/Core/Banshee.ThickClient/Banshee.Gui.Dialogs/TrackEditor.cs
==============================================================================
--- trunk/banshee/src/Core/Banshee.ThickClient/Banshee.Gui.Dialogs/TrackEditor.cs	(original)
+++ trunk/banshee/src/Core/Banshee.ThickClient/Banshee.Gui.Dialogs/TrackEditor.cs	Sat May 17 22:18:34 2008
@@ -29,9 +29,10 @@
 #pragma warning disable 0612
 
 using System;
+using System.Data;
+using System.Collections.Generic;
 using Gtk;
 using Glade;
-using System.Collections.Generic;
 using Mono.Unix;
 
 using Banshee.Base;
@@ -209,10 +210,14 @@
             Genre.Model = genre_model;
             Genre.TextColumn = 0;
             
-            // FIXME merge
-            /*foreach (string genre in Globals.Library.GetGenreList ()) {
-                genre_model.AppendValues (genre);            
-            }*/
+            IDataReader reader = ServiceManager.DbConnection.Query (
+                "SELECT DISTINCT Genre FROM CoreTracks ORDER BY Genre");
+            while (reader != null && reader.Read ()) {
+                string genre = reader[0] as string;
+                if (!String.IsNullOrEmpty (genre)) {
+                    genre_model.AppendValues (genre);
+                }
+            }
             
             Next.Visible = TrackSet.Count > 1;
             Previous.Visible = TrackSet.Count > 1;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]