From ced4f26e053bff5bb04205f623a179fc97fdfe52 Mon Sep 17 00:00:00 2001 From: Qball Cow Date: Sun, 25 Sep 2011 15:14:31 +0200 Subject: [PATCH] Fix prev/play/stop/next buttons --- glade/playlist3.ui | 39 ++++++++++++++++++++++++--------------- src/playlist3.c | 17 +++++++++-------- 2 files changed, 33 insertions(+), 23 deletions(-) diff --git a/glade/playlist3.ui b/glade/playlist3.ui index 1794e489..0f9a589e 100644 --- a/glade/playlist3.ui +++ b/glade/playlist3.ui @@ -443,14 +443,18 @@ True + False MPDPrevious True False none False - True - gtk-media-previous - True + + + True + gtk-media-previous + + False @@ -459,15 +463,19 @@ - + True + False MPDStop True True none - False - gtk-media-stop - True + + + True + gtk-media-stop + + False @@ -478,12 +486,17 @@ True + False MPDPlayPause True False none - True - gtk-media-play + + + True + gtk-media-play + + False @@ -494,21 +507,17 @@ True + False MPDNext True False - False none - gtk-media-next - True - False diff --git a/src/playlist3.c b/src/playlist3.c index 8b21d363..c6993574 100644 --- a/src/playlist3.c +++ b/src/playlist3.c @@ -1694,9 +1694,10 @@ static void playlist_status_changed(MpdObj * mi, ChangedStatusType what, void *u * Update the image in the menu */ gtk_action_set_stock_id(GTK_ACTION(gtk_builder_get_object(pl3_xml, "MPDPlayPause")), "gtk-media-pause"); - gtk_button_set_label(GTK_BUTTON + gtk_image_set_from_stock(GTK_IMAGE (gtk_builder_get_object - (pl3_xml, "play_button")), "gtk-media-pause"); + (pl3_xml, "play_button_image")), "gtk-media-pause", + GTK_ICON_SIZE_MENU); /** * Update window title @@ -1731,10 +1732,10 @@ static void playlist_status_changed(MpdObj * mi, ChangedStatusType what, void *u /** Update menu and button images */ gtk_action_set_stock_id(GTK_ACTION(gtk_builder_get_object(pl3_xml, "MPDPlayPause")), "gtk-media-play"); - gtk_button_set_label(GTK_BUTTON + gtk_image_set_from_stock(GTK_IMAGE (gtk_builder_get_object - (pl3_xml, "play_button")), "gtk-media-play"); - + (pl3_xml, "play_button_image")), "gtk-media-play", + GTK_ICON_SIZE_MENU); /** * Set paused in Window string */ @@ -1766,10 +1767,10 @@ static void playlist_status_changed(MpdObj * mi, ChangedStatusType what, void *u /* Make sure it's reset correctly */ gmpc_progress_set_time(GMPC_PROGRESS(new_pb), 0, 0); - gtk_button_set_label(GTK_BUTTON + gtk_image_set_from_stock(GTK_IMAGE (gtk_builder_get_object - (pl3_xml, "play_button")), "gtk-media-play"); - + (pl3_xml, "play_button_image")), "gtk-media-play", + GTK_ICON_SIZE_MENU); if (gmpc_profiles_get_number_of_profiles(gmpc_profiles) > 1) { gchar *id = gmpc_profiles_get_current(gmpc_profiles); -- 2.11.4.GIT