From 560f93326a73ecfd8f0a907fe7264c2e641d1260 Mon Sep 17 00:00:00 2001 From: Lars Uebernickel Date: Wed, 23 Apr 2014 11:59:00 +0200 Subject: idomediaplayermenuitem: use small font for track info labels --- src/idomediaplayermenuitem.c | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/src/idomediaplayermenuitem.c b/src/idomediaplayermenuitem.c index 7e6e9d3..9b96d37 100644 --- a/src/idomediaplayermenuitem.c +++ b/src/idomediaplayermenuitem.c @@ -273,6 +273,22 @@ ido_media_player_menu_item_set_album_art (IdoMediaPlayerMenuItem *self, g_object_unref (file); } +static void +gtk_label_set_markup_printf_escaped (GtkLabel *label, + const gchar *format, + ...) +{ + va_list args; + gchar *str; + + va_start (args, format); + str = g_markup_vprintf_escaped (format, args); + gtk_label_set_markup (label, str); + va_end (args); + + g_free (str); +} + static void ido_media_player_menu_item_set_metadata (IdoMediaPlayerMenuItem *self, const gchar *title, @@ -293,9 +309,9 @@ ido_media_player_menu_item_set_metadata (IdoMediaPlayerMenuItem *self, } else { - gtk_label_set_label (GTK_LABEL (self->piece_label), title); - gtk_label_set_label (GTK_LABEL (self->artist_label), artist); - gtk_label_set_label (GTK_LABEL (self->container_label), album); + gtk_label_set_markup_printf_escaped (GTK_LABEL (self->piece_label), "%s", title); + gtk_label_set_markup_printf_escaped (GTK_LABEL (self->artist_label), "%s", artist); + gtk_label_set_markup_printf_escaped (GTK_LABEL (self->container_label), "%s", album); ido_media_player_menu_item_set_album_art (self, art_url); gtk_widget_show (self->metadata_widget); } -- cgit v1.2.3