banshee r3134 - in branches/banshee/stable: . src/Core/Banshee.Base/Dap src/Dap/Banshee.Dap.Mtp
- From: gburt svn gnome org
- To: svn-commits-list gnome org
- Subject: banshee r3134 - in branches/banshee/stable: . src/Core/Banshee.Base/Dap src/Dap/Banshee.Dap.Mtp
- Date: Fri, 1 Feb 2008 20:46:47 +0000 (GMT)
Author: gburt
Date: Fri Feb 1 20:46:47 2008
New Revision: 3134
URL: http://svn.gnome.org/viewvc/banshee?rev=3134&view=rev
Log:
2008-02-01 Gabriel Burt <gabriel burt gmail com>
* src/Core/Banshee.Base/Dap/Dap.cs:
* src/Dap/Banshee.Dap.Mtp/MtpDap.cs:
* src/Dap/Banshee.Dap.Mtp/MtpDapTrackInfo.cs: Revert accidental commit.
Modified:
branches/banshee/stable/ChangeLog
branches/banshee/stable/src/Core/Banshee.Base/Dap/Dap.cs
branches/banshee/stable/src/Dap/Banshee.Dap.Mtp/MtpDap.cs
branches/banshee/stable/src/Dap/Banshee.Dap.Mtp/MtpDapTrackInfo.cs
Modified: branches/banshee/stable/src/Core/Banshee.Base/Dap/Dap.cs
==============================================================================
--- branches/banshee/stable/src/Core/Banshee.Base/Dap/Dap.cs (original)
+++ branches/banshee/stable/src/Core/Banshee.Base/Dap/Dap.cs Fri Feb 1 20:46:47 2008
@@ -705,7 +705,7 @@
return uuid;
}
}
-
+
public abstract void Synchronize();
public abstract string Name { get; }
public abstract ulong StorageCapacity { get; }
Modified: branches/banshee/stable/src/Dap/Banshee.Dap.Mtp/MtpDap.cs
==============================================================================
--- branches/banshee/stable/src/Dap/Banshee.Dap.Mtp/MtpDap.cs (original)
+++ branches/banshee/stable/src/Dap/Banshee.Dap.Mtp/MtpDap.cs Fri Feb 1 20:46:47 2008
@@ -575,48 +575,11 @@
Import (tracks, null);
}
- private Dictionary<int, Gdk.Pixbuf> icon_cache = new Dictionary<int, Gdk.Pixbuf>(2);
- const string icon_prefix = "multimedia-player-";
- public override Gdk.Pixbuf GetIcon (int size)
+ string icon_name = "multimedia-player-dell-pocket-dj";
+ public override Gdk.Pixbuf GetIcon (int size)
{
- if (icon_cache.ContainsKey(size))
- return icon_cache[size];
-
- Gdk.Pixbuf icon = null;
- string icon_id = IconId;
-
- Console.WriteLine ("have icon id = {0}, getting size = {1}", icon_id, size);
-
- if (icon_id != null && IconThemeUtils.HasIcon (icon_prefix + icon_id))
- icon = IconThemeUtils.LoadIcon (icon_prefix + icon_id, size);
- else
- icon = base.GetIcon (size);
-
- icon_cache.Add(size, icon);
- return icon;
- }
-
- private string icon_id = null;
- public string IconId {
- get {
- if (icon_id == null) {
- string product = hal_device.Parent["info.product"];
- string vendor = hal_device.Parent["info.vendor"];
- // Hack to get around Creative devices having Creative in the product name already
- if (vendor.Contains ("Creative")) {
- vendor = null;
- }
- if (vendor != null && vendor != String.Empty && product != null && product != String.Empty)
- icon_id = (vendor.Trim () + "-" + product.Trim ()).Replace (' ', '-').ToLower ();
- else if (product != null && product != String.Empty)
- icon_id = (product.Trim ()).Replace (' ', '-').ToLower ();
- }
-
- return icon_id;
- }
- }
-
-
+ return IconThemeUtils.HasIcon (icon_name) ? IconThemeUtils.LoadIcon (icon_name, size) : base.GetIcon (size);
+ }
/*
public DapPlaylistSource AddPlaylist (Source playlist)
{
Modified: branches/banshee/stable/src/Dap/Banshee.Dap.Mtp/MtpDapTrackInfo.cs
==============================================================================
--- branches/banshee/stable/src/Dap/Banshee.Dap.Mtp/MtpDapTrackInfo.cs (original)
+++ branches/banshee/stable/src/Dap/Banshee.Dap.Mtp/MtpDapTrackInfo.cs Fri Feb 1 20:46:47 2008
@@ -68,10 +68,7 @@
NeedSync = false;
// Set a URI even though it's not actually accessible through normal API's.
- //uri = new SafeUri(String.Format ("mtp://{0}", file.Filename));
- Uri = new SafeUri (
- Globals.Library.CachedLocation + Path.DirectorySeparatorChar + FileNamePattern.CreateFromTrackInfo(this)
- );
+ uri = new SafeUri(String.Format ("mtp://{0}", file.Filename));
}
public override bool Equals (object o)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]