banshee r3660 - in trunk/banshee: . build src/Core/Banshee.Services src/Core/Banshee.Services/Banshee.Collection src/Core/Banshee.Services/Banshee.ServiceStack src/Core/Banshee.ThickClient/Banshee.Gui src/Core/Banshee.ThickClient/Banshee.Gui.Widgets src/Extensions/Banshee.AudioCd/Banshee.AudioCd src/Extensions/Banshee.AudioCd/ThemeIcons src/Extensions/Banshee.AudioCd/ThemeIcons/16x16 src/Extensions/Banshee.AudioCd/ThemeIcons/16x16/actions src/Extensions/Banshee.AudioCd/ThemeIcons/22x22 src/Extensions/Banshee.AudioCd/ThemeIcons/22x22/actions src/Extensions/Banshee.Lastfm src/Extensions/Banshee.Lastfm/Banshee.Lastfm.Radio src/Extensions/Banshee.Lastfm/Resources src/Extensions/Banshee.Lastfm/ThemeIcons src/Extensions/Banshee.Lastfm/ThemeIcons/22x22 src/Extensions/Banshee.Lastfm/ThemeIcons/22x22/categories src/Libraries/Hyena.Gui



Author: abock
Date: Thu Apr  3 22:27:00 2008
New Revision: 3660
URL: http://svn.gnome.org/viewvc/banshee?rev=3660&view=rev

Log:
2008-04-03  Aaron Bockover  <abock gnome org>

    * src/Core/Banshee.Services/Banshee.Collection/ImportManager.cs:
    * src/Core/Banshee.Services/Banshee.ServiceStack/UserJob.cs:
    * src/Core/Banshee.Services/Banshee.ServiceStack/TestUserJob.cs:
    * src/Core/Banshee.Services/Banshee.ServiceStack/InterfaceAction.cs:
    * src/Core/Banshee.Services/Banshee.ServiceStack/IUserJob.cs:
    * src/Core/Banshee.ThickClient/Banshee.Gui.Widgets/UserJobTile.cs:
    Removed the Name property from UserJob as it's a bit redundant and annoying

    * src/Core/Banshee.ThickClient/Banshee.Gui/PlaybackActions.cs: Set the
    IconName property instead of StockId

    * src/Core/Banshee.ThickClient/Banshee.Gui/BansheeIconFactory.cs: Removed
    a ton of legacy code to load theme and resource icons into the icon theme
    and stock icon set; support loading of a custom proper icon theme from
    disk; no more resources - much easier to maintain and properly flexible

    * src/Extensions/Banshee.Lastfm/Banshee.Lastfm.Radio/StationType.cs:
    * src/Extensions/Banshee.Lastfm/Banshee.Lastfm.Radio/LastfmSource.cs:
    * src/Extensions/Banshee.AudioCd/Banshee.AudioCd/AudioCdSource.cs: Updated
    to use theme icons

    * src/Extensions/Banshee.AudioCd/Banshee.AudioCd/AudioCdRipper.cs: Stubbed
    the user job stuff

    * build/build.rules.mk: Copy theme icons into a proper private icon theme
    that will work when running uninstalled



Added:
   trunk/banshee/src/Core/Banshee.Services/Banshee.ServiceStack/InterfaceAction.cs
   trunk/banshee/src/Extensions/Banshee.AudioCd/ThemeIcons/
   trunk/banshee/src/Extensions/Banshee.AudioCd/ThemeIcons/16x16/
   trunk/banshee/src/Extensions/Banshee.AudioCd/ThemeIcons/16x16/actions/
   trunk/banshee/src/Extensions/Banshee.AudioCd/ThemeIcons/16x16/actions/media-import-audio-cd.png   (contents, props changed)
   trunk/banshee/src/Extensions/Banshee.AudioCd/ThemeIcons/22x22/
   trunk/banshee/src/Extensions/Banshee.AudioCd/ThemeIcons/22x22/actions/
   trunk/banshee/src/Extensions/Banshee.AudioCd/ThemeIcons/22x22/actions/media-import-audio-cd.png   (contents, props changed)
   trunk/banshee/src/Extensions/Banshee.Lastfm/ThemeIcons/
   trunk/banshee/src/Extensions/Banshee.Lastfm/ThemeIcons/22x22/
   trunk/banshee/src/Extensions/Banshee.Lastfm/ThemeIcons/22x22/categories/
   trunk/banshee/src/Extensions/Banshee.Lastfm/ThemeIcons/22x22/categories/lastfm-audioscrobbler.png   (contents, props changed)
   trunk/banshee/src/Extensions/Banshee.Lastfm/ThemeIcons/22x22/categories/lastfm-neighbour.png   (contents, props changed)
   trunk/banshee/src/Extensions/Banshee.Lastfm/ThemeIcons/22x22/categories/lastfm-personal.png   (contents, props changed)
   trunk/banshee/src/Extensions/Banshee.Lastfm/ThemeIcons/22x22/categories/lastfm-recommended.png   (contents, props changed)
   trunk/banshee/src/Extensions/Banshee.Lastfm/ThemeIcons/22x22/categories/lastfm-tag.png   (contents, props changed)
