This is an automated email from the git hooks/post-receive script.

landry pushed a 
commit to branch 
master
in repository panel-plugins/xfce4-mpc-plugin.

commit e76191748ad457d195b7cc2e8821abbb93f15320
Author: Landry Breuil <lan...@xfce.org>
Date:   Fri Dec 7 21:01:50 2018 +0100

    Directly create image in new_button_with_cbk()
    
    While here use gtk_button_set_image() instead of gtk_container_add()
---
 panel-plugin/xfce4-mpc-plugin.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/panel-plugin/xfce4-mpc-plugin.c b/panel-plugin/xfce4-mpc-plugin.c
index bb8f836..afbed6b 100644
--- a/panel-plugin/xfce4-mpc-plugin.c
+++ b/panel-plugin/xfce4-mpc-plugin.c
@@ -729,10 +729,10 @@ static GtkWidget*
 new_button_with_cbk(XfcePanelPlugin * plugin, GtkWidget *parent, gchar* icon, 
gpointer cb, gpointer data)
 {
    GtkWidget *button = xfce_panel_create_button();
-   GtkWidget *image = gtk_image_new();
+   GtkWidget *image = gtk_image_new_from_icon_name(icon, GTK_ICON_SIZE_BUTTON);
    g_object_set_data(G_OBJECT(image), "icon-name", icon);
    g_object_set_data(G_OBJECT(button), "image", image);
-   gtk_container_add(GTK_CONTAINER(button), image);
+   gtk_button_set_image(GTK_BUTTON(button), image);
    xfce_panel_plugin_add_action_widget (plugin, button);
    g_signal_connect (G_OBJECT(button), "button_press_event", G_CALLBACK(cb), 
data);
    g_signal_connect (G_OBJECT(button), "enter_notify_event", 
G_CALLBACK(enter_cb), data);

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.
_______________________________________________
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits

Reply via email to