[banshee] Hide 'Unknown Artist' in 'All Albums' browser entry



commit 25c34221e3d5e287d93f7f6a2f756d00e9973466
Author: Gabriel Burt <gabriel burt gmail com>
Date:   Mon Feb 28 11:31:49 2011 -0600

    Hide 'Unknown Artist' in 'All Albums' browser entry

 .../Banshee.Core/Banshee.Collection/AlbumInfo.cs   |    2 +-
 .../DatabaseAlbumListModel.cs                      |    8 +++++++-
 .../Banshee.Collection.Gui/DataViewChildAlbum.cs   |    1 -
 3 files changed, 8 insertions(+), 3 deletions(-)
---
diff --git a/src/Core/Banshee.Core/Banshee.Collection/AlbumInfo.cs b/src/Core/Banshee.Core/Banshee.Collection/AlbumInfo.cs
index 2f4be23..8683426 100644
--- a/src/Core/Banshee.Core/Banshee.Collection/AlbumInfo.cs
+++ b/src/Core/Banshee.Core/Banshee.Collection/AlbumInfo.cs
@@ -102,7 +102,7 @@ namespace Banshee.Collection
             }
         }
 
-        public string DisplayArtistName {
+        public virtual string DisplayArtistName {
             get { return StringUtil.MaybeFallback (ArtistName, ArtistInfo.UnknownArtistName); }
         }
 
diff --git a/src/Core/Banshee.Services/Banshee.Collection.Database/DatabaseAlbumListModel.cs b/src/Core/Banshee.Services/Banshee.Collection.Database/DatabaseAlbumListModel.cs
index 27a91ba..0705eab 100644
--- a/src/Core/Banshee.Services/Banshee.Collection.Database/DatabaseAlbumListModel.cs
+++ b/src/Core/Banshee.Services/Banshee.Collection.Database/DatabaseAlbumListModel.cs
@@ -40,11 +40,17 @@ using Banshee.Database;
 
 namespace Banshee.Collection.Database
 {
+    internal class AllAlbumInfo : AlbumInfo
+    {
+        public AllAlbumInfo () : base (null) {}
+        public override string DisplayArtistName { get { return null; } }
+    }
+
     public class DatabaseAlbumListModel : DatabaseFilterListModel<DatabaseAlbumInfo, AlbumInfo>
     {
         public DatabaseAlbumListModel (Banshee.Sources.DatabaseSource source, DatabaseTrackListModel trackModel, BansheeDbConnection connection, string uuid)
             : base (Banshee.Query.BansheeQuery.AlbumField.Name, Banshee.Query.BansheeQuery.AlbumField.Label,
-                    source, trackModel, connection, DatabaseAlbumInfo.Provider, new AlbumInfo (null), uuid)
+                    source, trackModel, connection, DatabaseAlbumInfo.Provider, new AllAlbumInfo (), uuid)
         {
             QueryFields = new QueryFieldSet (Banshee.Query.BansheeQuery.AlbumField);
             ReloadFragmentFormat = @"
diff --git a/src/Core/Banshee.ThickClient/Banshee.Collection.Gui/DataViewChildAlbum.cs b/src/Core/Banshee.ThickClient/Banshee.Collection.Gui/DataViewChildAlbum.cs
index cdd7184..afb1e4c 100644
--- a/src/Core/Banshee.ThickClient/Banshee.Collection.Gui/DataViewChildAlbum.cs
+++ b/src/Core/Banshee.ThickClient/Banshee.Collection.Gui/DataViewChildAlbum.cs
@@ -65,7 +65,6 @@ namespace Banshee.Collection.Gui
                 new TextBlock () {
                     Binder = new Hyena.Data.ObjectBinder () { Property = "DisplayArtistName" },
                     UseMarkup = true,
-                    // TODO hide for 'All Artists'
                     TextFormat = "<small>{0}</small>",
                     Opacity = 0.6
                 }



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