[balsa] tiny code simplification



commit 4ed99b24ea82b821a3acf776167a9e83381d1cf9
Author: Albrecht Dreß <albrecht dress arcor de>
Date:   Tue Dec 22 13:42:13 2020 +0100

    tiny code simplification
    
    use gtk_button_new_from_icon_name() instead of gtk_container_add()
    
    Signed-off-by: Albrecht Dreß <albrecht dress arcor de>

 src/main-window.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)
---
diff --git a/src/main-window.c b/src/main-window.c
index 1a156ac19..49ea98d6f 100644
--- a/src/main-window.c
+++ b/src/main-window.c
@@ -546,10 +546,7 @@ bw_create_index_widget(BalsaWindow *bw)
     g_signal_connect(priv->sos_entry, "notify::has-focus",
                      G_CALLBACK(bw_check_filter), bw);
 
-    button = gtk_button_new();
-    gtk_container_add(GTK_CONTAINER(button),
-                      gtk_image_new_from_icon_name("gtk-ok",
-                                                    GTK_ICON_SIZE_BUTTON));
+    button = gtk_button_new_from_icon_name("gtk-ok", GTK_ICON_SIZE_BUTTON);
     g_signal_connect(priv->sos_entry, "icon-release",
                      G_CALLBACK(bw_sos_icon_release), button);
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]