banshee r4616 - in trunk/banshee: . src/Extensions/Banshee.Podcasting src/Extensions/Banshee.Podcasting/Banshee.Podcasting.Data src/Extensions/Banshee.Podcasting/Banshee.Podcasting.Gui src/Libraries/Hyena.Gui/Hyena.Data.Gui
- From: gburt svn gnome org
- To: svn-commits-list gnome org
- Subject: banshee r4616 - in trunk/banshee: . src/Extensions/Banshee.Podcasting src/Extensions/Banshee.Podcasting/Banshee.Podcasting.Data src/Extensions/Banshee.Podcasting/Banshee.Podcasting.Gui src/Libraries/Hyena.Gui/Hyena.Data.Gui
- Date: Thu, 25 Sep 2008 20:01:03 +0000 (UTC)
Author: gburt
Date: Thu Sep 25 20:01:03 2008
New Revision: 4616
URL: http://svn.gnome.org/viewvc/banshee?rev=4616&view=rev
Log:
2008-09-25 Gabriel Burt <gabriel burt gmail com>
* src/Extensions/Banshee.Podcasting/Makefile.am:
* src/Extensions/Banshee.Podcasting/Banshee.Podcasting.csproj:
* src/Extensions/Banshee.Podcasting/Banshee.Podcasting.Gui/ColumnCellYesNo.cs:
New cell for bools that renders yes/no.
* src/Extensions/Banshee.Podcasting/Banshee.Podcasting.Data/PodcastSource.cs:
Get rid of old combined status column, and add downloaded and new columns
that are sortable.
* src/Extensions/Banshee.Podcasting/Banshee.Podcasting.Data/PodcastTrackListModel.cs:
Implement sorting for IsNew/IsDownloaded.
* src/Libraries/Hyena.Gui/Hyena.Data.Gui/ColumnCellText.cs: Whitespace.
Added:
trunk/banshee/src/Extensions/Banshee.Podcasting/Banshee.Podcasting.Gui/ColumnCellYesNo.cs
Modified:
trunk/banshee/ChangeLog
trunk/banshee/src/Extensions/Banshee.Podcasting/Banshee.Podcasting.Data/PodcastSource.cs
trunk/banshee/src/Extensions/Banshee.Podcasting/Banshee.Podcasting.Data/PodcastTrackListModel.cs
trunk/banshee/src/Extensions/Banshee.Podcasting/Banshee.Podcasting.csproj
trunk/banshee/src/Extensions/Banshee.Podcasting/Makefile.am
trunk/banshee/src/Libraries/Hyena.Gui/Hyena.Data.Gui/ColumnCellText.cs
Modified: trunk/banshee/src/Extensions/Banshee.Podcasting/Banshee.Podcasting.Data/PodcastSource.cs
==============================================================================
--- trunk/banshee/src/Extensions/Banshee.Podcasting/Banshee.Podcasting.Data/PodcastSource.cs (original)
+++ trunk/banshee/src/Extensions/Banshee.Podcasting/Banshee.Podcasting.Data/PodcastSource.cs Thu Sep 25 20:01:03 2008
@@ -125,20 +125,27 @@
<visible>true</visible>
</column>
<column>
- <visible>true</visible>
- <title>Published</title>
- <renderer type=""Banshee.Podcasting.Gui.ColumnCellPublished"" property=""PublishedDate"" />
- <sort-key>PublishedDate</sort-key>
+ <visible>false</visible>
+ <title>{2}</title>
+ <renderer type=""Banshee.Podcasting.Gui.ColumnCellYesNo"" property=""IsNew"" />
+ <sort-key>IsNew</sort-key>
+ </column>
+ <column>
+ <visible>false</visible>
+ <title>{3}</title>
+ <renderer type=""Banshee.Podcasting.Gui.ColumnCellYesNo"" property=""IsDownloaded"" />
+ <sort-key>IsDownloaded</sort-key>
</column>
<column>
<visible>true</visible>
- <title>Status</title>
- <renderer type=""Hyena.Data.Gui.ColumnCellText"" property=""StatusText"" />
+ <title>{1}</title>
+ <renderer type=""Banshee.Podcasting.Gui.ColumnCellPublished"" property=""PublishedDate"" />
+ <sort-key>PublishedDate</sort-key>
</column>
<sort-column direction=""desc"">published_date</sort-column>
</column-controller>
",
- Catalog.GetString ("Podcast")
+ Catalog.GetString ("Podcast"), Catalog.GetString ("Published"), Catalog.GetString ("New"), Catalog.GetString ("Downloaded")
));
}
Modified: trunk/banshee/src/Extensions/Banshee.Podcasting/Banshee.Podcasting.Data/PodcastTrackListModel.cs
==============================================================================
--- trunk/banshee/src/Extensions/Banshee.Podcasting/Banshee.Podcasting.Data/PodcastTrackListModel.cs (original)
+++ trunk/banshee/src/Extensions/Banshee.Podcasting/Banshee.Podcasting.Data/PodcastTrackListModel.cs Thu Sep 25 20:01:03 2008
@@ -92,9 +92,14 @@
PodcastItems.PubDate {0}", ascDesc);
break;
- case "DownloadStatus":
+ case "IsNew":
sort_query = String.Format (@"
- PodcastEnclosures.DownloadStatus {0}", ascDesc);
+ -PodcastItems.IsRead {0}, PodcastItems.PubDate DESC", ascDesc);
+ break;
+
+ case "IsDownloaded":
+ sort_query = String.Format (@"
+ PodcastEnclosures.LocalPath IS NOT NULL {0}, PodcastItems.PubDate DESC", ascDesc);
break;
}
Added: trunk/banshee/src/Extensions/Banshee.Podcasting/Banshee.Podcasting.Gui/ColumnCellYesNo.cs
==============================================================================
--- (empty file)
+++ trunk/banshee/src/Extensions/Banshee.Podcasting/Banshee.Podcasting.Gui/ColumnCellYesNo.cs Thu Sep 25 20:01:03 2008
@@ -0,0 +1,55 @@
+//
+// ColumnCellYesNo.cs
+//
+// Authors:
+// Gabriel Burt <gburt novell com>
+//
+// 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 Mono.Unix;
+
+namespace Banshee.Podcasting.Gui
+{
+ public class ColumnCellYesNo : Hyena.Data.Gui.ColumnCellText
+ {
+ private static string yes = Catalog.GetString ("Yes");
+ private static string no = Catalog.GetString ("No");
+
+ public ColumnCellYesNo (string property, bool expand) : base (property, expand)
+ {
+ MinString = no;
+ MaxString = yes;
+ }
+
+ protected override string GetText (object obj)
+ {
+ if (!(obj is bool)) {
+ return String.Empty;
+ }
+
+ return (bool)obj ? yes : no;
+ }
+ }
+}
Modified: trunk/banshee/src/Extensions/Banshee.Podcasting/Banshee.Podcasting.csproj
==============================================================================
--- trunk/banshee/src/Extensions/Banshee.Podcasting/Banshee.Podcasting.csproj (original)
+++ trunk/banshee/src/Extensions/Banshee.Podcasting/Banshee.Podcasting.csproj Thu Sep 25 20:01:03 2008
@@ -92,6 +92,7 @@
<Compile Include="Banshee.Podcasting.Data\DownloadStatusFilterModel.cs" />
<Compile Include="Banshee.Podcasting.Gui\DownloadStatusFilterView.cs" />
<Compile Include="Banshee.Podcasting.Gui\ColumnCellDownloadStatus.cs" />
+ <Compile Include="Banshee.Podcasting.Gui\ColumnCellYesNo.cs" />
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<ProjectExtensions>
Modified: trunk/banshee/src/Extensions/Banshee.Podcasting/Makefile.am
==============================================================================
--- trunk/banshee/src/Extensions/Banshee.Podcasting/Makefile.am (original)
+++ trunk/banshee/src/Extensions/Banshee.Podcasting/Makefile.am Thu Sep 25 20:01:03 2008
@@ -15,6 +15,7 @@
Banshee.Podcasting.Gui/ColumnCellPodcastStatusIndicator.cs \
Banshee.Podcasting.Gui/ColumnCellPublished.cs \
Banshee.Podcasting.Gui/ColumnCellUnheard.cs \
+ Banshee.Podcasting.Gui/ColumnCellYesNo.cs \
Banshee.Podcasting.Gui/DownloadManager/DownloadManagerInterface.cs \
Banshee.Podcasting.Gui/DownloadManager/DownloadUserJob.cs \
Banshee.Podcasting.Gui/DownloadStatusFilterView.cs \
Modified: trunk/banshee/src/Libraries/Hyena.Gui/Hyena.Data.Gui/ColumnCellText.cs
==============================================================================
--- trunk/banshee/src/Libraries/Hyena.Gui/Hyena.Data.Gui/ColumnCellText.cs (original)
+++ trunk/banshee/src/Libraries/Hyena.Gui/Hyena.Data.Gui/ColumnCellText.cs Thu Sep 25 20:01:03 2008
@@ -146,7 +146,6 @@
return row_height + 8;
}
-
#region ISizeRequestCell implementation
public void GetWidthRange (Pango.Layout layout, out int min, out int max)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]