banshee r3136 - in trunk/banshee: . src/Core/Banshee.ThickClient src/Core/Banshee.ThickClient/Banshee.Collection.Gui
- From: rubenv svn gnome org
- To: svn-commits-list gnome org
- Subject: banshee r3136 - in trunk/banshee: . src/Core/Banshee.ThickClient src/Core/Banshee.ThickClient/Banshee.Collection.Gui
- Date: Sat, 2 Feb 2008 16:10:33 +0000 (GMT)
Author: rubenv
Date: Sat Feb 2 16:10:32 2008
New Revision: 3136
URL: http://svn.gnome.org/viewvc/banshee?rev=3136&view=rev
Log:
2008-02-02 Ruben Vermeersch <ruben savanne be>
* src/Core/Banshee.Services/Banshee.Sources/SourceManager.cs:
* src/Core/Banshee.ThickClient/Banshee.Collection.Gui/ColumnCellTrackNumber.cs: Added.
* src/Core/Banshee.ThickClient/Banshee.Collection.Gui/TrackListView.cs:
* src/Core/Banshee.ThickClient/Makefile.am: Fix a regression from old
Banshee, don't show the track number if it's zero. Just show empty space.
Added:
trunk/banshee/src/Core/Banshee.ThickClient/Banshee.Collection.Gui/ColumnCellTrackNumber.cs
Modified:
trunk/banshee/ChangeLog
trunk/banshee/src/Core/Banshee.ThickClient/Banshee.Collection.Gui/TrackListView.cs
trunk/banshee/src/Core/Banshee.ThickClient/Makefile.am
Added: trunk/banshee/src/Core/Banshee.ThickClient/Banshee.Collection.Gui/ColumnCellTrackNumber.cs
==============================================================================
--- (empty file)
+++ trunk/banshee/src/Core/Banshee.ThickClient/Banshee.Collection.Gui/ColumnCellTrackNumber.cs Sat Feb 2 16:10:32 2008
@@ -0,0 +1,51 @@
+//
+// ColumnCellTrackNumber.cs
+//
+// Author:
+// Ruben Vermeersch <ruben savanne be>
+//
+// Copyright (C) 2008 Novell, Inc.
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+using System;
+
+using Hyena.Data.Gui;
+
+namespace Banshee.Collection.Gui
+{
+ public class ColumnCellTrackNumber : ColumnCellText
+ {
+ public ColumnCellTrackNumber (string property, bool expand) : base (property, expand)
+ {
+ }
+
+ protected override string Text {
+ get {
+ if (BoundObject == null || (int) BoundObject == 0) {
+ return String.Empty;
+ }
+
+ return BoundObject.ToString ();
+ }
+ }
+ }
+}
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 Sat Feb 2 16:10:32 2008
@@ -48,7 +48,7 @@
column_controller.AddRange(
new Column(null, "indicator", new ColumnCellPlaybackIndicator(null), 0.05),
- new SortableColumn("Track", new ColumnCellText("TrackNumber", true), 0.10, "Track"),
+ 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"),
Modified: trunk/banshee/src/Core/Banshee.ThickClient/Makefile.am
==============================================================================
--- trunk/banshee/src/Core/Banshee.ThickClient/Makefile.am (original)
+++ trunk/banshee/src/Core/Banshee.ThickClient/Makefile.am Sat Feb 2 16:10:32 2008
@@ -17,6 +17,7 @@
Banshee.Collection.Gui/ColumnCellDateTime.cs \
Banshee.Collection.Gui/ColumnCellDuration.cs \
Banshee.Collection.Gui/ColumnCellPlaybackIndicator.cs \
+ Banshee.Collection.Gui/ColumnCellTrackNumber.cs \
Banshee.Collection.Gui/CompositeTrackListView.cs \
Banshee.Collection.Gui/TrackListView.cs \
Banshee.Equalizer.Gui/EqualizerBandScale.cs \
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]