Removed:
   trunk/banshee/src/Extensions/Banshee.Lastfm/Resources/audioscrobbler.png
   trunk/banshee/src/Extensions/Banshee.Lastfm/Resources/neighbour.png
   trunk/banshee/src/Extensions/Banshee.Lastfm/Resources/personal.png
   trunk/banshee/src/Extensions/Banshee.Lastfm/Resources/recommended.png
   trunk/banshee/src/Extensions/Banshee.Lastfm/Resources/tag.png
Modified:
   trunk/banshee/ChangeLog
   trunk/banshee/build/build.rules.mk
   trunk/banshee/src/Core/Banshee.Services/Banshee.Collection/ImportManager.cs
   trunk/banshee/src/Core/Banshee.Services/Banshee.ServiceStack/IUserJob.cs
   trunk/banshee/src/Core/Banshee.Services/Banshee.ServiceStack/TestUserJob.cs
   trunk/banshee/src/Core/Banshee.Services/Banshee.ServiceStack/UserJob.cs
   trunk/banshee/src/Core/Banshee.Services/Banshee.Services.mdp
   trunk/banshee/src/Core/Banshee.Services/Makefile.am
   trunk/banshee/src/Core/Banshee.ThickClient/Banshee.Gui.Widgets/UserJobTile.cs
   trunk/banshee/src/Core/Banshee.ThickClient/Banshee.Gui/BansheeIconFactory.cs
   trunk/banshee/src/Core/Banshee.ThickClient/Banshee.Gui/PlaybackActions.cs
   trunk/banshee/src/Extensions/Banshee.AudioCd/Banshee.AudioCd/AudioCdRipper.cs
   trunk/banshee/src/Extensions/Banshee.AudioCd/Banshee.AudioCd/AudioCdSource.cs
   trunk/banshee/src/Extensions/Banshee.Lastfm/Banshee.Lastfm.Radio/LastfmSource.cs
   trunk/banshee/src/Extensions/Banshee.Lastfm/Banshee.Lastfm.Radio/StationType.cs
   trunk/banshee/src/Extensions/Banshee.Lastfm/Banshee.Lastfm.mdp
   trunk/banshee/src/Extensions/Banshee.Lastfm/Makefile.am
   trunk/banshee/src/Libraries/Hyena.Gui/Hyena.Gui.mdp

Modified: trunk/banshee/build/build.rules.mk
==============================================================================
--- trunk/banshee/build/build.rules.mk	(original)
+++ trunk/banshee/build/build.rules.mk	Thu Apr  3 22:27:00 2008
@@ -5,6 +5,8 @@
 RESOURCES_BUILD = $(foreach resource, $(RESOURCES_EXPANDED), \
 	-resource:$(resource),$(notdir $(resource)))
 
+THEME_ICONS = $(wildcard $(srcdir)/ThemeIcons/*/*/*.png)
+
 ASSEMBLY_EXTENSION = $(strip $(patsubst library, dll, $(TARGET)))
 ASSEMBLY_FILE = $(top_builddir)/bin/$(ASSEMBLY).$(ASSEMBLY_EXTENSION)
 
@@ -28,6 +30,7 @@
 
 $(ASSEMBLY_FILE): $(SOURCES_BUILD) $(RESOURCES_EXPANDED) $(DEP_LINK)
 	@mkdir -p $(top_builddir)/bin
