From f1391d84fa6458e5137c2500e3cb998134113536 Mon Sep 17 00:00:00 2001 From: Ivan Yarcev Date: Wed, 17 Jan 2024 10:52:45 +0600 Subject: [PATCH] Added icons to buttons --- source/libublsettingsui-gtk3.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/source/libublsettingsui-gtk3.c b/source/libublsettingsui-gtk3.c index 0b2d722..8bd2f14 100644 --- a/source/libublsettingsui-gtk3.c +++ b/source/libublsettingsui-gtk3.c @@ -325,11 +325,9 @@ template_saving_window *yon_save_proceed(char *path,YON_CONFIG_TYPE type, ...){ } } if (!found){ - if (!yon_config_check_ignore(compare_name)){ - GtkTreeIter itar; - gtk_list_store_append(window->list,&itar); - gtk_list_store_set(window->list,&itar,0,1,1,compare_name,3,compare_value,5,1,6,section,-1); - } + GtkTreeIter itar; + gtk_list_store_append(window->list,&itar); + gtk_list_store_set(window->list,&itar,0,1,1,compare_name,3,compare_value,5,1,6,section,-1); } free(compare_value); free(compare_name); @@ -353,9 +351,12 @@ int yon_confirmation_dialog_call(GtkWidget *self,dialog_confirmation_data *data) gtk_window_set_icon_name(GTK_WINDOW(dialog),yon_char_append("com.ublinux.",template_app_information.app_tech_name)); gtk_window_set_title(GTK_WINDOW(dialog),template_app_information.app_title); gtk_widget_set_size_request(dialog,450,-1); - GList *list = gtk_container_get_children(GTK_CONTAINER(gtk_dialog_get_content_area(GTK_DIALOG(dialog)))); - gtk_widget_set_margin_bottom((GtkWidget*)g_list_nth_data(list,g_list_length(list)-1),5); - gtk_widget_set_margin_end((GtkWidget*)g_list_nth_data(list,g_list_length(list)-1),5); + GList *list = gtk_container_get_children(GTK_CONTAINER(gtk_dialog_get_header_bar(GTK_DIALOG(dialog)))); + GtkWidget *image_cancel = gtk_image_new_from_icon_name("com.ublinux.libublsettingsui-gtk3.cancel-symbolic",GTK_ICON_SIZE_BUTTON); + GtkWidget *image_accept = gtk_image_new_from_icon_name("com.ublinux.libublsettingsui-gtk3.accept-symbolic",GTK_ICON_SIZE_BUTTON); + gtk_button_set_image((GtkButton*)g_list_nth_data(list,0),image_cancel); + gtk_button_set_image((GtkButton*)g_list_nth_data(list,1),image_accept); + g_list_free(list); GtkWidget *header_label = gtk_label_new(template_app_information.app_title); gtk_widget_show(header_label);