banshee r4459 - in trunk/banshee: . src/Dap/Banshee.Dap.Ipod/Banshee.Dap.Ipod src/Dap/Banshee.Dap.Mtp src/Dap/Banshee.Dap.Mtp/Banshee.Dap.Mtp src/Dap/Banshee.Dap/Banshee.Dap src/Dap/Banshee.Dap/Banshee.Dap.Gui



Author: gburt
Date: Thu Sep  4 00:22:41 2008
New Revision: 4459
URL: http://svn.gnome.org/viewvc/banshee?rev=4459&view=rev

Log:
2008-09-03  Gabriel Burt  <gabriel burt gmail com>

	* src/Dap/Banshee.Dap.Ipod/Banshee.Dap.Ipod/IpodSource.cs:
	* src/Dap/Banshee.Dap.Mtp/Banshee.Dap.Mtp/MtpSource.cs: Add more
	properties that show up in the properties dialog.

	* src/Dap/Banshee.Dap.Mtp/Banshee.Dap.Mtp.csproj: Reference Mtp.

	* src/Dap/Banshee.Dap/Banshee.Dap/DapSync.cs: Fix typo.

	* src/Dap/Banshee.Dap/Banshee.Dap.Gui/DapContent.cs: Subclass from
	DapPropertiesDiaplay and pack in the LargeIcon.



Modified:
   trunk/banshee/ChangeLog
   trunk/banshee/src/Dap/Banshee.Dap.Ipod/Banshee.Dap.Ipod/IpodSource.cs
   trunk/banshee/src/Dap/Banshee.Dap.Mtp/Banshee.Dap.Mtp.csproj
   trunk/banshee/src/Dap/Banshee.Dap.Mtp/Banshee.Dap.Mtp/MtpSource.cs
   trunk/banshee/src/Dap/Banshee.Dap/Banshee.Dap.Gui/DapContent.cs
   trunk/banshee/src/Dap/Banshee.Dap/Banshee.Dap/DapSync.cs

Modified: trunk/banshee/src/Dap/Banshee.Dap.Ipod/Banshee.Dap.Ipod/IpodSource.cs
==============================================================================
--- trunk/banshee/src/Dap/Banshee.Dap.Ipod/Banshee.Dap.Ipod/IpodSource.cs	(original)
+++ trunk/banshee/src/Dap/Banshee.Dap.Ipod/Banshee.Dap.Ipod/IpodSource.cs	Thu Sep  4 00:22:41 2008
@@ -84,8 +84,11 @@
 
             Initialize ();
 
+            AddDapProperty (Catalog.GetString ("Device"), ipod_device.ModelInfo.DeviceClass);
             AddDapProperty (Catalog.GetString ("Color"), ipod_device.ModelInfo.ShellColor);
             AddDapProperty (Catalog.GetString ("Generation"), ipod_device.ModelInfo.Generation.ToString ());
+            AddDapProperty (Catalog.GetString ("Capacity"), ipod_device.ModelInfo.AdvertisedCapacity);
+            AddDapProperty (Catalog.GetString ("Serial number"), ipod_device.Serial);
             AddDapProperty (Catalog.GetString ("Produced on"), ipod_device.ProductionInfo.DisplayDate);
             AddDapProperty (Catalog.GetString ("Firmware"), ipod_device.FirmwareVersion);
 

Modified: trunk/banshee/src/Dap/Banshee.Dap.Mtp/Banshee.Dap.Mtp.csproj
==============================================================================
--- trunk/banshee/src/Dap/Banshee.Dap.Mtp/Banshee.Dap.Mtp.csproj	(original)
+++ trunk/banshee/src/Dap/Banshee.Dap.Mtp/Banshee.Dap.Mtp.csproj	Thu Sep  4 00:22:41 2008
@@ -35,6 +35,10 @@
       <Project>{BC2E94DF-7A82-461E-BE7C-60E41ADC3562}</Project>
       <Name>Banshee.Dap</Name>
     </ProjectReference>
+    <ProjectReference Include="..\..\Libraries\Mtp\Mtp.csproj">
+      <Project>{0DF72691-E61C-4E9C-A1F1-2F7F17958630}</Project>
+      <Name>Mtp</Name>
+    </ProjectReference>
   </ItemGroup>
   <ItemGroup>
     <Compile Include="Banshee.Dap.Mtp\MtpSource.cs" />
@@ -46,7 +50,8 @@
   <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
   <ProjectExtensions>
     <MonoDevelop>
-      <Properties xmlns="">
+      <Properties>
+        <GtkDesignInfo gtkVersion="2.12.1" />
         <MonoDevelop.Autotools.MakefileInfo IntegrationEnabled="true" RelativeMakefileName="./Makefile.am">
           <BuildFilesVar Sync="true" Name="SOURCES" />
           <DeployFilesVar />