+	@(test -d $(srcdir)/ThemeIcons && mkdir -p $(top_builddir)/bin/icons/hicolor && cp -rf $(srcdir)/ThemeIcons/* $(top_builddir)/bin/icons/hicolor) || true
 	@colors=no; \
 	case $$TERM in \
 		"xterm" | "rxvt" | "rxvt-unicode") \
@@ -45,7 +48,7 @@
 		cp $(notdir $  config) $(top_builddir)/bin; \
 	fi;
 
-EXTRA_DIST = $(SOURCES_BUILD) $(RESOURCES_EXPANDED)
+EXTRA_DIST = $(SOURCES_BUILD) $(RESOURCES_EXPANDED) $(THEME_ICONS)
 
 CLEANFILES = $(OUTPUT_FILES) *.dll *.mdb *.exe
 DISTCLEANFILES = *.pidb

Modified: trunk/banshee/src/Core/Banshee.Services/Banshee.Collection/ImportManager.cs
==============================================================================
--- trunk/banshee/src/Core/Banshee.Services/Banshee.Collection/ImportManager.cs	(original)
+++ trunk/banshee/src/Core/Banshee.Services/Banshee.Collection/ImportManager.cs	Thu Apr  3 22:27:00 2008
@@ -79,7 +79,7 @@
                     return;
                 }
                 
-                user_job = new UserJob (Title, Title, Catalog.GetString ("Scanning for media"));
+                user_job = new UserJob (Title, Catalog.GetString ("Scanning for media"));
                 user_job.IconNames = new string [] { "system-search", "gtk-find" };
                 user_job.CancelMessage = CancelMessage;
                 user_job.CanCancel = true;

Modified: trunk/banshee/src/Core/Banshee.Services/Banshee.ServiceStack/IUserJob.cs
==============================================================================
--- trunk/banshee/src/Core/Banshee.Services/Banshee.ServiceStack/IUserJob.cs	(original)
+++ trunk/banshee/src/Core/Banshee.Services/Banshee.ServiceStack/IUserJob.cs	Thu Apr  3 22:27:00 2008
@@ -39,7 +39,6 @@
         
         void Cancel ();
         
-        string Name { get; }
         string Title { get; }
         string Status { get; }
         double Progress { get; }

Added: trunk/banshee/src/Core/Banshee.Services/Banshee.ServiceStack/InterfaceAction.cs
==============================================================================
--- (empty file)
+++ trunk/banshee/src/Core/Banshee.Services/Banshee.ServiceStack/InterfaceAction.cs	Thu Apr  3 22:27:00 2008
@@ -0,0 +1,39 @@
+//
+// InterfaceAction.cs
+//
+// Author:
+//   Aaron Bockover <abockover novell com>
+//
+// Copyright (C) 2008 Novell, Inc.
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+using System;
+
+namespace Banshee.ServiceStack
+{
+    public class InterfaceAction
+    {
+        public InterfaceAction ()
+        {
+        }
+    }
+}

Modified: trunk/banshee/src/Core/Banshee.Services/Banshee.ServiceStack/TestUserJob.cs
==============================================================================
--- trunk/banshee/src/Core/Banshee.Services/Banshee.ServiceStack/TestUserJob.cs	(original)
+++ trunk/banshee/src/Core/Banshee.Services/Banshee.ServiceStack/TestUserJob.cs	Thu Apr  3 22:27:00 2008
@@ -50,7 +50,7 @@
             "face-wink"
         };
         
-        public TestUserJob () : base ("Test Job", "UserJob Test Job", "Waiting for 7.5 seconds...")
+        public TestUserJob () : base ("UserJob Test Job", "Waiting for 7.5 seconds...")
         {
             DelayShow = true;
             Register ();

Modified: trunk/banshee/src/Core/Banshee.Services/Banshee.ServiceStack/UserJob.cs
==============================================================================
--- trunk/banshee/src/Core/Banshee.Services/Banshee.ServiceStack/UserJob.cs	(original)
+++ trunk/banshee/src/Core/Banshee.Services/Banshee.ServiceStack/UserJob.cs	Thu Apr  3 22:27:00 2008
@@ -35,7 +35,6 @@
 {
     public class UserJob : IUserJob
     {
-        private string name;
         private string title;
         private string status;
         private double progress;
@@ -52,18 +51,17 @@
         public event EventHandler Updated;
         public event EventHandler CancelRequested;
         
-        public UserJob (string name, string title, string status) : this (name, title, status, null)
+        public UserJob (string title, string status) : this (title, status, null)
         {
         }
 
-        public UserJob (string name) : this (name, name, null, null)
+        public UserJob (string title) : this (title, null, null)
         {
         }
 
-        public UserJob (string name, string title, string status, params string [] iconNames)
+        public UserJob (string title, string status, params string [] iconNames)
         {
             FreezeUpdate ();
-            Name = name;
             Title = title;
             Status = status;
             IconNames = iconNames;
@@ -72,8 +70,8 @@
         
         public void Register ()
         {
-            if (ServiceManager.Contains ("UserJobManager")) {
-                ServiceManager.Get<UserJobManager> ("UserJobManager").Register (this);
+            if (ServiceManager.Contains<UserJobManager> ()) {
+                ServiceManager.Get<UserJobManager> ().Register (this);
             }
         }
         
@@ -131,11 +129,6 @@
             }
         }
         
-        public virtual string Name {
-            get { return name; }
-            set { name = value; }
-        }
-        
         public virtual string Title {
             get { return title; }
             set { 

Modified: trunk/banshee/src/Core/Banshee.Services/Banshee.Services.mdp
==============================================================================
--- trunk/banshee/src/Core/Banshee.Services/Banshee.Services.mdp	(original)
+++ trunk/banshee/src/Core/Banshee.Services/Banshee.Services.mdp	Thu Apr  3 22:27:00 2008
@@ -142,6 +142,8 @@
     <File name="Banshee.Hardware/IDiscVolume.cs" subtype="Code" buildaction="Compile" />
     <File name="Banshee.Collection/MemoryTrackListModel.cs" subtype="Code" buildaction="Compile" />
     <File name="Banshee.MediaEngine/IAudioCdRipper.cs" subtype="Code" buildaction="Compile" />
+    <File name="Banshee.Collection.Database/DatabaseImportManager.cs" subtype="Code" buildaction="Compile" />
+    <File name="Banshee.ServiceStack/InterfaceAction.cs" subtype="Code" buildaction="Compile" />
   </Contents>
   <References>
     <ProjectReference type="Gac" localcopy="True" refto="System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />

Modified: trunk/banshee/src/Core/Banshee.Services/Makefile.am
==============================================================================
--- trunk/banshee/src/Core/Banshee.Services/Makefile.am	(original)
+++ trunk/banshee/src/Core/Banshee.Services/Makefile.am	Thu Apr  3 22:27:00 2008
@@ -108,6 +108,7 @@
 	Banshee.ServiceStack/IDBusExportable.cs \
 	Banshee.ServiceStack/IExtensionService.cs \
 	Banshee.ServiceStack/IInitializeService.cs \
+	Banshee.ServiceStack/InterfaceAction.cs \
 	Banshee.ServiceStack/IRequiredService.cs \
 	Banshee.ServiceStack/IService.cs \
 	Banshee.ServiceStack/IUserJob.cs \

Modified: trunk/banshee/src/Core/Banshee.ThickClient/Banshee.Gui.Widgets/UserJobTile.cs
==============================================================================
--- trunk/banshee/src/Core/Banshee.ThickClient/Banshee.Gui.Widgets/UserJobTile.cs	(original)
+++ trunk/banshee/src/Core/Banshee.ThickClient/Banshee.Gui.Widgets/UserJobTile.cs	Thu Apr  3 22:27:00 2008
@@ -128,30 +128,30 @@
             
             cancel_dialog = new Banshee.Widgets.HigMessageDialog (parent, 
                 DialogFlags.Modal, MessageType.Question, ButtonsType.None,
-                job.Name == null
+                job.Title == null
                     ? Catalog.GetString ("Stop Operation")
-                    : String.Format (Catalog.GetString ("Stop {0}"), job.Name),
+                    : String.Format (Catalog.GetString ("Stop {0}"), job.Title),
                 job.CancelMessage == null 
-                    ? (job.Name == null 
+                    ? (job.Title == null 
                         ? Catalog.GetString ("This operation is still performing work. Would you like to stop it?")
                         : String.Format (Catalog.GetString (
-                            "The '{0}' operation is still performing work. Would you like to stop it?"), job.Name))
+                            "The '{0}' operation is still performing work. Would you like to stop it?"), job.Title))
                     : job.CancelMessage);
                         
-            cancel_dialog.AddButton (job.Name == null 
+            cancel_dialog.AddButton (job.Title == null 
                 ? Catalog.GetString ("Continue")
-                : String.Format (Catalog.GetString ("Continue {0}"), job.Name), 
+                : String.Format (Catalog.GetString ("Continue {0}"), job.Title), 
                 ResponseType.No, true);
             cancel_dialog.AddButton (Stock.Stop, ResponseType.Yes, false);
             cancel_dialog.DefaultResponse = ResponseType.Cancel;
                 
-            if(cancel_dialog.Run () == (int)ResponseType.Yes) {
+            if (cancel_dialog.Run () == (int)ResponseType.Yes) {
                 if (job.CanCancel) {
                     job.Cancel ();
                 }
             }
         
-            cancel_dialog.Destroy();
+            cancel_dialog.Destroy ();
             cancel_dialog = null;
         }
         

Modified: trunk/banshee/src/Core/Banshee.ThickClient/Banshee.Gui/BansheeIconFactory.cs
==============================================================================
--- trunk/banshee/src/Core/Banshee.ThickClient/Banshee.Gui/BansheeIconFactory.cs	(original)
+++ trunk/banshee/src/Core/Banshee.ThickClient/Banshee.Gui/BansheeIconFactory.cs	Thu Apr  3 22:27:00 2008
@@ -27,137 +27,42 @@
 //
 
 using System;
+using System.IO;
 using System.Reflection;
 
 using Gtk;
-using Gdk;
 
 namespace Banshee.Gui
 {
     public class BansheeIconFactory : IconFactory
     {
-         private static string [] stock_icon_names = {
-            /* Playback Control Icons */
-            "media-skip-forward",
-            "media-skip-backward",
-            "media-playback-start",
-            "media-playback-pause",
-            "media-playback-stop",
-            "media-eject",
-            "media-repeat-all",
-            "media-repeat-none",
-            "media-repeat-single",
-            
-            /* Volume Button Icons */
-            "audio-volume-high", 
-            "audio-volume-medium",
-            "audio-volume-low", 
-            "audio-volume-muted",
-            "audio-volume-decrease",
-            "audio-volume-increase",
-
-            /* Other */
-            "cd-action-burn",
-            "cd-action-rip",
-            
-            /* Emotes */
-            "face-smile",
-            "face-sad"
-        };    
-
+        private IconTheme theme;
+        public IconTheme Theme {
+            get { return theme; }
+        }
+    
         public BansheeIconFactory ()
         {
-            AddDefault ();
-            Initialize ();
-        }
+            theme = IconTheme.Default;
         
