[banshee] [Audiobook] Customize source/model options
- From: Gabriel Burt <gburt src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [banshee] [Audiobook] Customize source/model options
- Date: Fri, 14 May 2010 22:41:06 +0000 (UTC)
commit 61b9208194624a836f15d46ade80d25a07ff5592
Author: Gabriel Burt <gabriel burt gmail com>
Date: Sat Dec 19 20:49:34 2009 -0800
[Audiobook] Customize source/model options
Don't show the all-works item, and calculate the number of books for
display in the source list.
.../Banshee.Audiobook/AudiobookLibrarySource.cs | 8 ++++++++
.../Banshee.Audiobook/AudiobookModel.cs | 2 ++
2 files changed, 10 insertions(+), 0 deletions(-)
---
diff --git a/src/Extensions/Banshee.Audiobook/Banshee.Audiobook/AudiobookLibrarySource.cs b/src/Extensions/Banshee.Audiobook/Banshee.Audiobook/AudiobookLibrarySource.cs
index d5c248e..5a08183 100644
--- a/src/Extensions/Banshee.Audiobook/Banshee.Audiobook/AudiobookLibrarySource.cs
+++ b/src/Extensions/Banshee.Audiobook/Banshee.Audiobook/AudiobookLibrarySource.cs
@@ -100,6 +100,14 @@ namespace Banshee.Audiobook
get { return XdgBaseDirectorySpec.GetXdgDirectoryUnderHome ("XDG_AUDIOBOOKS_DIR", "Audiobooks"); }
}
+ public override int Count {
+ get { return books_model.UnfilteredCount; }
+ }
+
+ public override int FilteredCount {
+ get { return books_model.Count; }
+ }
+
public override bool ShowBrowser {
get { return false; }
}
diff --git a/src/Extensions/Banshee.Audiobook/Banshee.Audiobook/AudiobookModel.cs b/src/Extensions/Banshee.Audiobook/Banshee.Audiobook/AudiobookModel.cs
index 199b604..f4163a0 100644
--- a/src/Extensions/Banshee.Audiobook/Banshee.Audiobook/AudiobookModel.cs
+++ b/src/Extensions/Banshee.Audiobook/Banshee.Audiobook/AudiobookModel.cs
@@ -47,6 +47,8 @@ namespace Banshee.Audiobook
{
public AudiobookModel (DatabaseSource source, DatabaseTrackListModel trackModel, BansheeDbConnection connection, string uuid) : base (source, trackModel, connection, uuid)
{
+ CalculateUnfilteredCount = true;
+ HasSelectAllItem = false;
}
public override void UpdateSelectAllItem (long count)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]