[Muine] Small patch to see songs per album in album dialog



hey all,

Attached is a small patch to add a song count per album in the add album
dialog. I got tired of trying to figure out if i'd get 1 song or 20 for
each time i added an album. Don't know if people might find this useful
or not.

-pete

-- 
Peter Johanson
<latexer gentoo org>

Key ID = 0x6EFA3917
Key fingerprint = A90A 2518 57B1 9D20 9B71  A2FF 8649 439B 6EFA 3917
diff -aur muine-0.5.3/src/AddAlbumWindow.cs muine-0.5.3-hacking/src/AddAlbumWindow.cs
--- muine-0.5.3/src/AddAlbumWindow.cs	2004-02-27 16:29:06.000000000 -0500
+++ muine-0.5.3-hacking/src/AddAlbumWindow.cs	2004-04-10 18:05:02.159332696 -0400
@@ -154,7 +154,10 @@
 		if (album.Performers.Length > 0)
 			performers = String.Format (Muine.Catalog.GetString ("Performed by {0}"), StringUtils.JoinHumanReadable (album.Performers, 2));
 
-		r.Text = album.Name + "\n" + StringUtils.JoinHumanReadable (album.Artists, 3) + "\n\n" + performers;
+		if (album.SongCount == 1)
+			r.Text = album.Name + "\n" + StringUtils.JoinHumanReadable (album.Artists, 3) + "\n" + album.SongCount + " Song\n" + performers;
+		else
+			r.Text = album.Name + "\n" + StringUtils.JoinHumanReadable (album.Artists, 3) + "\n" + album.SongCount + " Songs\n" + performers;
 
 		MarkupUtils.CellSetMarkup (r, 0, StringUtils.GetByteLength (album.Name),
 					   false, true, false);
diff -aur muine-0.5.3/src/Album.cs muine-0.5.3-hacking/src/Album.cs
--- muine-0.5.3/src/Album.cs	2004-02-26 05:46:10.000000000 -0500
+++ muine-0.5.3-hacking/src/Album.cs	2004-04-10 17:54:35.002675000 -0400
@@ -31,6 +31,12 @@
 
 	public ArrayList Songs;
 
+	public int SongCount {
+		get {
+			return Songs.Count;
+		}
+	}
+
 	private ArrayList artists;
 	public string [] Artists {
 		get {

Attachment: pgpEmnVTQz6fL.pgp
Description: PGP signature



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]