banshee r3972 - in trunk/banshee: . src/Clients/Nereid/Nereid src/Core/Banshee.ThickClient/Banshee.Collection.Gui src/Core/Banshee.ThickClient/Banshee.Sources.Gui src/Libraries/Hyena.Gui/Hyena.Data.Gui/ListView src/Libraries/Hyena/Hyena.Data
- From: gburt svn gnome org
- To: svn-commits-list gnome org
- Subject: banshee r3972 - in trunk/banshee: . src/Clients/Nereid/Nereid src/Core/Banshee.ThickClient/Banshee.Collection.Gui src/Core/Banshee.ThickClient/Banshee.Sources.Gui src/Libraries/Hyena.Gui/Hyena.Data.Gui/ListView src/Libraries/Hyena/Hyena.Data
- Date: Fri, 23 May 2008 03:50:09 +0000 (UTC)
Author: gburt
Date: Fri May 23 03:50:08 2008
New Revision: 3972
URL: http://svn.gnome.org/viewvc/banshee?rev=3972&view=rev
Log:
2008-05-22 Gabriel Burt <gabriel burt gmail com>
* src/Clients/Nereid/Nereid/PlayerInterface.cs: Don't set the
PersistentColumnController within the composite_view check, move it to
TrackListView so it's more general.
* src/Core/Banshee.ThickClient/Banshee.Collection.Gui/PersistentColumnController.cs:
Set loaded to false whenever reloading the source's settings.
* src/Core/Banshee.ThickClient/Banshee.Collection.Gui/TrackListView.cs:
When setting the model, also set the source on the controller if it's a
PersistentColumnController.
* src/Libraries/Hyena.Gui/Hyena.Data.Gui/ListView/ListView_Header.cs: Fix
bug with column cache not being invalidated, which caused checkboxes to
try to show up in the music library after ejecting an audio cd, causing a
crash. Also, don't do anything if we're already set to the controller in
question.
* src/Libraries/Hyena/Hyena.Data/ColumnDescription.cs:
* src/Core/Banshee.ThickClient/Banshee.Sources.Gui/FilteredListSourceContents.cs:
Comment out verbose logging.
Modified:
trunk/banshee/ChangeLog
trunk/banshee/src/Clients/Nereid/Nereid/PlayerInterface.cs
trunk/banshee/src/Core/Banshee.ThickClient/Banshee.Collection.Gui/PersistentColumnController.cs
trunk/banshee/src/Core/Banshee.ThickClient/Banshee.Collection.Gui/TrackListView.cs
trunk/banshee/src/Core/Banshee.ThickClient/Banshee.Sources.Gui/FilteredListSourceContents.cs
trunk/banshee/src/Libraries/Hyena.Gui/Hyena.Data.Gui/ListView/ListView_Header.cs
trunk/banshee/src/Libraries/Hyena/Hyena.Data/ColumnDescription.cs
Modified: trunk/banshee/src/Clients/Nereid/Nereid/PlayerInterface.cs
==============================================================================
--- trunk/banshee/src/Clients/Nereid/Nereid/PlayerInterface.cs (original)
+++ trunk/banshee/src/Clients/Nereid/Nereid/PlayerInterface.cs Fri May 23 03:50:08 2008
@@ -320,12 +320,8 @@
view_container.Content.SetSource (source);
view_container.Show ();
} else if (source is ITrackModelSource) {
- composite_view.SetSource (source);
- PersistentColumnController column_controller = composite_view.TrackView.ColumnController as PersistentColumnController;
- if (column_controller != null) {
- column_controller.Source = source;
- }
view_container.Content = composite_view;
+ view_container.Content.SetSource (source);
view_container.Show ();
} else if (source is Hyena.Data.IObjectListModel) {
if (object_view == null) {
Modified: trunk/banshee/src/Core/Banshee.ThickClient/Banshee.Collection.Gui/PersistentColumnController.cs
==============================================================================
--- trunk/banshee/src/Core/Banshee.ThickClient/Banshee.Collection.Gui/PersistentColumnController.cs (original)
+++ trunk/banshee/src/Core/Banshee.ThickClient/Banshee.Collection.Gui/PersistentColumnController.cs Fri May 23 03:50:08 2008
@@ -82,6 +82,8 @@
return;
}
+ loaded = false;
+
foreach (Column column in this) {
if (column.Id != null) {
string @namespace = MakeNamespace (column.Id);
Modified: trunk/banshee/src/Core/Banshee.ThickClient/Banshee.Collection.Gui/TrackListView.cs
==============================================================================
--- trunk/banshee/src/Core/Banshee.ThickClient/Banshee.Collection.Gui/TrackListView.cs (original)
+++ trunk/banshee/src/Core/Banshee.ThickClient/Banshee.Collection.Gui/TrackListView.cs Fri May 23 03:50:08 2008
@@ -68,25 +68,37 @@
public override void SetModel (IListModel<TrackInfo> value, double vpos)
{
- Source source = ServiceManager.SourceManager.ActiveSource;
- ColumnController controller = null;
+ //Console.WriteLine ("TrackListView.SetModel for {0} with vpos {1}", value, vpos);
- while (source != null && controller == null) {
- controller = source.Properties.Get<ColumnController> ("TrackView.ColumnController");
- string controller_xml = null;
- if (controller == null) {
- controller_xml = source.Properties.GetString ("TrackView.ColumnControllerXml");
- if (controller_xml != null) {
- controller = new XmlColumnController (controller_xml);
- source.Properties.Remove ("TrackView.ColumnControllerXml");
- source.Properties.Set<ColumnController> ("TrackView.ColumnController", controller);
+ if (value != null) {
+ Source source = ServiceManager.SourceManager.ActiveSource;
+ ColumnController controller = null;
+
+ // Get the controller from this source, or its parent(s) if it doesn't have one
+ while (source != null && controller == null) {
+ controller = source.Properties.Get<ColumnController> ("TrackView.ColumnController");
+ if (controller == null) {
+ string controller_xml = source.Properties.GetString ("TrackView.ColumnControllerXml");
+ if (controller_xml != null) {
+ controller = new XmlColumnController (controller_xml);
+ source.Properties.Remove ("TrackView.ColumnControllerXml");
+ source.Properties.Set<ColumnController> ("TrackView.ColumnController", controller);
+ }
}
+ source = source.Parent;
}
- source = source.Parent;
+
+ controller = controller ?? default_column_controller;
+
+ PersistentColumnController persistent_controller = controller as PersistentColumnController;
+ if (persistent_controller != null) {
+ //Hyena.Log.InformationFormat ("Setting controller source to {0}", ServiceManager.SourceManager.ActiveSource.Name);
+ persistent_controller.Source = ServiceManager.SourceManager.ActiveSource;
+ }
+
+ ColumnController = controller;
}
- ColumnController = controller ?? default_column_controller;
-
base.SetModel (value, vpos);
}
Modified: trunk/banshee/src/Core/Banshee.ThickClient/Banshee.Sources.Gui/FilteredListSourceContents.cs
==============================================================================
--- trunk/banshee/src/Core/Banshee.ThickClient/Banshee.Sources.Gui/FilteredListSourceContents.cs (original)
+++ trunk/banshee/src/Core/Banshee.ThickClient/Banshee.Sources.Gui/FilteredListSourceContents.cs Fri May 23 03:50:08 2008
@@ -165,7 +165,7 @@
private void Reset ()
{
- Hyena.Log.Information ("ListBrowser Reset");
+ //Hyena.Log.Information ("ListBrowser Reset");
// Unparent the views' scrolled window parents so they can be re-packed in
// a new layout. The main container gets destroyed since it will be recreated.
@@ -175,15 +175,15 @@
foreach (ScrolledWindow window in filter_scrolled_windows) {
filter_container.Remove (window);
}
- } else
- Hyena.Log.Information ("No filter container");
- } else
- Hyena.Log.Information ("No filter windows");
+ } //else
+ //Hyena.Log.Information ("No filter container");
+ } //else
+ //Hyena.Log.Information ("No filter windows");
if (container != null && main_scrolled_window != null) {
container.Remove (main_scrolled_window);
- } else
- Hyena.Log.Information ("No main container");
+ } //else
+ //Hyena.Log.Information ("No main container");
if (container != null) {
Remove (container);
@@ -193,7 +193,7 @@
private void LayoutLeft ()
{
- Hyena.Log.Information ("ListBrowser LayoutLeft");
+ //Hyena.Log.Information ("ListBrowser LayoutLeft");
Reset ();
container = new HPaned ();
@@ -219,7 +219,7 @@
private void LayoutTop ()
{
- Hyena.Log.Information ("ListBrowser LayoutTop");
+ //Hyena.Log.Information ("ListBrowser LayoutTop");
Reset ();
container = new VPaned ();
@@ -251,7 +251,7 @@
private void OnViewModeChanged (object o, ChangedArgs args)
{
- Hyena.Log.InformationFormat ("ListBrowser mode toggled, val = {0}", args.Current.Value);
+ //Hyena.Log.InformationFormat ("ListBrowser mode toggled, val = {0}", args.Current.Value);
if (args.Current.Value == 0) {
LayoutLeft ();
BrowserPosition.Set ("left");
Modified: trunk/banshee/src/Libraries/Hyena.Gui/Hyena.Data.Gui/ListView/ListView_Header.cs
==============================================================================
--- trunk/banshee/src/Libraries/Hyena.Gui/Hyena.Data.Gui/ListView/ListView_Header.cs (original)
+++ trunk/banshee/src/Libraries/Hyena.Gui/Hyena.Data.Gui/ListView/ListView_Header.cs Fri May 23 03:50:08 2008
@@ -373,15 +373,18 @@
private ColumnController column_controller;
public ColumnController ColumnController {
get { return column_controller; }
- set {
+ set {
+ if (column_controller == value) {
+ return;
+ }
+
if (column_controller != null) {
column_controller.Updated -= OnColumnControllerUpdatedHandler;
}
column_controller = value;
- RegenerateColumnCache ();
- QueueDraw ();
+ OnColumnControllerUpdated ();
if (column_controller != null) {
column_controller.Updated += OnColumnControllerUpdatedHandler;
Modified: trunk/banshee/src/Libraries/Hyena/Hyena.Data/ColumnDescription.cs
==============================================================================
--- trunk/banshee/src/Libraries/Hyena/Hyena.Data/ColumnDescription.cs (original)
+++ trunk/banshee/src/Libraries/Hyena/Hyena.Data/ColumnDescription.cs Fri May 23 03:50:08 2008
@@ -77,6 +77,7 @@
get { return width; }
set {
double old = width;
+ //Console.WriteLine ("Changing width of {0} from {1} to {2}", Title, Width, value);
width = value;
if (value != old) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]