[banshee] Dap.MassStorage: correct last refactoring



commit ea179022e2c7c813ba36157567a3a7ff9dbfac47
Author: Andres G. Aragoneses <knocte gmail com>
Date:   Thu Jan 19 09:04:54 2012 +0000

    Dap.MassStorage: correct last refactoring
    
    Oops, bring back the IsAudioPlayerPath reading logic
    to LoadConfig (without params), so other derived classes
    can still use it, and leave RockBoxDevice with a call
    to it with a null argument as its the only one which
    doesn't require it.

 .../Banshee.Dap.MassStorage/MassStorageDevice.cs   |   16 ++++++++--------
 .../Banshee.Dap.MassStorage/RockBoxDevice.cs       |    2 +-
 2 files changed, 9 insertions(+), 9 deletions(-)
---
diff --git a/src/Dap/Banshee.Dap.MassStorage/Banshee.Dap.MassStorage/MassStorageDevice.cs b/src/Dap/Banshee.Dap.MassStorage/Banshee.Dap.MassStorage/MassStorageDevice.cs
index 5117d42..351ed70 100644
--- a/src/Dap/Banshee.Dap.MassStorage/Banshee.Dap.MassStorage/MassStorageDevice.cs
+++ b/src/Dap/Banshee.Dap.MassStorage/Banshee.Dap.MassStorage/MassStorageDevice.cs
@@ -81,6 +81,13 @@ namespace Banshee.Dap.MassStorage
                 return false;
             }
 
+            LoadConfig ();
+
+            return true;
+        }
+
+        protected void LoadConfig ()
+        {
             IDictionary<string, string[]> config = null;
 
             if (File.Exists (IsAudioPlayerPath)) {
@@ -97,16 +104,9 @@ namespace Banshee.Dap.MassStorage
             }
 
             LoadConfig (config);
-
-            return true;
-        }
-
-        protected void LoadConfig ()
-        {
-            LoadConfig (null);
         }
 
-        private void LoadConfig (IDictionary<string, string[]> config)
+        protected void LoadConfig (IDictionary<string, string[]> config)
         {
             if (config == null) {
                 config = new Dictionary<string, string[]> ();
diff --git a/src/Dap/Banshee.Dap.MassStorage/Banshee.Dap.MassStorage/RockBoxDevice.cs b/src/Dap/Banshee.Dap.MassStorage/Banshee.Dap.MassStorage/RockBoxDevice.cs
index f5a7a68..c7cd256 100644
--- a/src/Dap/Banshee.Dap.MassStorage/Banshee.Dap.MassStorage/RockBoxDevice.cs
+++ b/src/Dap/Banshee.Dap.MassStorage/Banshee.Dap.MassStorage/RockBoxDevice.cs
@@ -78,7 +78,7 @@ namespace Banshee.Dap.MassStorage
         {
             Hyena.Log.DebugFormat ("Found RockBox Device");
 
-            LoadConfig ();
+            LoadConfig (null);
 
             return true;
         }



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