[banshee] [SourceManager] Expand the active source's parent
- From: Gabriel Burt <gburt src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [banshee] [SourceManager] Expand the active source's parent
- Date: Sat, 24 Jul 2010 14:22:40 +0000 (UTC)
commit 4677a15b9b5765b904705c806913165b4e1e6465
Author: Gabriel Burt <gabriel burt gmail com>
Date: Sat Jul 24 16:20:58 2010 +0200
[SourceManager] Expand the active source's parent
.../Banshee.Sources/PrimarySource.cs | 5 ++++-
.../Banshee.Sources/SourceManager.cs | 3 +++
.../Banshee.Sources.Gui/SourceView.cs | 4 ++++
3 files changed, 11 insertions(+), 1 deletions(-)
---
diff --git a/src/Core/Banshee.Services/Banshee.Sources/PrimarySource.cs b/src/Core/Banshee.Services/Banshee.Sources/PrimarySource.cs
index 3ae0f0c..4a14bf5 100644
--- a/src/Core/Banshee.Services/Banshee.Sources/PrimarySource.cs
+++ b/src/Core/Banshee.Services/Banshee.Sources/PrimarySource.cs
@@ -223,7 +223,10 @@ namespace Banshee.Sources
public override bool Expanded {
get { return ExpandedSchema.Get (); }
- set { ExpandedSchema.Set (value); }
+ set {
+ ExpandedSchema.Set (value);
+ base.Expanded = value;
+ }
}
public PathPattern PathPattern { get; private set; }
diff --git a/src/Core/Banshee.Services/Banshee.Sources/SourceManager.cs b/src/Core/Banshee.Services/Banshee.Sources/SourceManager.cs
index 22b1a41..7877ddd 100644
--- a/src/Core/Banshee.Services/Banshee.Sources/SourceManager.cs
+++ b/src/Core/Banshee.Services/Banshee.Sources/SourceManager.cs
@@ -343,6 +343,9 @@ namespace Banshee.Sources
}
active_source = source;
+ if (source.Parent != null) {
+ source.Parent.Expanded = true;
+ }
if(!notify) {
source.Activate();
diff --git a/src/Core/Banshee.ThickClient/Banshee.Sources.Gui/SourceView.cs b/src/Core/Banshee.ThickClient/Banshee.Sources.Gui/SourceView.cs
index 9fc68c5..fced8ad 100644
--- a/src/Core/Banshee.ThickClient/Banshee.Sources.Gui/SourceView.cs
+++ b/src/Core/Banshee.ThickClient/Banshee.Sources.Gui/SourceView.cs
@@ -119,6 +119,10 @@ namespace Banshee.Sources.Gui
lock (args.Source) {
TreeIter iter = store.FindSource (args.Source);
if (!TreeIter.Zero.Equals (iter)) {
+ if (args.Source.Expanded) {
+ Expand (args.Source);
+ }
+
need_resort = true;
QueueDraw ();
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]