[banshee/gio-hardware] [Sources] Allow forcing a source to the top



commit 59c2f2a0a7a8c12fe598832e8c18003e0e017454
Author: Gabriel Burt <gabriel burt gmail com>
Date:   Tue Aug 10 18:26:33 2010 -0700

    [Sources] Allow forcing a source to the top
    
    Force the FixSource to be at the top, fixing bgo#625686

 .../Banshee.Services/Banshee.Sources/Source.cs     |    6 +++++-
 .../Banshee.Fixup/Banshee.Fixup/FixSource.cs       |    2 +-
 2 files changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/src/Core/Banshee.Services/Banshee.Sources/Source.cs b/src/Core/Banshee.Services/Banshee.Sources/Source.cs
index 18d934e..5ef8643 100644
--- a/src/Core/Banshee.Services/Banshee.Sources/Source.cs
+++ b/src/Core/Banshee.Services/Banshee.Sources/Source.cs
@@ -271,7 +271,11 @@ namespace Banshee.Sources
 
                     int i = 0;
                     foreach (Source child in child_sources) {
-                        child.Order = i++;
+                        // Leave children with negative orders alone, so they can be manually
+                        // placed at the top
+                        if (child.Order >= 0) {
+                            child.Order = i++;
+                        }
                     }
                 }
             }
diff --git a/src/Extensions/Banshee.Fixup/Banshee.Fixup/FixSource.cs b/src/Extensions/Banshee.Fixup/Banshee.Fixup/FixSource.cs
index 4331465..25ed3bf 100644
--- a/src/Extensions/Banshee.Fixup/Banshee.Fixup/FixSource.cs
+++ b/src/Extensions/Banshee.Fixup/Banshee.Fixup/FixSource.cs
@@ -45,7 +45,7 @@ namespace Banshee.Fixup
     {
         ProblemModel problem_model = new ProblemModel ();
 
-        public FixSource () : base (Catalog.GetString ("Metadata Fixer"), Catalog.GetString ("Metadata Fixer"), 0)
+        public FixSource () : base (Catalog.GetString ("Metadata Fixer"), Catalog.GetString ("Metadata Fixer"), -1)
         {
             TypeUniqueId = "fixes";
 



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