|
Lines 77-82
Link Here
|
| 77 |
public PlaylistColumn PlaysColumn; |
77 |
public PlaylistColumn PlaysColumn; |
| 78 |
public PlaylistColumn LastPlayedColumn; |
78 |
public PlaylistColumn LastPlayedColumn; |
| 79 |
|
79 |
|
|
|
80 |
private class ColumnSorter : IComparer |
| 81 |
{ |
| 82 |
public int Compare(object a, object b) |
| 83 |
{ |
| 84 |
return (a as PlaylistColumn).Order.CompareTo((b as PlaylistColumn).Order); |
| 85 |
} |
| 86 |
} |
| 87 |
|
| 80 |
public PlaylistView(PlaylistModel model) |
88 |
public PlaylistView(PlaylistModel model) |
| 81 |
{ |
89 |
{ |
| 82 |
// set up columns |
90 |
// set up columns |
|
Lines 121-128
Link Here
|
| 121 |
8, (int)ColumnId.LastPlayed); |
129 |
8, (int)ColumnId.LastPlayed); |
| 122 |
columns.Add(LastPlayedColumn); |
130 |
columns.Add(LastPlayedColumn); |
| 123 |
|
131 |
|
|
|
132 |
columns.Sort(new ColumnSorter()); |
| 133 |
|
| 124 |
foreach(PlaylistColumn plcol in columns) { |
134 |
foreach(PlaylistColumn plcol in columns) { |
| 125 |
InsertColumn(plcol.Column, plcol.Order); |
135 |
AppendColumn(plcol.Column); |
| 126 |
} |
136 |
} |
| 127 |
|
137 |
|
| 128 |
// FIXME: would be nice to have these as PlaylistColumns too... |
138 |
// FIXME: would be nice to have these as PlaylistColumns too... |