-        public void AddResourceToIconSet (Assembly asm, string stockId, int size, 
-            IconSize iconSize, IconSet iconSet)
-        {
-            string resource_name = stockId + "-" + size.ToString () + ".png";
-            
-            if(asm.GetManifestResourceInfo (resource_name) == null) {
-                return;
+            Assembly entry_asm = Assembly.GetEntryAssembly ();
+            string icon_theme_path = Path.Combine (Path.GetDirectoryName (entry_asm.Location), "icons");
+            if (Directory.Exists (icon_theme_path)) {
+                Hyena.Log.DebugFormat ("Adding icon theme search path: {0}", icon_theme_path);
+                Theme.AppendSearchPath (icon_theme_path);
             }
             
-            IconSource source = new IconSource ();
-            source.Pixbuf = new Pixbuf (asm, resource_name);
-            source.Size = iconSize;
-            iconSet.AddSource (source);
+            AddDefault ();
         }
         
-        public void AddThemeIcon (string iconName)
+        public void Add (string name)
         {
-            StockItem item = new StockItem (iconName, null, 0, Gdk.ModifierType.ShiftMask, null);
             IconSet icon_set = new IconSet ();
+            IconSource source = new IconSource ();
+            source.IconName = name;
+            icon_set.AddSource (source);
             
-            AddThemeIconToIconSet (iconName, IconSize.Menu, icon_set);
-            AddThemeIconToIconSet (iconName, IconSize.SmallToolbar, icon_set);
-            AddThemeIconToIconSet (iconName, IconSize.Dialog, icon_set);
-            
-            Add (iconName, icon_set);
-            StockManager.Add (item);
-        }
-        
-        private void AddThemeIconToIconSet (string stockId, IconSize iconSize, IconSet iconSet)
-        {
-            try {
-                IconSource source = new IconSource ();
-                source.IconName = stockId;
-                source.Size = iconSize;
-                iconSet.AddSource (source);
-            } catch(Exception) {
-            }
-        }
-
-        private void Initialize ()
-        {
-            Assembly asm = Assembly.GetExecutingAssembly ();
-
-            foreach (string item_id in stock_icon_names) {
-                StockItem item = new StockItem (item_id, null, 0, Gdk.ModifierType.ShiftMask, null);
-                
-                IconSet icon_set = null; 
-                
-                if (IconThemeUtils.HasIcon (item.StockId)) {
-                    // map available icons from the icon theme to stock 
-                    icon_set = new IconSet ();
-                    AddThemeIconToIconSet (item.StockId, IconSize.Menu, icon_set);
-                    AddThemeIconToIconSet (item.StockId, IconSize.SmallToolbar, icon_set);
-                    AddThemeIconToIconSet (item.StockId, IconSize.Dialog, icon_set);
-                } else {
-                    // icon wasn't available in the theme, try to load it as stock from a resource file
-                    Pixbuf default_pixbuf = null;
-                    
-                    foreach (string postfix in new string [] { "", "-16", "-24", "-48" }) {
-                        string resource_name = item.StockId + postfix + ".png";
-                        if (asm.GetManifestResourceInfo (resource_name) == null) {
-                            continue;
-                        }
-                        
-                        try {
-                            default_pixbuf = new Pixbuf (asm, resource_name);
-                        } catch {
-                        }
-                    }
-                    
-                    if (default_pixbuf == null) {
-                        continue;
-                    }
-                    
-                    icon_set = new IconSet (default_pixbuf);
-                    AddResourceToIconSet (asm, item.StockId, 16, IconSize.Menu, icon_set);
-                    AddResourceToIconSet (asm, item.StockId, 24, IconSize.SmallToolbar, icon_set);
-                    AddResourceToIconSet (asm, item.StockId, 48, IconSize.Dialog, icon_set); 
-                }
-                
-                if (icon_set == null) {
-                    continue;
-                }
-                
-                Add (item.StockId, icon_set);
-                StockManager.Add (item);
-            }
+            Add (name, icon_set);
         }
     }
 }

