diff options
author | Juan Pablo Ugarte <juanpablougarte@gmail.com> | 2018-03-03 22:04:30 -0300 |
---|---|---|
committer | Juan Pablo Ugarte <juanpablougarte@gmail.com> | 2018-03-03 22:04:30 -0300 |
commit | da10140dd7baf9a82db9e248b7ab92601a379ca2 (patch) | |
tree | 7fd2e2b9043ba9b1866bfc1c98a3d8b2b8460e63 /src/glade-window.c | |
parent | 24b022936359e753606477af1f23130c7894d008 (diff) | |
download | glade-da10140dd7baf9a82db9e248b7ab92601a379ca2.tar.gz |
GladeWindow: set label on toolbar actions
Diffstat (limited to 'src/glade-window.c')
-rw-r--r-- | src/glade-window.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/glade-window.c b/src/glade-window.c index 30625d77..3ce937ef 100644 --- a/src/glade-window.c +++ b/src/glade-window.c @@ -272,7 +272,6 @@ add_actions (GladeWindow *window, GladeWidget *widget, GList *actions) { GladeWidgetAction *action = l->data; GWActionClass *aclass = glade_widget_action_get_class (action); - GtkWidget *image; if (!aclass->important || !glade_widget_action_get_visible (action)) continue; @@ -283,9 +282,10 @@ add_actions (GladeWindow *window, GladeWidget *widget, GList *actions) continue; } - image = gtk_image_new_from_icon_name ((aclass->stock) ? aclass->stock : "system-run", - GTK_ICON_SIZE_LARGE_TOOLBAR); - item = gtk_tool_button_new (image, NULL); + item = gtk_tool_button_new (NULL, aclass->label); + gtk_tool_button_set_icon_name (GTK_TOOL_BUTTON (item), + (aclass->stock) ? aclass->stock : "system-run"); + if (aclass->label) gtk_widget_set_tooltip_text (GTK_WIDGET (item), aclass->label); @@ -300,7 +300,7 @@ add_actions (GladeWindow *window, GladeWidget *widget, GList *actions) action, action_disconnect, 0); gtk_widget_set_sensitive (GTK_WIDGET (item), - glade_widget_action_get_sensitive (action)); + glade_widget_action_get_sensitive (action)); g_signal_connect (action, "notify::sensitive", G_CALLBACK (activate_action), GTK_WIDGET (item)); |