[banshee] [ThickClient] Fix a leftover for ReadOnly metadata



commit 47b3357b7795e928e20095a214672110d64c5146
Author: Andrés G. Aragoneses <knocte gmail com>
Date:   Mon May 31 01:24:26 2010 +0200

    [ThickClient] Fix a leftover for ReadOnly metadata
    
    One last nitpick was forgotten for implementing the feature in
    BGO#611923 completely: the ColumnCellRating.
    
    Signed-off-by: Alexander Kojevnikov <alexander kojevnikov com>

 .../DefaultColumnController.cs                     |   13 ++++++++++++-
 1 files changed, 12 insertions(+), 1 deletions(-)
---
diff --git a/src/Core/Banshee.ThickClient/Banshee.Collection.Gui/DefaultColumnController.cs b/src/Core/Banshee.ThickClient/Banshee.Collection.Gui/DefaultColumnController.cs
index f8724df..8e7e5c7 100644
--- a/src/Core/Banshee.ThickClient/Banshee.Collection.Gui/DefaultColumnController.cs
+++ b/src/Core/Banshee.ThickClient/Banshee.Collection.Gui/DefaultColumnController.cs
@@ -41,6 +41,7 @@ using Banshee.ServiceStack;
 using Banshee.MediaEngine;
 using Banshee.Collection;
 using Banshee.Query;
+using Banshee.Sources;
 
 namespace Banshee.Collection.Gui
 {
@@ -141,7 +142,8 @@ namespace Banshee.Collection.Gui
             bps_cell.TextFormat = Catalog.GetString ("{0} bits");
             bitspersample_column= Create (BansheeQuery.BitsPerSampleField, 0.10, false, bps_cell);
 
-            rating_column       = Create (BansheeQuery.RatingField, 0.15, false, new ColumnCellRating (null, true));
+            column_cell_rating  = new ColumnCellRating (null, true);
+            rating_column       = Create (BansheeQuery.RatingField, 0.15, false, column_cell_rating);
             score_column        = Create (BansheeQuery.ScoreField, 0.15, false, new ColumnCellPositiveInt (null, true, 2, 5));
             composer_column     = CreateText (BansheeQuery.ComposerField, 0.25);
             conductor_column    = CreateText (BansheeQuery.ConductorField, 0.25);
@@ -161,6 +163,13 @@ namespace Banshee.Collection.Gui
             last_played_column  = Create (BansheeQuery.LastPlayedField, 0.15, false, new ColumnCellDateTime (null, true));
             last_skipped_column = Create (BansheeQuery.LastSkippedField, 0.15, false, new ColumnCellDateTime (null, true));
             date_added_column   = Create (BansheeQuery.DateAddedField, 0.15, false, new ColumnCellDateTime (null, true));
+
+            ServiceStack.ServiceManager.SourceManager.ActiveSourceChanged += HandleActiveSourceChanged;
+        }
+
+        void HandleActiveSourceChanged (SourceEventArgs args)
+        {
+            column_cell_rating.ReadOnly = !args.Source.HasEditableTrackProperties;
         }
 
         private SortableColumn CreateText (QueryField field, double width)
@@ -187,6 +196,8 @@ namespace Banshee.Collection.Gui
             return col;
         }
 
+        private ColumnCellRating column_cell_rating;
+
 #region Column Properties
 
         private Column indicator_column;



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