banshee r5064 - in branches/banshee/stable: . src/Dap/Banshee.Dap.Mtp/Banshee.Dap.Mtp



Author: gburt
Date: Wed Feb 25 19:08:43 2009
New Revision: 5064
URL: http://svn.gnome.org/viewvc/banshee?rev=5064&view=rev

Log:
2009-02-10  Gabriel Burt  <gabriel burt gmail com>

	* src/Dap/Banshee.Dap.Mtp/Banshee.Dap.Mtp/MtpSource.cs: Patch from William
	Pettersson catching exceptions thrown when trying to get the battery level
	(BGO #571022)



Modified:
   branches/banshee/stable/   (props changed)
   branches/banshee/stable/ChangeLog
   branches/banshee/stable/src/Dap/Banshee.Dap.Mtp/Banshee.Dap.Mtp/MtpSource.cs

Modified: branches/banshee/stable/src/Dap/Banshee.Dap.Mtp/Banshee.Dap.Mtp/MtpSource.cs
==============================================================================
--- branches/banshee/stable/src/Dap/Banshee.Dap.Mtp/Banshee.Dap.Mtp/MtpSource.cs	(original)
+++ branches/banshee/stable/src/Dap/Banshee.Dap.Mtp/Banshee.Dap.Mtp/MtpSource.cs	Wed Feb 25 19:08:43 2009
@@ -143,7 +143,11 @@
 
             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));
+            try {
+                AddDapProperty (Catalog.GetString ("Battery level"), String.Format ("{0:0%}", mtp_device.BatteryLevel/100.0));
+            } catch (Exception e) {
+                Log.Exception ("Unable to get battery level from MTP device", e);
+            }
         }
 
         protected override void LoadFromDevice ()



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