[banshee] Keep using 'banshee-1' for cache/config directories



commit fb767cafb742d372e1cdd3aadf080ebe956fabb6
Author: Gabriel Burt <gabriel burt gmail com>
Date:   Mon Mar 14 13:54:13 2011 -0500

    Keep using 'banshee-1' for cache/config directories
    
    We are renaming banshee-1 to banshee, except for the app data and cache
    dirs (~/.config/banshee-1 and ~/.cache/banshee-1/) which we don't want
    to move.  Update to latest Hyena, which adds a Paths.UserApplicationName
    which we set to "banshee-1" so those directories will keep being used.

 src/Clients/Beroe/Beroe/IndexerClient.cs           |    2 +-
 src/Clients/Booter/Booter/Entry.cs                 |    2 +-
 .../Banshee.Services/Banshee.Database/Tests.cs     |    2 +-
 .../Banshee.ServiceStack/Application.cs            |   13 +++++++++++++
 .../Banshee.Gui/GtkBaseClient.cs                   |    2 +-
 src/Hyena                                          |    2 +-
 6 files changed, 18 insertions(+), 5 deletions(-)
---
diff --git a/src/Clients/Beroe/Beroe/IndexerClient.cs b/src/Clients/Beroe/Beroe/IndexerClient.cs
index 69fffed..b81216e 100644
--- a/src/Clients/Beroe/Beroe/IndexerClient.cs
+++ b/src/Clients/Beroe/Beroe/IndexerClient.cs
@@ -73,7 +73,7 @@ namespace Beroe
 
         private static void Startup ()
         {
-            Paths.ApplicationName = "banshee";
+            Application.InitializePaths ();
 
             ThreadAssist.InitializeMainThread ();
 
diff --git a/src/Clients/Booter/Booter/Entry.cs b/src/Clients/Booter/Booter/Entry.cs
index 80530b8..7e54a42 100644
--- a/src/Clients/Booter/Booter/Entry.cs
+++ b/src/Clients/Booter/Booter/Entry.cs
@@ -73,7 +73,7 @@ namespace Booter
     {
         public static void Main ()
         {
-            Paths.ApplicationName = Application.InternalName;
+            Application.InitializePaths ();
 
             if (CheckHelpVersion ()) {
                 return;
diff --git a/src/Core/Banshee.Services/Banshee.Database/Tests.cs b/src/Core/Banshee.Services/Banshee.Database/Tests.cs
index 2504064..d6b2712 100644
--- a/src/Core/Banshee.Services/Banshee.Database/Tests.cs
+++ b/src/Core/Banshee.Services/Banshee.Database/Tests.cs
@@ -44,7 +44,7 @@ namespace Banshee.Database
         [Test]
         public void Migrate ()
         {
-            Paths.ApplicationName = Application.InternalName;
+            Application.InitializePaths ();
 
             int count = 0;
             foreach (string file in Directory.GetFiles (Path.Combine (TestsDir, "data"))) {
diff --git a/src/Core/Banshee.Services/Banshee.ServiceStack/Application.cs b/src/Core/Banshee.Services/Banshee.ServiceStack/Application.cs
index f81d557..00446e7 100644
--- a/src/Core/Banshee.Services/Banshee.ServiceStack/Application.cs
+++ b/src/Core/Banshee.Services/Banshee.ServiceStack/Application.cs
@@ -169,6 +169,19 @@ namespace Banshee.ServiceStack
             }
         }
 
+        static bool paths_initialized;
+        public static void InitializePaths ()
+        {
+            if (!paths_initialized) {
+                // We changed banshee-1 to banshee everywhere except the
+                // ~/.config/banshee-1/ and ~/.cache/banshee-1 directories, and 
+                // for gconf
+                Paths.UserApplicationName = "banshee-1";
+                Paths.ApplicationName = InternalName;
+                paths_initialized = true;
+            }
+        }
+
         [DllImport ("libglib-2.0-0.dll")]
         static extern IntPtr g_get_language_names ();
 
diff --git a/src/Core/Banshee.ThickClient/Banshee.Gui/GtkBaseClient.cs b/src/Core/Banshee.ThickClient/Banshee.Gui/GtkBaseClient.cs
index 0dc4ae5..3b0c7b5 100644
--- a/src/Core/Banshee.ThickClient/Banshee.Gui/GtkBaseClient.cs
+++ b/src/Core/Banshee.ThickClient/Banshee.Gui/GtkBaseClient.cs
@@ -44,7 +44,7 @@ namespace Banshee.Gui
     public abstract class GtkBaseClient : Client
     {
         static GtkBaseClient () {
-            Paths.ApplicationName = Application.InternalName;
+            Application.InitializePaths ();
             user_gtkrc = Path.Combine (Paths.ApplicationData, "gtkrc");
         }
 
diff --git a/src/Hyena b/src/Hyena
index 39ab6a8..257c6b6 160000
--- a/src/Hyena
+++ b/src/Hyena
@@ -1 +1 @@
-Subproject commit 39ab6a82823107d73c2cabfc9b1c3e16e2c460f9
+Subproject commit 257c6b691c1a4c13b6b0123d8b51d31fbd22c30e



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