banshee r4203 - in trunk/banshee: . src/Core/Banshee.Core/Banshee.Collection src/Core/Banshee.Services/Banshee.Collection.Database src/Core/Banshee.Services/Banshee.Database src/Core/Banshee.Services/Banshee.Playlist src/Core/Banshee.ThickClient/Banshee.Collection.Gui src/Extensions/Banshee.PlayQueue/Banshee.PlayQueue src/Libraries/Hyena.Gui/Hyena.Data.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 r4203 - in trunk/banshee: . src/Core/Banshee.Core/Banshee.Collection src/Core/Banshee.Services/Banshee.Collection.Database src/Core/Banshee.Services/Banshee.Database src/Core/Banshee.Services/Banshee.Playlist src/Core/Banshee.ThickClient/Banshee.Collection.Gui src/Extensions/Banshee.PlayQueue/Banshee.PlayQueue src/Libraries/Hyena.Gui/Hyena.Data.Gui src/Libraries/Hyena.Gui/Hyena.Data.Gui/ListView src/Libraries/Hyena/Hyena.Data
- Date: Thu, 26 Jun 2008 18:14:16 +0000 (UTC)
Author: gburt
Date: Thu Jun 26 18:14:16 2008
New Revision: 4203
URL: http://svn.gnome.org/viewvc/banshee?rev=4203&view=rev
Log:
2008-06-26 Gabriel Burt <gabriel burt gmail com>
This commit adds manual playlist (including play queue) sorting. To
manually sort a playlist, you need to turn off column sorting by clicking
the sorted column until the sort arrow disappears (it has three states,
asc, desc, manual sort order).
* src/Extensions/Banshee.PlayQueue/Banshee.PlayQueue/PlayQueueSource.cs:
Fix bug with my return-to-previous-playback-source code where if the Play
Queue was the *next* playback source and was then emptied, it wouldn't
fall back to the previous and/or current. Also, force sorting by
ViewOrder, enabling manual sort order.
* src/Core/Banshee.ThickClient/Banshee.Collection.Gui/TrackListView.cs:
Handle DragDrop for playlists, reordering the selected tracks.
* src/Core/Banshee.Services/Banshee.Collection.Database/DatabaseTrackListModel.cs:
Handle the new SortType (None) for playlists, sorting by ViewOrder.
* src/Core/Banshee.Services/Banshee.Playlist/PlaylistSource.cs: Implement
reordering and setting default order when adding tracks to a playlist.
Adding tracks still uses a constant number of queries, but reordering uses
N + 2 or 3 where N is the number of tracks you dragged.
* src/Core/Banshee.Services/Banshee.Database/BansheeDbFormatMigrator.cs:
Make sure the playlist order column is initialized w/ decent values.
* src/Core/Banshee.Core/Banshee.Collection/TrackInfo.cs: Add a
MediaTypeName property, will be used for menu items and other UI for
calling an item by a more descriptive name (eg Podcast, Video, etc).
* src/Libraries/Hyena/Hyena.Data/SortType.cs: Add None type.
* src/Libraries/Hyena.Gui/Hyena.Data.Gui/ColumnHeaderCellText.cs: Don't
draw an arrow if sort type is None.
* src/Libraries/Hyena.Gui/Hyena.Data.Gui/SortableColumn.cs: Explicitly set
the default sort type to ascending.
* src/Libraries/Hyena.Gui/Hyena.Data.Gui/ListView/ListView_DragAndDrop.cs:
Add protected helper method GetDragRow (int y) that returns the drop row
index for a given y, such that if over the top half of a row, returns that
index, else returns the one after.
* src/Libraries/Hyena.Gui/Hyena.Data.Gui/ListView/ListView_Windowing.cs:
Add protected helper, TranslateToListY that subtracts the header height.
* src/Libraries/Hyena.Gui/Hyena.Data.Gui/ListView/ListView_Rendering.cs:
Factor out the reorder line painting into its own method, and fix a bug
where the line wasn't drawn if the position was after the last row.
Modified:
trunk/banshee/ChangeLog
trunk/banshee/src/Core/Banshee.Core/Banshee.Collection/TrackInfo.cs
trunk/banshee/src/Core/Banshee.Services/Banshee.Collection.Database/DatabaseTrackListModel.cs
trunk/banshee/src/Core/Banshee.Services/Banshee.Database/BansheeDbFormatMigrator.cs
trunk/banshee/src/Core/Banshee.Services/Banshee.Playlist/PlaylistSource.cs
trunk/banshee/src/Core/Banshee.ThickClient/Banshee.Collection.Gui/TrackListView.cs
trunk/banshee/src/Extensions/Banshee.PlayQueue/Banshee.PlayQueue/PlayQueueSource.cs
trunk/banshee/src/Libraries/Hyena.Gui/Hyena.Data.Gui/ColumnHeaderCellText.cs
trunk/banshee/src/Libraries/Hyena.Gui/Hyena.Data.Gui/ListView/ListView_DragAndDrop.cs
trunk/banshee/src/Libraries/Hyena.Gui/Hyena.Data.Gui/ListView/ListView_Rendering.cs
trunk/banshee/src/Libraries/Hyena.Gui/Hyena.Data.Gui/ListView/ListView_Windowing.cs
trunk/banshee/src/Libraries/Hyena.Gui/Hyena.Data.Gui/SortableColumn.cs
trunk/banshee/src/Libraries/Hyena/Hyena.Data/SortType.cs
Modified: trunk/banshee/src/Core/Banshee.Core/Banshee.Collection/TrackInfo.cs
==============================================================================
--- trunk/banshee/src/Core/Banshee.Core/Banshee.Collection/TrackInfo.cs (original)
+++ trunk/banshee/src/Core/Banshee.Core/Banshee.Collection/TrackInfo.cs Thu Jun 26 18:14:16 2008
@@ -314,6 +314,23 @@
get { return media_attributes; }
set { media_attributes = value; }
}
+
+ public bool IsMedia (TrackMediaAttributes attr)
+ {
+ return (MediaAttributes & attr) != 0;
+ }
+
+ public string MediaTypeName {
+ get {
+ if (IsMedia (TrackMediaAttributes.Podcast))
+ return Catalog.GetString ("Podcast");
+ if (IsMedia (TrackMediaAttributes.VideoStream))
+ return Catalog.GetString ("Video");
+ if (IsMedia (TrackMediaAttributes.Music))
+ return Catalog.GetString ("Song");
+ return Catalog.GetString ("Item");
+ }
+ }
// Generates a{sv} of self according to http://wiki.xmms2.xmms.se/index.php/Media_Player_Interfaces#.22Metadata.22
public IDictionary<string, object> GenerateExportable ()
Modified: trunk/banshee/src/Core/Banshee.Services/Banshee.Collection.Database/DatabaseTrackListModel.cs
==============================================================================
--- trunk/banshee/src/Core/Banshee.Services/Banshee.Collection.Database/DatabaseTrackListModel.cs (original)
+++ trunk/banshee/src/Core/Banshee.Services/Banshee.Collection.Database/DatabaseTrackListModel.cs Thu Jun 26 18:14:16 2008
@@ -124,8 +124,10 @@
protected virtual void GenerateSortQueryPart ()
{
- SortQuery = (SortColumn == null)
- ? BansheeQuery.GetSort ("Artist", true)
+ SortQuery = (SortColumn == null || SortColumn.SortType == SortType.None)
+ ? (SortColumn != null && source is Banshee.Playlist.PlaylistSource)
+ ? "CorePlaylistEntries.ViewOrder ASC, CorePlaylistEntries.EntryID ASC"
+ : BansheeQuery.GetSort ("Artist", true)
: BansheeQuery.GetSort (SortColumn.SortKey, SortColumn.SortType == SortType.Ascending);
}
@@ -137,11 +139,18 @@
}
if (sort_column == column && sort_column != null) {
- sort_column.SortType = sort_column.SortType == SortType.Ascending
- ? SortType.Descending
- : SortType.Ascending;
+ switch (sort_column.SortType) {
+ case SortType.Ascending: sort_column.SortType = SortType.Descending; break;
+ case SortType.Descending: sort_column.SortType = SortType.None; break;
+ case SortType.None: sort_column.SortType = SortType.Ascending; break;
+ }
}
-
+
+ // If we're switching from a different column, or we aren't in a playlist, make sure sort type isn't None
+ if (sort_column != null && (sort_column != column || !(source is Banshee.Playlist.PlaylistSource)) && sort_column.SortType == SortType.None) {
+ sort_column.SortType = SortType.Ascending;
+ }
+
sort_column = column;
GenerateSortQueryPart ();
Modified: trunk/banshee/src/Core/Banshee.Services/Banshee.Database/BansheeDbFormatMigrator.cs
==============================================================================
--- trunk/banshee/src/Core/Banshee.Services/Banshee.Database/BansheeDbFormatMigrator.cs (original)
+++ trunk/banshee/src/Core/Banshee.Services/Banshee.Database/BansheeDbFormatMigrator.cs Thu Jun 26 18:14:16 2008
@@ -52,7 +52,7 @@
// NOTE: Whenever there is a change in ANY of the database schema,
// this version MUST be incremented and a migration method
// MUST be supplied to match the new version number
- protected const int CURRENT_VERSION = 13;
+ protected const int CURRENT_VERSION = 14;
protected const int CURRENT_METADATA_VERSION = 2;
#region Migration Driver
@@ -431,6 +431,17 @@
#endregion
+#region Version 14
+
+ [DatabaseVersion (14)]
+ private bool Migrate_14 ()
+ {
+ InitializeOrderedTracks ();
+ return true;
+ }
+
+#endregion
+
#pragma warning restore 0169
#region Fresh database setup
@@ -725,12 +736,29 @@
Execute ("UPDATE CoreSmartPlaylists SET PrimarySourceID = 1");
Execute ("UPDATE CorePlaylists SET PrimarySourceID = 1");
+
+ InitializeOrderedTracks ();
}
#endregion
#region Utilities / Source / Service Stuff
+ private void InitializeOrderedTracks ()
+ {
+ foreach (long playlist_id in connection.QueryEnumerable<long> ("SELECT PlaylistID FROM CorePlaylists ORDER BY PlaylistID")) {
+ if (connection.Query<long> (@"SELECT COUNT(*) FROM CorePlaylistEntries
+ WHERE PlaylistID = ? AND ViewOrder > 0", playlist_id) <= 0) {
+
+ long first_id = connection.Query<long> ("SELECT COUNT(*) FROM CorePlaylistEntries WHERE PlaylistID < ?", playlist_id);
+ connection.Execute (
+ @"UPDATE CorePlaylistEntries SET ViewOrder = (ROWID - ?) WHERE PlaylistID = ?",
+ first_id, playlist_id
+ );
+ }
+ }
+ }
+
private void OnServiceStarted (ServiceStartedArgs args)
{
if (args.Service is UserJobManager) {
Modified: trunk/banshee/src/Core/Banshee.Services/Banshee.Playlist/PlaylistSource.cs
==============================================================================
--- trunk/banshee/src/Core/Banshee.Services/Banshee.Playlist/PlaylistSource.cs (original)
+++ trunk/banshee/src/Core/Banshee.Services/Banshee.Playlist/PlaylistSource.cs Thu Jun 26 18:14:16 2008
@@ -69,24 +69,31 @@
protected override string TrackJoinTable {
get { return "CorePlaylistEntries"; }
}
+
+ protected long MaxViewOrder {
+ get {
+ return ServiceManager.DbConnection.Query<long> (
+ "SELECT MAX(ViewOrder) + 1 FROM CorePlaylistEntries WHERE PlaylistID = ?", DbId);
+ }
+ }
static PlaylistSource ()
{
add_track_range_command = new HyenaSqliteCommand (@"
INSERT INTO CorePlaylistEntries
- SELECT null, ?, ItemID, 0
+ SELECT null, ?, ItemID, OrderId + ?
FROM CoreCache WHERE ModelID = ?
LIMIT ?, ?"
);
add_track_command = new HyenaSqliteCommand (@"
INSERT INTO CorePlaylistEntries
- VALUES (null, ?, ?, 0)"
+ VALUES (null, ?, ?, ?)"
);
add_track_range_from_joined_model_sql = @"
INSERT INTO CorePlaylistEntries
- SELECT null, ?, TrackID, 0
+ SELECT null, ?, TrackID, OrderId + ?
FROM CoreCache c INNER JOIN {0} e ON c.ItemID = e.{1}
WHERE ModelID = ?
LIMIT ?, ?";
@@ -214,7 +221,7 @@
protected void AddTrack (int track_id)
{
- ServiceManager.DbConnection.Execute (add_track_command, DbId, track_id);
+ ServiceManager.DbConnection.Execute (add_track_command, DbId, track_id, MaxViewOrder);
OnTracksAdded ();
}
@@ -236,6 +243,38 @@
}
return false;
}
+
+ public void ReorderSelectedTracks (int drop_row)
+ {
+ if (TrackModel.Selection.Count == 0 || TrackModel.Selection.AllSelected) {
+ return;
+ }
+
+ TrackInfo track = TrackModel[drop_row];
+ long order = track == null
+ ? ServiceManager.DbConnection.Query<long> ("SELECT MAX(ViewOrder) + 1 FROM CorePlaylistEntries WHERE PlaylistID = ?", DbId)
+ : ServiceManager.DbConnection.Query<long> ("SELECT ViewOrder FROM CorePlaylistEntries WHERE PlaylistID = ? AND EntryID = ?", DbId, Convert.ToInt64 (track.CacheEntryId));
+
+ // Make room for our new items
+ if (track != null) {
+ ServiceManager.DbConnection.Execute ("UPDATE CorePlaylistEntries SET ViewOrder = ViewOrder + ? WHERE PlaylistID = ? AND ViewOrder >= ?",
+ TrackModel.Selection.Count, DbId, order
+ );
+ }
+
+ HyenaSqliteCommand update_command = new HyenaSqliteCommand (String.Format ("UPDATE CorePlaylistEntries SET ViewOrder = ? WHERE PlaylistID = {0} AND EntryID = ?", DbId));
+ HyenaSqliteCommand select_command = new HyenaSqliteCommand (String.Format ("SELECT ItemID FROM CoreCache WHERE ModelID = {0} LIMIT ?, ?", DatabaseTrackModel.CacheId));
+
+ // Reorder the selected items
+ // TODO put in transaction
+ foreach (RangeCollection.Range range in TrackModel.Selection.Ranges) {
+ foreach (long entry_id in ServiceManager.DbConnection.QueryEnumerable<long> (select_command, range.Start, range.Count)) {
+ ServiceManager.DbConnection.Execute (update_command, order++, entry_id);
+ }
+ }
+
+ Reload ();
+ }
DatabaseTrackListModel last_add_range_from_model;
HyenaSqliteCommand last_add_range_command = null;
@@ -247,7 +286,8 @@
? last_add_range_command
: new HyenaSqliteCommand (String.Format (add_track_range_from_joined_model_sql, from.JoinTable, from.JoinPrimaryKey));
- ServiceManager.DbConnection.Execute (last_add_range_command, DbId, from.CacheId, range.Start, range.Count);
+ long first_order_id = ServiceManager.DbConnection.Query<long> ("SELECT OrderID FROM CoreCache WHERE ModelID = ? LIMIT 1 OFFSET ?", from.CacheId, range.Start);
+ ServiceManager.DbConnection.Execute (last_add_range_command, DbId, MaxViewOrder - first_order_id, from.CacheId, range.Start, range.Count);
last_add_range_from_model = from;
}
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 Thu Jun 26 18:14:16 2008
@@ -36,6 +36,7 @@
using Banshee.Sources;
using Banshee.ServiceStack;
using Banshee.MediaEngine;
+using Banshee.Playlist;
using Banshee.Gui;
@@ -120,6 +121,33 @@
base.OnDragSourceSet ();
Drag.SourceSetIconName (this, "audio-x-generic");
}
+
+ protected override bool OnDragDrop (Gdk.DragContext context, int x, int y, uint time_)
+ {
+ y = TranslateToListY (y);
+ if (Gtk.Drag.GetSourceWidget (context) == this) {
+ PlaylistSource playlist = ServiceManager.SourceManager.ActiveSource as PlaylistSource;
+ if (playlist != null) {
+ //Gtk.Drag.
+ int row = GetRowAtY (y);
+ Console.WriteLine ("track drag drop at y {0}, row {1}; y at row 0 is {2}, row height = {3}", y, row, GetYAtRow (0), RowHeight);
+ if (row != GetRowAtY (y + RowHeight / 2)) {
+ row += 1;
+ }
+ Console.WriteLine ("track drag drop, row + 1/2 is {0}", GetRowAtY (y + (RowHeight / 2)));
+
+ if (playlist.TrackModel.Selection.Contains (row)) {
+ // can't drop within the selection
+ return false;
+ }
+
+ playlist.ReorderSelectedTracks (row);
+ return true;
+ }
+ }
+
+ return false;
+ }
protected override void OnDragDataGet (Gdk.DragContext context, SelectionData selection_data, uint info, uint time)
{
Modified: trunk/banshee/src/Extensions/Banshee.PlayQueue/Banshee.PlayQueue/PlayQueueSource.cs
==============================================================================
--- trunk/banshee/src/Extensions/Banshee.PlayQueue/Banshee.PlayQueue/PlayQueueSource.cs (original)
+++ trunk/banshee/src/Extensions/Banshee.PlayQueue/Banshee.PlayQueue/PlayQueueSource.cs Thu Jun 26 18:14:16 2008
@@ -67,7 +67,7 @@
Properties.SetString ("Icon.Name", "source-playlist");
Properties.SetString ("RemoveTracksActionLabel", Catalog.GetString ("Remove From Play Queue"));
- ((DatabaseTrackListModel)TrackModel).ForcedSortQuery = "CorePlaylistEntries.EntryID ASC";
+ ((DatabaseTrackListModel)TrackModel).ForcedSortQuery = "CorePlaylistEntries.ViewOrder ASC, CorePlaylistEntries.EntryID ASC";
ServiceManager.PlayerEngine.ConnectEvent (OnPlayerEvent);
ServiceManager.PlaybackController.Transition += OnCanonicalPlaybackControllerTransition;
@@ -115,8 +115,10 @@
ServiceManager.SourceManager.VideoLibrary.TracksDeleted += HandleTracksDeleted;
TrackModel.Reloaded += delegate {
- if (this == ServiceManager.PlaybackController.Source && Count == 0) {
- ServiceManager.PlaybackController.Source = PriorSource;
+ if (Count == 0) {
+ if (this == ServiceManager.PlaybackController.Source || this == ServiceManager.PlaybackController.NextSource) {
+ ServiceManager.PlaybackController.NextSource = ServiceManager.PlaybackController.Source = PriorSource;
+ }
}
};
Modified: trunk/banshee/src/Libraries/Hyena.Gui/Hyena.Data.Gui/ColumnHeaderCellText.cs
==============================================================================
--- trunk/banshee/src/Libraries/Hyena.Gui/Hyena.Data.Gui/ColumnHeaderCellText.cs (original)
+++ trunk/banshee/src/Libraries/Hyena.Gui/Hyena.Data.Gui/ColumnHeaderCellText.cs Thu Jun 26 18:14:16 2008
@@ -62,7 +62,11 @@
alloc.Y = ((int)cellHeight - alloc.Height) / 2;
base.Render (context, state, cellWidth - 2 * alloc.Width - 10, cellHeight);
- context.Theme.DrawArrow (context.Context, alloc, ((ISortableColumn)data_handler ()).SortType);
+
+ SortType sort_type = ((ISortableColumn)data_handler ()).SortType;
+ if (sort_type != SortType.None) {
+ context.Theme.DrawArrow (context.Context, alloc, sort_type);
+ }
}
protected override string Text {
Modified: trunk/banshee/src/Libraries/Hyena.Gui/Hyena.Data.Gui/ListView/ListView_DragAndDrop.cs
==============================================================================
--- trunk/banshee/src/Libraries/Hyena.Gui/Hyena.Data.Gui/ListView/ListView_DragAndDrop.cs (original)
+++ trunk/banshee/src/Libraries/Hyena.Gui/Hyena.Data.Gui/ListView/ListView_DragAndDrop.cs Thu Jun 26 18:14:16 2008
@@ -173,11 +173,27 @@
private void DragReorderUpdateRow ()
{
- int row = GetRowAtY (drag_reorder_motion_y) - 1;
+ int row = GetDragRow (drag_reorder_motion_y);
if (row != drag_reorder_row_index) {
drag_reorder_row_index = row;
InvalidateList ();
}
}
+
+ protected int GetDragRow (int y)
+ {
+ y = TranslateToListY (y);
+ int row = GetRowAtY (y);
+
+ if (row == -1) {
+ return -1;
+ }
+
+ if (row != GetRowAtY (y + RowHeight / 2)) {
+ row++;
+ }
+
+ return row;
+ }
}
-}
+}
\ No newline at end of file
Modified: trunk/banshee/src/Libraries/Hyena.Gui/Hyena.Data.Gui/ListView/ListView_Rendering.cs
==============================================================================
--- trunk/banshee/src/Libraries/Hyena.Gui/Hyena.Data.Gui/ListView/ListView_Rendering.cs (original)
+++ trunk/banshee/src/Libraries/Hyena.Gui/Hyena.Data.Gui/ListView/ListView_Rendering.cs Thu Jun 26 18:14:16 2008
@@ -225,16 +225,7 @@
single_list_alloc.Width, single_list_alloc.Height);
}
- if (ri == drag_reorder_row_index && Reorderable) {
- cairo_context.Save ();
- cairo_context.LineWidth = 1.0;
- cairo_context.Antialias = Cairo.Antialias.None;
- cairo_context.MoveTo (single_list_alloc.Left, single_list_alloc.Top);
- cairo_context.LineTo (single_list_alloc.Right, single_list_alloc.Top);
- cairo_context.Color = Theme.Colors.GetWidgetColor (GtkColorClass.Text, StateType.Normal);
- cairo_context.Stroke ();
- cairo_context.Restore ();
- }
+ PaintReorderLine (ri, single_list_alloc);
if (Selection != null && Selection.FocusedIndex == ri && !Selection.Contains (ri) && HasFocus) {
CairoCorners corners = CairoCorners.All;
@@ -263,6 +254,9 @@
single_list_alloc.Y += single_list_alloc.Height;
}
+ // In case the user is dragging to the end of the list
+ PaintReorderLine (last_row, single_list_alloc);
+
if (selection_height > 0) {
Theme.DrawRowSelection (cairo_context, list_rendering_alloc.X, selection_y,
list_rendering_alloc.Width, selection_height);
@@ -282,6 +276,20 @@
cairo_context.ResetClip ();
}
+
+ private void PaintReorderLine (int row_index, Rectangle single_list_alloc)
+ {
+ if (row_index == drag_reorder_row_index && Reorderable) {
+ cairo_context.Save ();
+ cairo_context.LineWidth = 1.0;
+ cairo_context.Antialias = Cairo.Antialias.None;
+ cairo_context.MoveTo (single_list_alloc.Left, single_list_alloc.Top);
+ cairo_context.LineTo (single_list_alloc.Right, single_list_alloc.Top);
+ cairo_context.Color = Theme.Colors.GetWidgetColor (GtkColorClass.Text, StateType.Normal);
+ cairo_context.Stroke ();
+ cairo_context.Restore ();
+ }
+ }
private void PaintRow (int row_index, Rectangle area, StateType state)
{
@@ -418,7 +426,7 @@
}
private int row_height = 32;
- private int RowHeight {
+ protected int RowHeight {
get {
if (RecomputeRowHeight) {
row_height = RowHeightProvider != null
Modified: trunk/banshee/src/Libraries/Hyena.Gui/Hyena.Data.Gui/ListView/ListView_Windowing.cs
==============================================================================
--- trunk/banshee/src/Libraries/Hyena.Gui/Hyena.Data.Gui/ListView/ListView_Windowing.cs (original)
+++ trunk/banshee/src/Libraries/Hyena.Gui/Hyena.Data.Gui/ListView/ListView_Windowing.cs Thu Jun 26 18:14:16 2008
@@ -107,6 +107,11 @@
event_window.Hide ();
}
+ protected int TranslateToListY (int y)
+ {
+ return y - list_interaction_alloc.Y;
+ }
+
private void MoveResize (Rectangle allocation)
{
if (Theme == null) {
Modified: trunk/banshee/src/Libraries/Hyena.Gui/Hyena.Data.Gui/SortableColumn.cs
==============================================================================
--- trunk/banshee/src/Libraries/Hyena.Gui/Hyena.Data.Gui/SortableColumn.cs (original)
+++ trunk/banshee/src/Libraries/Hyena.Gui/Hyena.Data.Gui/SortableColumn.cs Thu Jun 26 18:14:16 2008
@@ -36,7 +36,7 @@
public class SortableColumn : Column, ISortableColumn
{
private string sort_key;
- private SortType sort_type;
+ private SortType sort_type = SortType.Ascending;
public SortableColumn(string title, ColumnCell cell, double width, string sort_key, bool visible) :
base(title, cell, width, visible)
Modified: trunk/banshee/src/Libraries/Hyena/Hyena.Data/SortType.cs
==============================================================================
--- trunk/banshee/src/Libraries/Hyena/Hyena.Data/SortType.cs (original)
+++ trunk/banshee/src/Libraries/Hyena/Hyena.Data/SortType.cs Thu Jun 26 18:14:16 2008
@@ -30,6 +30,7 @@
{
public enum SortType
{
+ None,
Ascending,
Descending
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]