banshee r3119 - in branches/banshee/stable: . src/Core/Banshee.Base/Dap



Author: gburt
Date: Thu Jan 31 08:01:36 2008
New Revision: 3119
URL: http://svn.gnome.org/viewvc/banshee?rev=3119&view=rev

Log:
2008-01-31  Gabriel Burt  <gabriel burt gmail com>

	* src/Core/Banshee.Base/Dap/Dap.cs: Fix IsPortableAudioPlayerType method.


Modified:
   branches/banshee/stable/ChangeLog
   branches/banshee/stable/src/Core/Banshee.Base/Dap/Dap.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	Thu Jan 31 08:01:36 2008
@@ -717,15 +717,17 @@
         protected static bool IsPortableAudioPlayerType (Hal.Device device, string type)
         {
             if (device.PropertyExists ("portable_audio_player.type")) {
-                return device ["portable_audio_player.type"] == type;
-            } else {
-                if (device.PropertyExists ("portable_audio_player.access_method.protocols")) {
-                    return Array.IndexOf (
-                        device.GetPropertyStringList ("portable_audio_player.access_method.protocols"),
-                        type
-                    ) > 0;
+                if (device ["portable_audio_player.type"] == type) {
+                    return true;
                 }
             }
+
+            if (device.PropertyExists ("portable_audio_player.access_method.protocols")) {
+                if (Array.IndexOf (device.GetPropertyStringList ("portable_audio_player.access_method.protocols"), type) > 0) {
+                    return true;
+                }
+            }
+
             return false;
         }
     }



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