summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhillip Wood <phillip.wood@dunelm.org.uk>2012-11-15 11:01:07 +0000
committerChristophe Fergeau <cfergeau@redhat.com>2013-06-19 17:55:09 +0200
commit19c92d92e05a931a3db34dbc028ebd70d8252b01 (patch)
treec5cab5154afb2a3ddff6745e2d65710df6459c4a
parent442e640cb4e5d49b0141dff973b3ee2f00cafdee (diff)
Append 'Disc (m/n)' to title.
Enables disambiguation between the same album released as a single or part of a box set. Only shown when there is more than on disc in a set. https://bugzilla.gnome.org/show_bug.cgi?id=674926
-rw-r--r--src/sj-main.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/sj-main.c b/src/sj-main.c
index c3df7c5..c036bc3 100644
--- a/src/sj-main.c
+++ b/src/sj-main.c
@@ -950,14 +950,20 @@ AlbumDetails* multiple_album_dialog(GList *albums)
for (; albums ; albums = g_list_next (albums)) {
GtkTreeIter iter;
AlbumDetails *album = (AlbumDetails*)(albums->data);
+ GString *album_title = g_string_new (album->title);
+
+ if (album->disc_number > 0 && album->disc_count > 1)
+ g_string_append_printf (album_title,_(" (Disc %d/%d)"),
+ album->disc_number, album->disc_count);
gtk_list_store_append (albums_store, &iter);
gtk_list_store_set (albums_store, &iter,
- COLUMN_TITLE, album->title,
+ COLUMN_TITLE, album_title->str,
COLUMN_ARTIST, album->artist,
COLUMN_DETAILS, album,
-1);
- }
+ g_string_free (album_title, TRUE);
+ }
/* Select the first album */
if (gtk_tree_model_get_iter_first (GTK_TREE_MODEL (albums_store), &iter))