From 7ff86ccb73f4671b627d984e9045ff0feaf332bf Mon Sep 17 00:00:00 2001 From: Ivan Yarcev Date: Fri, 22 Dec 2023 12:55:08 +0600 Subject: [PATCH] Saving fixes --- source/libublsettingsui-gtk3.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/source/libublsettingsui-gtk3.c b/source/libublsettingsui-gtk3.c index ea9d835..588e30f 100644 --- a/source/libublsettingsui-gtk3.c +++ b/source/libublsettingsui-gtk3.c @@ -102,7 +102,7 @@ void on_save_parameters(GtkWidget *self, template_saving_window *window){ if (yon_dictionary_get(&final_append,section)){ final_append->data=yon_char_unite((char*)final_append->data," ",yon_char_unite(parameter,"=\"",new_value,"\"",NULL),NULL); } else { - yon_dictionary_add_or_create_if_exists_with_data(final_append,section, yon_char_unite(parameter,"=\"",new_value,"\"",NULL)); + yon_dictionary_add_or_create_if_exists_with_data(final_append,section, yon_char_unite(parameter,"=",new_value[0]!='\"'?"\"":"",new_value,new_value[strlen(new_value)-1]!='\"'?"\"":"",NULL)); } } } @@ -199,6 +199,10 @@ template_saving_window *yon_save_proceed(char *path,YON_CONFIG_TYPE type, ...){ gtk_window_set_title(GTK_WINDOW(window->Window),template_app_information.app_title); gtk_label_set_text(GTK_LABEL(window->HeaderTopic),template_app_information.app_title); gtk_image_set_from_pixbuf(GTK_IMAGE(window->HeaderImage),gtk_icon_theme_load_icon_for_scale(gtk_icon_theme_get_default(),yon_char_append("com.ublinux.",template_app_information.app_tech_name),32,1,GTK_ICON_LOOKUP_FORCE_SIZE,NULL)); + GList *list = gtk_tree_view_get_columns(GTK_TREE_VIEW(window->ParametersTree)); + for (int i=0;iCancelButton),"clicked",G_CALLBACK(on_subwindow_close),NULL); g_signal_connect(G_OBJECT(window->SaveButton),"clicked", G_CALLBACK(on_save_parameters),window); g_signal_connect(G_OBJECT(window->ToggleCell),"toggled", G_CALLBACK(on_save_window_parameter_switched),window); @@ -222,7 +226,7 @@ template_saving_window *yon_save_proceed(char *path,YON_CONFIG_TYPE type, ...){ char *rgba_string = gdk_rgba_to_string(&rgba); for (int i=0;ilist,&iter); - gtk_list_store_set(window->list,&iter,0,1,1,compare_keys[i],5,1,-1); + gtk_list_store_set(window->list,&iter,0,0,1,compare_keys[i],5,1,-1); for (int j=0;j