banshee r3212 - in trunk/banshee: . src/Core/Banshee.ThickClient/Banshee.Collection.Gui
- From: abock svn gnome org
- To: svn-commits-list gnome org
- Subject: banshee r3212 - in trunk/banshee: . src/Core/Banshee.ThickClient/Banshee.Collection.Gui
- Date: Mon, 11 Feb 2008 00:26:06 +0000 (GMT)
Author: abock
Date: Mon Feb 11 00:26:06 2008
New Revision: 3212
URL: http://svn.gnome.org/viewvc/banshee?rev=3212&view=rev
Log:
2008-02-10 Aaron Bockover <abock gnome org>
* src/Core/Banshee.ThickClient/Banshee.Collection.Gui/PersistentColumnController.cs:
Preserve the hard-coded order when loading the column orders and no
order could be loaded from configuration
* src/Core/Banshee.ThickClient/Banshee.Collection.Gui/TrackListView.cs:
Make the column titles translatable
Modified:
trunk/banshee/ChangeLog
trunk/banshee/src/Core/Banshee.ThickClient/Banshee.Collection.Gui/PersistentColumnController.cs
trunk/banshee/src/Core/Banshee.ThickClient/Banshee.Collection.Gui/TrackListView.cs
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 Mon Feb 11 00:26:06 2008
@@ -27,6 +27,7 @@
//
using System;
+using System.Collections.Generic;
using Hyena.Data.Gui;
using Banshee.Configuration;
@@ -56,10 +57,16 @@
"visible", column.Visible);
}
}
+
+ // Create a copy so we can read the original index
+ List<Column> columns = new List<Column> (Columns);
Columns.Sort (delegate (Column a, Column b) {
- int a_order = a.Id == null ? -1 : ConfigurationClient.Get<int> (MakeNamespace (a.Id), "order", 1);
- int b_order = b.Id == null ? -1 : ConfigurationClient.Get<int> (MakeNamespace (b.Id), "order", 1);
+ int a_order = a.Id == null ? -1 : ConfigurationClient.Get<int> (
+ MakeNamespace (a.Id), "order", columns.IndexOf (a));
+ int b_order = b.Id == null ? -1 : ConfigurationClient.Get<int> (
+ MakeNamespace (b.Id), "order", columns.IndexOf (b));
+
return a_order.CompareTo (b_order);
});
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 Mon Feb 11 00:26:06 2008
@@ -27,6 +27,7 @@
//
using System;
+using Mono.Unix;
using Gtk;
using Hyena.Data.Gui;
@@ -49,18 +50,19 @@
column_controller.AddRange (
new Column (null, "indicator", new ColumnCellPlaybackIndicator (null), 0.05),
- new SortableColumn ("Track", new ColumnCellTrackNumber ("TrackNumber", true), 0.10, "Track"),
- new SortableColumn ("Artist", new ColumnCellText ("ArtistName", true), 0.225, "Artist"),
- new SortableColumn ("Album", new ColumnCellText ("AlbumTitle", true), 0.225, "Album"),
- new SortableColumn ("Title", new ColumnCellText ("TrackTitle", true), 0.25, "Title"),
- new SortableColumn ("Duration", new ColumnCellDuration ("Duration", true), 0.15, "Duration"),
- new SortableColumn ("Year", new ColumnCellText ("Year", true), 0.15, "Year"),
- new SortableColumn ("Play Count", new ColumnCellText ("PlayCount", true), 0.15, "PlayCount"),
- new SortableColumn ("Skip Count", new ColumnCellText ("SkipCount", true), 0.15, "SkipCount"),
+ new SortableColumn (Catalog.GetString ("Track"), new ColumnCellTrackNumber ("TrackNumber", true), 0.10, "Track"),
+ new SortableColumn (Catalog.GetString ("Title"), new ColumnCellText ("TrackTitle", true), 0.25, "Title"),
+ new SortableColumn (Catalog.GetString ("Artist"), new ColumnCellText ("ArtistName", true), 0.225, "Artist"),
+ new SortableColumn (Catalog.GetString ("Album"), new ColumnCellText ("AlbumTitle", true), 0.225, "Album"),
+ new SortableColumn (Catalog.GetString ("Duration"), new ColumnCellDuration ("Duration", true), 0.15, "Duration"),
+
+ new SortableColumn (Catalog.GetString ("Year"), new ColumnCellText ("Year", true), 0.15, "Year"),
+ new SortableColumn (Catalog.GetString ("Play Count"), new ColumnCellText ("PlayCount", true), 0.15, "PlayCount"),
+ new SortableColumn (Catalog.GetString ("Skip Count"), new ColumnCellText ("SkipCount", true), 0.15, "SkipCount"),
//new SortableColumn ("Rating", new RatingColumnCell (null, true), 0.15, "Rating"),
- new SortableColumn ("Last Played", new ColumnCellDateTime ("LastPlayed", true), 0.15, "LastPlayedStamp"),
- new SortableColumn ("Added", new ColumnCellDateTime ("DateAdded", true), 0.15, "DateAddedStamp"),
- new SortableColumn ("Location", new ColumnCellText ("Uri", true), 0.15, "Uri")
+ new SortableColumn (Catalog.GetString ("Last Played"), new ColumnCellDateTime ("LastPlayed", true), 0.15, "LastPlayedStamp"),
+ new SortableColumn (Catalog.GetString ("Date Added"), new ColumnCellDateTime ("DateAdded", true), 0.15, "DateAddedStamp"),
+ new SortableColumn (Catalog.GetString ("Location"), new ColumnCellText ("Uri", true), 0.15, "Uri")
);
column_controller.Load ();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]