Modified: trunk/banshee/src/Dap/Banshee.Dap.Mtp/Banshee.Dap.Mtp/MtpSource.cs
==============================================================================
--- trunk/banshee/src/Dap/Banshee.Dap.Mtp/Banshee.Dap.Mtp/MtpSource.cs	(original)
+++ trunk/banshee/src/Dap/Banshee.Dap.Mtp/Banshee.Dap.Mtp/MtpSource.cs	Thu Sep  4 00:22:41 2008
@@ -138,6 +138,10 @@
                 }
             }
             AcceptableMimeTypes = mimetypes.ToArray ();
+
+            AddDapProperty (Catalog.GetString ("Serial number"), mtp_device.SerialNumber);
+            AddDapProperty (Catalog.GetString ("Version"), mtp_device.Version);
+            AddDapProperty (Catalog.GetString ("Battery level"), String.Format ("{0:0%}", mtp_device.BatteryLevel/100.0));
         }
 
         protected override void LoadFromDevice ()

Modified: trunk/banshee/src/Dap/Banshee.Dap/Banshee.Dap.Gui/DapContent.cs
==============================================================================
--- trunk/banshee/src/Dap/Banshee.Dap/Banshee.Dap.Gui/DapContent.cs	(original)
+++ trunk/banshee/src/Dap/Banshee.Dap/Banshee.Dap.Gui/DapContent.cs	Thu Sep  4 00:22:41 2008
@@ -39,16 +39,15 @@
 
 namespace Banshee.Dap.Gui
 {
-    public class DapContent : ISourceContents
+    public class DapContent : DapPropertiesDisplay
     {
         private DapSource dap;
         private DapActions actions;
 
-        private RoundedFrame frame;
         private VBox vbox;
         private WrapLabel dap_stats;
 
-        public DapContent (DapSource source)
+        public DapContent (DapSource source) : base (source)
         {
             dap = source;
             BuildWidgets ();
@@ -57,14 +56,18 @@
 
         private void BuildWidgets ()
         {
-            frame = new RoundedFrame ();
             vbox = new VBox ();
-            frame.Add (vbox);
+            Add (vbox);
 
+            HBox header_box = new HBox ();
+            header_box.PackStart (new Image (LargeIcon), false, false, 0);
+            
             Label title = new Label ();
             title.Markup = String.Format ("<span size=\"x-large\" weight=\"bold\">{0}</span>", dap.Name);
             title.Xalign = 0f;
-            vbox.PackStart (title, false, false, 0);
+            header_box.PackStart (title, false, false, 0);
+            
+            vbox.PackStart (header_box, false, false, 0);
             
             vbox.PackStart (new Banshee.Preferences.Gui.NotebookPage (dap.Preferences), false, false, 0);
 
@@ -75,7 +78,7 @@
             dap_stats.Text = dap.Sync.ToString ();
             vbox.PackStart (dap_stats, false, false, 0);
             
-            frame.ShowAll ();
+            ShowAll ();
         }
 
         private void BuildActions ()
@@ -83,27 +86,5 @@
             actions = new DapActions (dap);
             dap.Properties.Set<Banshee.Gui.BansheeActionGroup> ("ActiveSourceActions", actions);
         }
-
-        #region ISourceContents implementation 
-        
-        public bool SetSource (Banshee.Sources.ISource source)
-        {
-            return (source == this.dap);
-        }
-        
-        public void ResetSource ()
-        {
-        }
-        
-        public Banshee.Sources.ISource Source {
-            get { return dap; }
-        }
-        
-        public Gtk.Widget Widget {
-            get { return frame; }
-        }
-        
-        #endregion 
-        
     }
 }

Modified: trunk/banshee/src/Dap/Banshee.Dap/Banshee.Dap/DapSync.cs
==============================================================================
--- trunk/banshee/src/Dap/Banshee.Dap/Banshee.Dap/DapSync.cs	(original)
+++ trunk/banshee/src/Dap/Banshee.Dap/Banshee.Dap/DapSync.cs	Thu Sep  4 00:22:41 2008
@@ -102,7 +102,7 @@
             );
             
             auto_sync = dap.CreateSchema<bool> (conf_ns, "auto_sync", false,
-                Catalog.GetString ("Automaticlly sync the device when plugged in or the libraries change"),
+                Catalog.GetString ("Automatically sync the device when plugged in or the libraries change"),
                 Catalog.GetString ("Begin synchronizing the device as soon as the device is plugged in or the libraries change.")
             );
 



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