Modified: trunk/banshee/src/Core/Banshee.ThickClient/Banshee.Gui/PlaybackActions.cs
==============================================================================
--- trunk/banshee/src/Core/Banshee.ThickClient/Banshee.Gui/PlaybackActions.cs	(original)
+++ trunk/banshee/src/Core/Banshee.ThickClient/Banshee.Gui/PlaybackActions.cs	Thu Apr  3 22:27:00 2008
@@ -58,15 +58,15 @@
             repeat_actions = new PlaybackRepeatActions (actionService);
 
             Add (new ActionEntry [] {
-                new ActionEntry ("PlayPauseAction", "media-playback-start",
+                new ActionEntry ("PlayPauseAction", null,
                     Catalog.GetString ("_Play"), "space",
                     Catalog.GetString ("Play or pause the current item"), OnPlayPauseAction),
                     
-                new ActionEntry ("NextAction", "media-skip-forward",
+                new ActionEntry ("NextAction", null,
                     Catalog.GetString ("_Next"), "N",
                     Catalog.GetString ("Play the next item"), OnNextAction),
                     
-                new ActionEntry ("PreviousAction", "media-skip-backward",
+                new ActionEntry ("PreviousAction", null,
                     Catalog.GetString ("Pre_vious"), "B",
                     Catalog.GetString ("Play the previous item"), OnPreviousAction),
 
@@ -84,7 +84,7 @@
             });
             
             Add (new ToggleActionEntry [] {
-                new ToggleActionEntry ("ShuffleAction", "media-playlist-shuffle",
+                new ToggleActionEntry ("ShuffleAction", null,
                     Catalog.GetString ("Shu_ffle"), null,
                     Catalog.GetString ("Toggle between shuffle or continuous playback modes"), 
                     OnShuffleAction, ShuffleEnabled.Get ()),
@@ -108,6 +108,11 @@
             this["RestartSongAction"].Sensitive = false;
             this["SeekToAction"].Sensitive = false;
             
+            this["PlayPauseAction"].IconName = "media-playback-start";
+            this["NextAction"].IconName = "media-skip-forward";
+            this["PreviousAction"].IconName = "media-skip-backward";
+            this["ShuffleAction"].IconName = "media-playlist-shuffle";
+            
             action_service = actionService;
             ServiceManager.PlayerEngine.StateChanged += OnPlayerEngineStateChanged;
             ServiceManager.PlayerEngine.EventChanged += OnPlayerEngineEventChanged;

Modified: trunk/banshee/src/Extensions/Banshee.AudioCd/Banshee.AudioCd/AudioCdRipper.cs
==============================================================================
--- trunk/banshee/src/Extensions/Banshee.AudioCd/Banshee.AudioCd/AudioCdRipper.cs	(original)
+++ trunk/banshee/src/Extensions/Banshee.AudioCd/Banshee.AudioCd/AudioCdRipper.cs	Thu Apr  3 22:27:00 2008
@@ -27,9 +27,11 @@
 //
 
 using System;
+using Mono.Unix;
 using Mono.Addins;
 
 using Banshee.Base;
+using Banshee.ServiceStack;
 using Banshee.Collection;
 using Banshee.MediaEngine;
 
@@ -60,7 +62,8 @@
         
         private IAudioCdRipper ripper;
         private AudioCdSource source;
-        
+        private UserJob user_job;
+         
         public AudioCdRipper (AudioCdSource source)
         {
             if (ripper_extension_node != null) {
@@ -76,6 +79,11 @@
         {
             source.LockAllTracks ();
             ripper.Begin ();
+            
+            user_job = new UserJob (Catalog.GetString ("Importing Audio CD"), Catalog.GetString ("Initializing Drive"));
+            user_job.IconNames = new string [] { "cd-action-rip" };
+            user_job.CanCancel = true;
+            user_job.Register ();
         }
     }
 }

Modified: trunk/banshee/src/Extensions/Banshee.AudioCd/Banshee.AudioCd/AudioCdSource.cs
==============================================================================
--- trunk/banshee/src/Extensions/Banshee.AudioCd/Banshee.AudioCd/AudioCdSource.cs	(original)
+++ trunk/banshee/src/Extensions/Banshee.AudioCd/Banshee.AudioCd/AudioCdSource.cs	Thu Apr  3 22:27:00 2008
@@ -296,7 +296,6 @@
 #region GUI/ThickClient
 
         private bool actions_loaded = false;
-        private static bool stock_icons_registered = false;
 
         private void SetupGui ()
         {                                       
@@ -326,16 +325,6 @@
             
             actions_loaded = true;
             
-            if (!stock_icons_registered) {
-                GtkElementsService gtk_service = ServiceManager.Get<GtkElementsService> ();
-                System.Reflection.Assembly asm = System.Reflection.Assembly.GetExecutingAssembly ();
-                Gtk.IconSet icon_set = new Gtk.IconSet ();
-                gtk_service.IconFactory.AddResourceToIconSet (asm, "cd-action-rip", 16, IconSize.Menu, icon_set);
-                gtk_service.IconFactory.AddResourceToIconSet (asm, "cd-action-rip", 22, IconSize.SmallToolbar, icon_set);
-                gtk_service.IconFactory.Add ("cd-action-rip", icon_set);
-                stock_icons_registered = true;
-            }
-            
             UpdateActions ();
         }
         
@@ -355,7 +344,7 @@
                     : title;
                 rip_action.Label = String.Format (Catalog.GetString ("Import \u201f{0}\u201d"), title);
                 rip_action.ShortLabel = Catalog.GetString ("Import CD");
-                rip_action.StockId = "cd-action-rip";
+                rip_action.IconName = "media-import-audio-cd";
                 rip_action.Sensitive = AudioCdRipper.Supported;
             }
             

Added: trunk/banshee/src/Extensions/Banshee.AudioCd/ThemeIcons/16x16/actions/media-import-audio-cd.png
==============================================================================
Binary file. No diff available.

Added: trunk/banshee/src/Extensions/Banshee.AudioCd/ThemeIcons/22x22/actions/media-import-audio-cd.png
==============================================================================
Binary file. No diff available.

Modified: trunk/banshee/src/Extensions/Banshee.Lastfm/Banshee.Lastfm.Radio/LastfmSource.cs
==============================================================================
--- trunk/banshee/src/Extensions/Banshee.Lastfm/Banshee.Lastfm.Radio/LastfmSource.cs	(original)
+++ trunk/banshee/src/Extensions/Banshee.Lastfm/Banshee.Lastfm.Radio/LastfmSource.cs	Thu Apr  3 22:27:00 2008
@@ -100,7 +100,7 @@
 
             Properties.SetString ("ActiveSourceUIResource", "ActiveSourceUI.xml");
             Properties.SetString ("GtkActionPath", "/LastfmSourcePopup");
-            Properties.SetString ("Icon.Name", "audioscrobbler");
+            Properties.SetString ("Icon.Name", "lastfm-audioscrobbler");
             Properties.SetString ("SourcePropertiesActionLabel", Catalog.GetString ("Edit Last.fm Settings"));
 
             // FIXME this is temporary until we split the GUI part from the non-GUI part

Modified: trunk/banshee/src/Extensions/Banshee.Lastfm/Banshee.Lastfm.Radio/StationType.cs
==============================================================================
--- trunk/banshee/src/Extensions/Banshee.Lastfm/Banshee.Lastfm.Radio/StationType.cs	(original)
+++ trunk/banshee/src/Extensions/Banshee.Lastfm/Banshee.Lastfm.Radio/StationType.cs	Thu Apr  3 22:27:00 2008
@@ -83,7 +83,7 @@
             Catalog.GetString ("Recommended"),
             Catalog.GetString ("For User:"),
             "user/{0}/recommended/100",
-            "recommended",
+            "lastfm-recommended",
             false
         );
 
@@ -92,7 +92,7 @@
             Catalog.GetString ("Personal"),
             Catalog.GetString ("For User:"),
             "user/{0}/personal",
-            "personal",
+            "lastfm-personal",
             false
         );
 
@@ -128,7 +128,7 @@
             Catalog.GetString ("Tag"),
             Catalog.GetString ("Tag Name:"),
             "globaltags/{0}",
-            "tag",
+            "lastfm-tag",
             false
         );
 
@@ -146,7 +146,7 @@
             Catalog.GetString ("Similar"),
             Catalog.GetString ("Similar to:"),
             "artist/{0}/similarartists",
-            "personal",
+            "lastfm-personal",
             false
         );
 

Modified: trunk/banshee/src/Extensions/Banshee.Lastfm/Banshee.Lastfm.mdp
==============================================================================
--- trunk/banshee/src/Extensions/Banshee.Lastfm/Banshee.Lastfm.mdp	(original)
+++ trunk/banshee/src/Extensions/Banshee.Lastfm/Banshee.Lastfm.mdp	Thu Apr  3 22:27:00 2008
@@ -17,16 +17,11 @@
     <File name="Banshee.Lastfm.Radio/StationType.cs" subtype="Code" buildaction="Compile" />
     <File name="Banshee.Lastfm.addin.xml" subtype="Code" buildaction="EmbedAsResource" />
     <File name="Resources/lastfm.glade" subtype="Code" buildaction="EmbedAsResource" />
-    <File name="Resources/audioscrobbler.png" subtype="Code" buildaction="EmbedAsResource" />
-    <File name="Resources/recommended.png" subtype="Code" buildaction="EmbedAsResource" />
     <File name="Resources/ActiveSourceUI.xml" subtype="Code" buildaction="EmbedAsResource" />
     <File name="Resources/GlobalUI.xml" subtype="Code" buildaction="EmbedAsResource" />
     <File name="Banshee.Lastfm.Audioscrobbler/AudioscrobblerService.cs" subtype="Code" buildaction="Compile" />
     <File name="Banshee.Lastfm.Audioscrobbler/Queue.cs" subtype="Code" buildaction="Compile" />
     <File name="Resources/AudioscrobblerMenu.xml" subtype="Code" buildaction="EmbedAsResource" />
-    <File name="Resources/neighbour.png" subtype="Code" buildaction="EmbedAsResource" />
-    <File name="Resources/personal.png" subtype="Code" buildaction="EmbedAsResource" />
-    <File name="Resources/tag.png" subtype="Code" buildaction="EmbedAsResource" />
   </Contents>
   <References>
     <ProjectReference type="Gac" localcopy="True" refto="gtk-sharp, Version=2.8.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />

Modified: trunk/banshee/src/Extensions/Banshee.Lastfm/Makefile.am
==============================================================================
--- trunk/banshee/src/Extensions/Banshee.Lastfm/Makefile.am	(original)
+++ trunk/banshee/src/Extensions/Banshee.Lastfm/Makefile.am	Thu Apr  3 22:27:00 2008
@@ -17,14 +17,9 @@
 RESOURCES =  \
 	Banshee.Lastfm.addin.xml \
 	Resources/ActiveSourceUI.xml \
-	Resources/audioscrobbler.png \
 	Resources/AudioscrobblerMenu.xml \
 	Resources/GlobalUI.xml \
-	Resources/lastfm.glade \
-	Resources/neighbour.png \
-	Resources/personal.png \
-	Resources/recommended.png \
-	Resources/tag.png
+	Resources/lastfm.glade
 
 include $(top_srcdir)/build/build.mk
 

Added: trunk/banshee/src/Extensions/Banshee.Lastfm/ThemeIcons/22x22/categories/lastfm-audioscrobbler.png
==============================================================================
Binary file. No diff available.

Added: trunk/banshee/src/Extensions/Banshee.Lastfm/ThemeIcons/22x22/categories/lastfm-neighbour.png
==============================================================================
Binary file. No diff available.

Added: trunk/banshee/src/Extensions/Banshee.Lastfm/ThemeIcons/22x22/categories/lastfm-personal.png
==============================================================================
Binary file. No diff available.

Added: trunk/banshee/src/Extensions/Banshee.Lastfm/ThemeIcons/22x22/categories/lastfm-recommended.png
==============================================================================
Binary file. No diff available.

Added: trunk/banshee/src/Extensions/Banshee.Lastfm/ThemeIcons/22x22/categories/lastfm-tag.png
==============================================================================
Binary file. No diff available.

Modified: trunk/banshee/src/Libraries/Hyena.Gui/Hyena.Gui.mdp
==============================================================================
--- trunk/banshee/src/Libraries/Hyena.Gui/Hyena.Gui.mdp	(original)
+++ trunk/banshee/src/Libraries/Hyena.Gui/Hyena.Gui.mdp	Thu Apr  3 22:27:00 2008
@@ -1,4 +1,4 @@
-<Project name="Hyena.Gui" fileversion="2.0" language="C#" clr-version="Net_2_0" UseParentDirectoryAsNamespace="True" ctype="DotNetProject">
+<Project name="Hyena.Gui" fileversion="2.0" UseParentDirectoryAsNamespace="True" language="C#" clr-version="Net_2_0" ctype="DotNetProject">
   <Configurations active="Debug">
     <Configuration name="Debug" ctype="DotNetProjectConfiguration">
       <Output directory="../../../bin" assembly="Hyena.Gui" />
@@ -73,6 +73,7 @@
     <ProjectReference type="Gac" localcopy="True" refto="Mono.Cairo, Version=2.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756" />
     <ProjectReference type="Project" localcopy="False" refto="Hyena" />
     <ProjectReference type="Gac" localcopy="True" refto="pango-sharp, Version=2.8.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />
+    <ProjectReference type="Gac" localcopy="True" refto="glib-sharp, Version=2.10.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />
   </References>
   <Deployment.LinuxDeployData generateScript="False" />
   <MonoDevelop.Autotools.MakefileInfo IntegrationEnabled="True" RelativeMakefileName="Makefile.am">



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