[Xfce4-commits] <parole:ochosi/audiobox> Added title, album, and artist to audiobox widget.
Sean Davis
noreply at xfce.org
Wed Nov 28 13:08:01 CET 2012
Updating branch refs/heads/ochosi/audiobox
to 5383ba33003b6884a18633447aa48e30f59c8ad1 (commit)
from ad1c5a7ba11fe8b74e018b59f1c073c82f13e66e (commit)
commit 5383ba33003b6884a18633447aa48e30f59c8ad1
Author: Sean Davis <smd.seandavis at gmail.com>
Date: Wed Nov 28 07:06:04 2012 -0500
Added title, album, and artist to audiobox widget.
src/parole-player.c | 31 +++++++++++++++++++++++++++++++
1 files changed, 31 insertions(+), 0 deletions(-)
diff --git a/src/parole-player.c b/src/parole-player.c
index 25eaf66..6a96ab1 100644
--- a/src/parole-player.c
+++ b/src/parole-player.c
@@ -1562,17 +1562,48 @@ static void
parole_player_media_tag_cb (ParoleGst *gst, const ParoleStream *stream, ParolePlayer *player)
{
gchar *title;
+ gchar *album;
+ gchar *artist;
if ( player->priv->row )
{
g_object_get (G_OBJECT (stream),
"title", &title,
+ "album", &album,
+ "artist", &artist,
NULL);
+
if ( title )
{
parole_media_list_set_row_name (player->priv->list, player->priv->row, title);
+ gtk_label_set_markup(GTK_LABEL(player->priv->audiobox_title), g_strdup_printf("<b><big>%s</big></b>", title));
g_free (title);
}
+ else
+ {
+ gtk_label_set_markup(GTK_LABEL(player->priv->audiobox_title), g_strdup_printf("<b><big>%s</big></b>", _("Unknown")));
+ }
+
+ if ( album )
+ {
+ gtk_label_set_markup(GTK_LABEL(player->priv->audiobox_album), g_strdup_printf("<big>%s</big>", album));
+ g_free (album);
+ }
+ else
+ {
+ gtk_label_set_markup(GTK_LABEL(player->priv->audiobox_album), g_strdup_printf("<big>%s</big>", _("Unknown")));
+ }
+
+ if ( artist )
+ {
+ gtk_label_set_markup(GTK_LABEL(player->priv->audiobox_artist), g_strdup_printf("<big>%s</big>", artist));
+ g_free (artist);
+ }
+ else
+ {
+ gtk_label_set_markup(GTK_LABEL(player->priv->audiobox_artist), g_strdup_printf("<big>%s</big>", _("Unknown")));
+ }
+
}
}
More information about the Xfce4-commits
mailing list