Author: jwilcox
Date: 2006-09-11 18:52:47 -0400 (Mon, 11 Sep 2006)
New Revision: 65257
Modified:
trunk/ipod-sharp/ChangeLog
trunk/ipod-sharp/src/Device.cs
trunk/ipod-sharp/src/TrackDatabase.cs
Log:
2006-09-11 James Willcox <[EMAIL PROTECTED]>
* src/Device.cs: use the 'library' playlist name as the device name
and remove a bunch of dead code
Modified: trunk/ipod-sharp/ChangeLog
===================================================================
--- trunk/ipod-sharp/ChangeLog 2006-09-11 22:45:30 UTC (rev 65256)
+++ trunk/ipod-sharp/ChangeLog 2006-09-11 22:52:47 UTC (rev 65257)
@@ -1,3 +1,8 @@
+2006-09-11 James Willcox <[EMAIL PROTECTED]>
+
+ * src/Device.cs: use the 'library' playlist name as the device name
+ and remove a bunch of dead code
+
2006-07-19 James Willcox <[EMAIL PROTECTED]>
* src/TrackDatabase.cs: bump the max supported database version to 18
Modified: trunk/ipod-sharp/src/Device.cs
===================================================================
--- trunk/ipod-sharp/src/Device.cs 2006-09-11 22:45:30 UTC (rev 65256)
+++ trunk/ipod-sharp/src/Device.cs 2006-09-11 22:52:47 UTC (rev 65257)
@@ -210,9 +210,9 @@
public string Name {
get {
- return (string) GetProperty ("device-name").Val;
+ return TrackDatabase.Name;
} set {
- SetProperty ("device-name", new GLib.Value (value));
+ TrackDatabase.Name = value;
EmitChanged ();
}
}
@@ -259,40 +259,6 @@
}
}
- /*
- IntPtr array = (IntPtr) GetProperty ("artwork-formats").Val;
-
- if (array == IntPtr.Zero) {
- return new ArtworkFormat[0];
- }
-
- ArrayList list = new ArrayList ();
- int offset = 0;
-
- while (true) {
- int type = Marshal.ReadInt32 (array, offset);
- offset += 4;
-
- if (type == -1)
- break;
-
- short width = Marshal.ReadInt16 (array, offset);
- offset += 2;
-
- short height = Marshal.ReadInt16 (array, offset);
- offset += 2;
-
- short correlationId = Marshal.ReadInt16 (array, offset);
- offset += 2;
-
- offset += 2; // two bytes of padding after the struct; if
you read it, it's always 0xffff
-
- list.Add (new ArtworkFormat ((ArtworkType) type, width,
height, correlationId));
- }
-
- return (ArtworkFormat[]) list.ToArray (typeof (ArtworkFormat));
- */
-
public Equalizer[] Equalizers {
get {
if (equalizers == null)
Modified: trunk/ipod-sharp/src/TrackDatabase.cs
===================================================================
--- trunk/ipod-sharp/src/TrackDatabase.cs 2006-09-11 22:45:30 UTC (rev
65256)
+++ trunk/ipod-sharp/src/TrackDatabase.cs 2006-09-11 22:52:47 UTC (rev
65257)
@@ -1561,6 +1561,20 @@
get { return ControlPath + "iTunes/Play Counts"; }
}
+ internal string Name {
+ get {
+ if (dbrec == null)
+ return null;
+
+ return dbrec[DataSetIndex.Playlist].Library.PlaylistName;
+ } set {
+ if (dbrec == null)
+ return;
+
+ dbrec[DataSetIndex.Playlist].Library.PlaylistName = value;
+ }
+ }
+
public Device Device {
get { return device; }
}
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches