summaryrefslogtreecommitdiff
path: root/src/sj-main.c
diff options
context:
space:
mode:
authorPhillip Wood <phillip.wood@dunelm.org.uk>2012-06-29 10:08:15 +0100
committerChristophe Fergeau <cfergeau@redhat.com>2013-06-19 17:55:09 +0200
commit828cadc4f1c32434dd55512b792af1dcc86c3657 (patch)
treea12a1a56751b7491fd9a458dc5f918269cf58208 /src/sj-main.c
parent19c92d92e05a931a3db34dbc028ebd70d8252b01 (diff)
Display label, year & country.
With just the album title and artist, it is sometimes impossible to tell the difference between all the releases listed. Adding the recording label, year and country will help to distinguish between different versions of the same album. https://bugzilla.gnome.org/show_bug.cgi?id=674926
Diffstat (limited to 'src/sj-main.c')
-rw-r--r--src/sj-main.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/sj-main.c b/src/sj-main.c
index c036bc3..49b1d3c 100644
--- a/src/sj-main.c
+++ b/src/sj-main.c
@@ -898,6 +898,7 @@ AlbumDetails* multiple_album_dialog(GList *albums)
{
COLUMN_TITLE,
COLUMN_ARTIST,
+ COLUMN_RELEASE_DETAILS,
COLUMN_DETAILS,
COLUMN_COUNT
};
@@ -907,6 +908,7 @@ AlbumDetails* multiple_album_dialog(GList *albums)
GtkCellArea *cell_area = gtk_cell_area_box_new ();
GtkCellRenderer *title_renderer = gtk_cell_renderer_text_new ();
GtkCellRenderer *artist_renderer = gtk_cell_renderer_text_new ();
+ GtkCellRenderer *release_details_renderer = gtk_cell_renderer_text_new ();
dialog = GET_WIDGET ("multiple_dialog");
g_assert (dialog != NULL);
@@ -921,6 +923,7 @@ AlbumDetails* multiple_album_dialog(GList *albums)
gtk_tree_view_column_set_title (column, _("Albums"));
gtk_tree_view_column_pack_start (column, title_renderer, TRUE);
gtk_tree_view_column_pack_start (column, artist_renderer, TRUE);
+ gtk_tree_view_column_pack_start (column, release_details_renderer, TRUE);
g_object_set(title_renderer, "weight", PANGO_WEIGHT_BOLD, "weight-set",
TRUE, NULL);
g_object_set(artist_renderer, "style", PANGO_STYLE_ITALIC, "style-set",
@@ -929,12 +932,15 @@ AlbumDetails* multiple_album_dialog(GList *albums)
COLUMN_TITLE);
gtk_tree_view_column_add_attribute (column, artist_renderer, "text",
COLUMN_ARTIST);
+ gtk_tree_view_column_add_attribute (column, release_details_renderer, "text",
+ COLUMN_RELEASE_DETAILS);
g_signal_connect (albums_listview, "row-activated",
G_CALLBACK (album_row_activated), dialog);
albums_store = gtk_list_store_new (COLUMN_COUNT, G_TYPE_STRING,
- G_TYPE_STRING, G_TYPE_POINTER);
+ G_TYPE_STRING, G_TYPE_STRING,
+ G_TYPE_POINTER);
gtk_tree_view_append_column (GTK_TREE_VIEW (albums_listview), column);
gtk_tree_view_set_model (GTK_TREE_VIEW (albums_listview),
@@ -951,6 +957,7 @@ AlbumDetails* multiple_album_dialog(GList *albums)
GtkTreeIter iter;
AlbumDetails *album = (AlbumDetails*)(albums->data);
GString *album_title = g_string_new (album->title);
+ gchar *release_details = format_release_details (album);
if (album->disc_number > 0 && album->disc_count > 1)
g_string_append_printf (album_title,_(" (Disc %d/%d)"),
@@ -960,11 +967,15 @@ AlbumDetails* multiple_album_dialog(GList *albums)
gtk_list_store_set (albums_store, &iter,
COLUMN_TITLE, album_title->str,
COLUMN_ARTIST, album->artist,
+ COLUMN_RELEASE_DETAILS, release_details,
COLUMN_DETAILS, album,
-1);
+
g_string_free (album_title, TRUE);
+ g_free (release_details);
}
+
/* Select the first album */
if (gtk_tree_model_get_iter_first (GTK_TREE_MODEL (albums_store), &iter))
{