banshee r3074 - in trunk/banshee: . src/Core/Banshee.Services/Banshee.Playlist src/Core/Banshee.Services/Banshee.Sources src/Core/Banshee.ThickClient/Banshee.Gui



Author: abock
Date: Tue Jan 29 01:33:37 2008
New Revision: 3074
URL: http://svn.gnome.org/viewvc/banshee?rev=3074&view=rev

Log:
2008-01-28  Aaron Bockover  <abock gnome org>

    * src/Core/Banshee.Services/Banshee.Playlist/PlayQueueSource.cs: Change
    the sort order so 'add to play queue' works as expected; override
    ConfirmRemoveTracks so a prompt does not invade your life when you
    remove from the queue

    * src/Core/Banshee.Services/Banshee.Sources/DatabaseSource.cs:
    * src/Core/Banshee.Services/Banshee.Sources/ITrackModelSource.cs:
    Added ConfirmRemoveTracks

    * src/Core/Banshee.ThickClient/Banshee.Gui/TrackActions.cs: Do not
    confirm if the source does not want you to when removing tracks



Modified:
   trunk/banshee/ChangeLog
   trunk/banshee/src/Core/Banshee.Services/Banshee.Playlist/PlayQueueSource.cs
   trunk/banshee/src/Core/Banshee.Services/Banshee.Sources/DatabaseSource.cs
   trunk/banshee/src/Core/Banshee.Services/Banshee.Sources/ITrackModelSource.cs
   trunk/banshee/src/Core/Banshee.ThickClient/Banshee.Gui/TrackActions.cs

Modified: trunk/banshee/src/Core/Banshee.Services/Banshee.Playlist/PlayQueueSource.cs
==============================================================================
--- trunk/banshee/src/Core/Banshee.Services/Banshee.Playlist/PlayQueueSource.cs	(original)
+++ trunk/banshee/src/Core/Banshee.Services/Banshee.Playlist/PlayQueueSource.cs	Tue Jan 29 01:33:37 2008
@@ -61,7 +61,7 @@
             Order = 0;
             Properties.SetString ("IconName", "audio-x-generic");
             
-            ((TrackListDatabaseModel)TrackModel).ForcedSortQuery = "CorePlaylistEntries.EntryID DESC";
+            ((TrackListDatabaseModel)TrackModel).ForcedSortQuery = "CorePlaylistEntries.EntryID ASC";
             
             ServiceManager.PlayerEngine.EventChanged += OnPlayerEngineEventChanged;
             ServiceManager.PlaybackController.Transition += OnCanonicalPlaybackControllerTransition;
@@ -138,6 +138,10 @@
         public override bool ShowBrowser {
             get { return false; }
         }
+        
+        public override bool ConfirmRemoveTracks {
+            get { return false; }
+        }
     
         // We have to use System.Data level API here since this is called inside
         // of BansheeDbFormatMigrator and thus ServiceManager.DbConnection is not

Modified: trunk/banshee/src/Core/Banshee.Services/Banshee.Sources/DatabaseSource.cs
==============================================================================
--- trunk/banshee/src/Core/Banshee.Services/Banshee.Sources/DatabaseSource.cs	(original)
+++ trunk/banshee/src/Core/Banshee.Services/Banshee.Sources/DatabaseSource.cs	Tue Jan 29 01:33:37 2008
@@ -83,6 +83,10 @@
         public virtual bool CanDeleteTracks {
             get { return true; }
         }
+        
+        public virtual bool ConfirmRemoveTracks {
+            get { return true; }
+        }
 
         public override string TrackModelPath {
             get { return DBusServiceManager.MakeObjectPath (track_model); }

Modified: trunk/banshee/src/Core/Banshee.Services/Banshee.Sources/ITrackModelSource.cs
==============================================================================
--- trunk/banshee/src/Core/Banshee.Services/Banshee.Sources/ITrackModelSource.cs	(original)
+++ trunk/banshee/src/Core/Banshee.Services/Banshee.Sources/ITrackModelSource.cs	Tue Jan 29 01:33:37 2008
@@ -48,6 +48,7 @@
 
         bool CanRemoveTracks { get; }
         bool CanDeleteTracks { get; }
+        bool ConfirmRemoveTracks { get; }
         
         bool ShowBrowser { get; }
     }

Modified: trunk/banshee/src/Core/Banshee.ThickClient/Banshee.Gui/TrackActions.cs
==============================================================================
--- trunk/banshee/src/Core/Banshee.ThickClient/Banshee.Gui/TrackActions.cs	(original)
+++ trunk/banshee/src/Core/Banshee.ThickClient/Banshee.Gui/TrackActions.cs	Tue Jan 29 01:33:37 2008
@@ -388,6 +388,10 @@
 
         private static bool ConfirmRemove (ITrackModelSource source, bool delete, int selCount)
         {
+            if (!source.ConfirmRemoveTracks) {
+                return true;
+            }
+            
             bool ret = false;
             string header = null;
             string message = null;



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