[banshee] [Sources] Allow forcing a source to the top
- From: Gabriel Burt <gburt src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [banshee] [Sources] Allow forcing a source to the top
- Date: Wed, 11 Aug 2010 01:29:55 +0000 (UTC)
commit 2a038f6b8d57a59a8be40a58c679edfce45e0ed1
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]