[Commits] [SCM] claws branch, gtk3, updated. 4.0.0-39-g0b204af1c

paul at claws-mail.org paul at claws-mail.org
Sun Aug 8 18:16:04 CEST 2021


The branch, gtk3 has been updated
       via  0b204af1c0eade156e22de9b82bb9268df14def6 (commit)
      from  9470c29c27e1234e79607b4a50c4e7f9e5644dda (commit)

Summary of changes:
 src/gtk/gtkutils.c | 12 +++---------
 1 file changed, 3 insertions(+), 9 deletions(-)


- Log -----------------------------------------------------------------
commit 0b204af1c0eade156e22de9b82bb9268df14def6
Author: paul <paul at claws-mail.org>
Date:   Sun Aug 8 17:16:00 2021 +0100

    simplify/improve gtkut_stock_button()

diff --git a/src/gtk/gtkutils.c b/src/gtk/gtkutils.c
index e76c37039..8607aef8a 100644
--- a/src/gtk/gtkutils.c
+++ b/src/gtk/gtkutils.c
@@ -926,22 +926,16 @@ GtkWidget *gtkut_get_replace_btn(const gchar *button_label)
 GtkWidget *gtkut_stock_button(const gchar *stock_image, const gchar *label)
 {
 	GtkWidget *button;
-
 	gint i;
 	
 	cm_return_val_if_fail(stock_image != NULL, NULL);
 
-	GtkSettings *default_settings = gtk_settings_get_default();
-	g_object_set(default_settings, "gtk-button-images", TRUE, NULL);
-	
-	if (label != NULL) {
-		button = gtk_button_new_from_icon_name(stock_image, GTK_ICON_SIZE_BUTTON);
+	button = gtk_button_new_from_icon_name(stock_image, GTK_ICON_SIZE_BUTTON);
+	if (label != NULL)
 		gtk_button_set_label(GTK_BUTTON(button), _(label));
-	} else
-		button = gtk_button_new_from_icon_name(stock_image, GTK_ICON_SIZE_BUTTON);
-
 	gtk_button_set_use_underline(GTK_BUTTON(button), TRUE);
 	gtk_button_set_use_stock(GTK_BUTTON(button), TRUE);
+	gtk_button_set_always_show_image(GTK_BUTTON(button), TRUE);
 	
 	return button;
 };

-----------------------------------------------------------------------


hooks/post-receive
-- 
Claws Mail


More information about the Commits mailing list