[banshee/source-contents] Fix view_container.Content property and build issue
- From: Gabriel Burt <gburt src gnome org>
- To: svn-commits-list gnome org
- Subject: [banshee/source-contents] Fix view_container.Content property and build issue
- Date: Mon, 4 May 2009 20:40:51 -0400 (EDT)
commit 64634074aad4fe1e6fc2f862e29b850fb7712ae2
Author: Gabriel Burt <gabriel burt gmail com>
Date: Wed Mar 11 22:45:05 2009 -0500
Fix view_container.Content property and build issue
---
src/Clients/Nereid/Nereid/ViewContainer.cs | 4 ++--
.../Banshee.Sources.Gui/SourceContentNotebook.cs | 7 ++++++-
2 files changed, 8 insertions(+), 3 deletions(-)
diff --git a/src/Clients/Nereid/Nereid/ViewContainer.cs b/src/Clients/Nereid/Nereid/ViewContainer.cs
index b4c504d..b53901a 100644
--- a/src/Clients/Nereid/Nereid/ViewContainer.cs
+++ b/src/Clients/Nereid/Nereid/ViewContainer.cs
@@ -55,7 +55,6 @@ namespace Nereid
private VBox footer;
private MenuButton title_button;
- private ISourceContents content;
private ISourceContents explicit_content;
private SourceContentNotebook notebook;
@@ -224,6 +223,7 @@ namespace Nereid
if (explicit_content != null) {
explicit_content.Widget.Hide ();
+ explicit_content = null;
}
// If the Source has an explicit view set in its Properties, then honor that, otherwise
@@ -269,7 +269,7 @@ namespace Nereid
}
public ISourceContents Content {
- get { return content; }
+ get { return explicit_content ?? notebook.Content; }
}
public string Title {
diff --git a/src/Core/Banshee.ThickClient/Banshee.Sources.Gui/SourceContentNotebook.cs b/src/Core/Banshee.ThickClient/Banshee.Sources.Gui/SourceContentNotebook.cs
index e30e034..ace0e42 100644
--- a/src/Core/Banshee.ThickClient/Banshee.Sources.Gui/SourceContentNotebook.cs
+++ b/src/Core/Banshee.ThickClient/Banshee.Sources.Gui/SourceContentNotebook.cs
@@ -50,6 +50,7 @@ namespace Banshee.Sources.Gui
public class SourceContentNotebook : Notebook
{
private Source source;
+ private ISourceContents content;
public SourceContentNotebook () : base ()
{
@@ -66,7 +67,7 @@ namespace Banshee.Sources.Gui
public void Activate (SourceContentProvider provider)
{
- ISourceContents content = provider.CreateFor (source);
+ content = provider.CreateFor (source);
content.SetSource (source);
content.Widget.Show ();
source.CreateSchema<string> ("last_content").Set (provider.Id);
@@ -77,5 +78,9 @@ namespace Banshee.Sources.Gui
CurrentPage = PageNum (content.Widget);
}
+
+ public ISourceContents Content {
+ get { return content; }
+ }
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]