From a7f8a0cdaad783fb53ef7b5f89279a0be969d911 Mon Sep 17 00:00:00 2001 From: Alexey Yakovenko Date: Wed, 17 Mar 2010 20:06:02 +0100 Subject: added band / album artist display to track properties --- plugins/gtkui/deadbeef.glade | 59 ++++++++++++++++++++++++++++++++++++++++++- plugins/gtkui/interface.c | 23 ++++++++++++++++- plugins/gtkui/trkproperties.c | 7 +++++ 3 files changed, 87 insertions(+), 2 deletions(-) (limited to 'plugins') diff --git a/plugins/gtkui/deadbeef.glade b/plugins/gtkui/deadbeef.glade index 7f15644c..37e9e71e 100644 --- a/plugins/gtkui/deadbeef.glade +++ b/plugins/gtkui/deadbeef.glade @@ -1396,7 +1396,7 @@ True - Artist: + Track Artist: False False GTK_JUSTIFY_LEFT @@ -1444,6 +1444,63 @@ + + + True + False + 8 + + + + True + Band/Album Artist: + False + False + GTK_JUSTIFY_LEFT + False + False + 0 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + False + False + + + + + + True + True + False + True + 0 + + True + + False + + + 0 + True + True + + + + + 0 + True + True + + + True diff --git a/plugins/gtkui/interface.c b/plugins/gtkui/interface.c index eef9fe1b..e0fbac31 100644 --- a/plugins/gtkui/interface.c +++ b/plugins/gtkui/interface.c @@ -1070,6 +1070,9 @@ create_trackproperties (void) GtkWidget *hbox25; GtkWidget *label29; GtkWidget *artist; + GtkWidget *hbox35; + GtkWidget *label63; + GtkWidget *band; GtkWidget *hbox26; GtkWidget *label30; GtkWidget *album; @@ -1131,7 +1134,7 @@ create_trackproperties (void) gtk_widget_show (hbox25); gtk_box_pack_start (GTK_BOX (vbox13), hbox25, FALSE, FALSE, 0); - label29 = gtk_label_new ("Artist:"); + label29 = gtk_label_new ("Track Artist:"); gtk_widget_show (label29); gtk_box_pack_start (GTK_BOX (hbox25), label29, FALSE, FALSE, 0); gtk_misc_set_alignment (GTK_MISC (label29), 0, 0.5); @@ -1142,6 +1145,21 @@ create_trackproperties (void) gtk_editable_set_editable (GTK_EDITABLE (artist), FALSE); gtk_entry_set_invisible_char (GTK_ENTRY (artist), 8226); + hbox35 = gtk_hbox_new (FALSE, 8); + gtk_widget_show (hbox35); + gtk_box_pack_start (GTK_BOX (vbox13), hbox35, TRUE, TRUE, 0); + + label63 = gtk_label_new ("Band/Album Artist:"); + gtk_widget_show (label63); + gtk_box_pack_start (GTK_BOX (hbox35), label63, FALSE, FALSE, 0); + gtk_misc_set_alignment (GTK_MISC (label63), 0, 0.5); + + band = gtk_entry_new (); + gtk_widget_show (band); + gtk_box_pack_start (GTK_BOX (hbox35), band, TRUE, TRUE, 0); + gtk_editable_set_editable (GTK_EDITABLE (band), FALSE); + gtk_entry_set_invisible_char (GTK_ENTRY (band), 8226); + hbox26 = gtk_hbox_new (FALSE, 8); gtk_widget_show (hbox26); gtk_box_pack_start (GTK_BOX (vbox13), hbox26, FALSE, FALSE, 0); @@ -1249,6 +1267,9 @@ create_trackproperties (void) GLADE_HOOKUP_OBJECT (trackproperties, hbox25, "hbox25"); GLADE_HOOKUP_OBJECT (trackproperties, label29, "label29"); GLADE_HOOKUP_OBJECT (trackproperties, artist, "artist"); + GLADE_HOOKUP_OBJECT (trackproperties, hbox35, "hbox35"); + GLADE_HOOKUP_OBJECT (trackproperties, label63, "label63"); + GLADE_HOOKUP_OBJECT (trackproperties, band, "band"); GLADE_HOOKUP_OBJECT (trackproperties, hbox26, "hbox26"); GLADE_HOOKUP_OBJECT (trackproperties, label30, "label30"); GLADE_HOOKUP_OBJECT (trackproperties, album, "album"); diff --git a/plugins/gtkui/trkproperties.c b/plugins/gtkui/trkproperties.c index 2322b730..9f196671 100644 --- a/plugins/gtkui/trkproperties.c +++ b/plugins/gtkui/trkproperties.c @@ -75,6 +75,13 @@ show_track_properties_dlg (DB_playItem_t *it) { meta = ""; } gtk_entry_set_text (GTK_ENTRY (w), meta); + // band + w = lookup_widget (widget, "band"); + meta = deadbeef->pl_find_meta (it, "band"); + if (!meta) { + meta = ""; + } + gtk_entry_set_text (GTK_ENTRY (w), meta); // album w = lookup_widget (widget, "album"); meta = deadbeef->pl_find_meta (it, "album"); -- cgit v1.2.3