[banshee] FLAC-friendly BitRate column
- From: Alexander Kojevnikov <alexk src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [banshee] FLAC-friendly BitRate column
- Date: Tue, 17 Nov 2009 11:02:18 +0000 (UTC)
commit af591d1e5442ddad935d701a6bddeb86a7627024
Author: Alexander Kojevnikov <alexander kojevnikov com>
Date: Tue Nov 17 21:57:29 2009 +1100
FLAC-friendly BitRate column
FLAC-encoded files can (and often do) exceed 1,000 kbps. The commit increases
the max number of decimal places reserved for the bitrate from 3 to 4.
.../ColumnCellPositiveInt.cs | 15 +++++++++++++--
.../DefaultColumnController.cs | 2 +-
2 files changed, 14 insertions(+), 3 deletions(-)
---
diff --git a/src/Core/Banshee.ThickClient/Banshee.Collection.Gui/ColumnCellPositiveInt.cs b/src/Core/Banshee.ThickClient/Banshee.Collection.Gui/ColumnCellPositiveInt.cs
index fbcd126..4e89a01 100644
--- a/src/Core/Banshee.ThickClient/Banshee.Collection.Gui/ColumnCellPositiveInt.cs
+++ b/src/Core/Banshee.ThickClient/Banshee.Collection.Gui/ColumnCellPositiveInt.cs
@@ -34,15 +34,26 @@ namespace Banshee.Collection.Gui
{
public class ColumnCellPositiveInt : ColumnCellText
{
- public bool CultureFormatted { get; set; }
+ private readonly int min_digits;
+ private readonly int max_digits;
+ private bool culture_formatted;
public ColumnCellPositiveInt (string property, bool expand, int min_digits, int max_digits) : base (property, expand)
{
- SetMinMaxStrings ((int)Math.Pow (10, min_digits) - 1, (int)Math.Pow (10, max_digits) - 1);
+ this.min_digits = min_digits;
+ this.max_digits = max_digits;
Alignment = Pango.Alignment.Right;
CultureFormatted = true;
}
+ public bool CultureFormatted {
+ get { return culture_formatted; }
+ set {
+ culture_formatted = value;
+ SetMinMaxStrings ((int)Math.Pow (10, min_digits) - 1, (int)Math.Pow (10, max_digits) - 1);
+ }
+ }
+
protected override string GetText (object obj)
{
if (obj == null) {
diff --git a/src/Core/Banshee.ThickClient/Banshee.Collection.Gui/DefaultColumnController.cs b/src/Core/Banshee.ThickClient/Banshee.Collection.Gui/DefaultColumnController.cs
index b83ea9d..7fa1cdc 100644
--- a/src/Core/Banshee.ThickClient/Banshee.Collection.Gui/DefaultColumnController.cs
+++ b/src/Core/Banshee.ThickClient/Banshee.Collection.Gui/DefaultColumnController.cs
@@ -129,7 +129,7 @@ namespace Banshee.Collection.Gui
disc_combined_column.Title = Catalog.GetString ("Disc #");
disc_combined_column.LongTitle = Catalog.GetString ("Disc & Count");
- ColumnCellPositiveInt br_cell = new ColumnCellPositiveInt (null, true, 3, 3);
+ ColumnCellPositiveInt br_cell = new ColumnCellPositiveInt (null, true, 3, 4);
br_cell.TextFormat = Catalog.GetString ("{0} kbps");
bitrate_column = Create (BansheeQuery.BitRateField, 0.10, false, br_cell);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]