[banshee] Explain how to manually sort playlists



commit a54a6d70b49eedbe7c275948e54e910ef058f8b1
Author: Gabriel Burt <gabriel burt gmail com>
Date:   Wed Feb 3 17:04:55 2010 -0800

    Explain how to manually sort playlists
    
    If the user tries to reorder tracks in a playlist that's not in manual
    sort mode, when they drop onto the playlist, display an informational
    message explaining how to put the playlist in manual sort mode.

 .../Banshee.Collection.Gui/BaseTrackListView.cs    |   17 +++++++++++++++--
 1 files changed, 15 insertions(+), 2 deletions(-)
---
diff --git a/src/Core/Banshee.ThickClient/Banshee.Collection.Gui/BaseTrackListView.cs b/src/Core/Banshee.ThickClient/Banshee.Collection.Gui/BaseTrackListView.cs
index 7068a8a..1314e7f 100644
--- a/src/Core/Banshee.ThickClient/Banshee.Collection.Gui/BaseTrackListView.cs
+++ b/src/Core/Banshee.ThickClient/Banshee.Collection.Gui/BaseTrackListView.cs
@@ -58,11 +58,24 @@ namespace Banshee.Collection.Gui
             ForceDragSourceSet = true;
             IsEverReorderable = true;
 
-            RowActivated += delegate (object o, RowActivatedArgs<TrackInfo> args) {
+            RowActivated += (o, a) => {
                 ITrackModelSource source = ServiceManager.SourceManager.ActiveSource as ITrackModelSource;
                 if (source != null && source.TrackModel == Model) {
                     ServiceManager.PlaybackController.Source = source;
-                    ServiceManager.PlayerEngine.OpenPlay (args.RowValue);
+                    ServiceManager.PlayerEngine.OpenPlay (a.RowValue);
+                }
+            };
+
+            DragFailed += (o, a) => {
+                if (a.DragResult == DragResult.NoTarget) {
+                    PlaylistSource playlist = ServiceManager.SourceManager.ActiveSource as PlaylistSource;
+                    if (playlist != null && !IsReorderable) {
+                        Hyena.Log.Information (
+                            Catalog.GetString ("Cannot Reorder While Sorted"),
+                            Catalog.GetString ("To put the playlist in manual sort mode, click the currently sorted column header until the sort arrow goes away."),
+                            true
+                        );
+                    }
                 }
             };
         }



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