banshee r3124 - in branches/banshee/stable: . src/Core/Banshee



Author: gburt
Date: Thu Jan 31 21:33:51 2008
New Revision: 3124
URL: http://svn.gnome.org/viewvc/banshee?rev=3124&view=rev

Log:
2008-01-31  Gabriel Burt  <gabriel burt gmail com>

	* src/Core/Banshee/PlayerInterface.cs: Make the 'Write CD' action
	insensitive if there are no tracks selected or if the source is a
	BurnerSource and it has no tracks.  Fixes BNC #293774.


Modified:
   branches/banshee/stable/ChangeLog
   branches/banshee/stable/src/Core/Banshee/PlayerInterface.cs

Modified: branches/banshee/stable/src/Core/Banshee/PlayerInterface.cs
==============================================================================
--- branches/banshee/stable/src/Core/Banshee/PlayerInterface.cs	(original)
+++ branches/banshee/stable/src/Core/Banshee/PlayerInterface.cs	Thu Jan 31 21:33:51 2008
@@ -1027,16 +1027,16 @@
             bool have_selection = count > 0;
             Source source = SourceManager.ActiveSource;
 
-            if(!have_selection) {
+            if(!have_selection && source != null) {
                 Globals.ActionManager.SongActions.Sensitive = false;
-                Globals.ActionManager["WriteCDAction"].Sensitive = source is Banshee.Burner.BurnerSource;
+                Globals.ActionManager["WriteCDAction"].Sensitive = (source is Banshee.Burner.BurnerSource && source.Count > 0);
                 return;
             } else if(source == null) {
                 return;
             }
             
             Globals.ActionManager.SongActions.Sensitive = true;
-            Globals.ActionManager["WriteCDAction"].Sensitive = !(source is AudioCdSource);
+            Globals.ActionManager["WriteCDAction"].Sensitive = have_selection && !(source is AudioCdSource);
             Globals.ActionManager["RemoveSongsAction"].Sensitive = !(source is AudioCdSource || source is Banshee.SmartPlaylist.SmartPlaylistSource);
             Globals.ActionManager["DeleteSongsFromDriveAction"].Sensitive = 
                 !(source is AudioCdSource || source is DapSource);



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