diff --git a/source/ubinstall-gtk-bootloader.c b/source/ubinstall-gtk-bootloader.c index 28762bf..c780787 100644 --- a/source/ubinstall-gtk-bootloader.c +++ b/source/ubinstall-gtk-bootloader.c @@ -449,7 +449,7 @@ void yon_bootloader_init(main_window *widgets){ int size = 0; config_str users = yon_config_get_all_by_key(GRUB_PASSWORD_parameter_search,&size); yon_config_remove_by_list(users,size); - yon_config_update_by_args(GRUB_TIMEOUT_parameter,GRUB_SUPERUSERS_parameter,NULL); + yon_config_update_by_args(main_config.config_load_path, GRUB_TIMEOUT_parameter,GRUB_SUPERUSERS_parameter,NULL); yon_config_load_config(YON_CONFIG_CUSTOM,ubconfig_load_command(main_config.config_load_path),GRUB_PASSWORD_parameter_command_all,NULL); } gtk_list_store_clear(widgets->BootloadUsersList); diff --git a/source/ubinstall-gtk-components.c b/source/ubinstall-gtk-components.c index e725c7b..d76673a 100644 --- a/source/ubinstall-gtk-components.c +++ b/source/ubinstall-gtk-components.c @@ -320,7 +320,7 @@ void yon_modules_missed_func(main_window *widgets){ void yon_os_components_init(main_window *widgets){ if (!main_config.configure_mode){ - yon_config_update_by_args(modules_parameter,NULL); + yon_config_update_by_args(main_config.config_load_path, modules_parameter,NULL); } // int size = 0; GList *list = gtk_container_get_children(GTK_CONTAINER(widgets->OSSoftwareListBox)); @@ -474,7 +474,7 @@ gboolean yon_software_insert(struct row_data *row_input){ void yon_software_init(main_window *widgets){ on_status_update(NULL,widgets); if (!main_config.configure_mode){ - yon_config_update_by_args(packages_parameter,NULL); + yon_config_update_by_args(main_config.config_load_path, packages_parameter,NULL); } GList *list = gtk_container_get_children(GTK_CONTAINER(widgets->AdditionalComponentsList)); GList *iter; @@ -550,7 +550,7 @@ int yon_pacman_software_save(main_window *widgets){ void yon_pacman_init(main_window *widgets){ on_status_update(NULL,widgets); if (!main_config.configure_mode){ - yon_config_update_by_args(packages_parameter,NULL); + yon_config_update_by_args(main_config.config_load_path, packages_parameter,NULL); } gtk_list_store_clear(widgets->PacmanSoftwareChosenList); char *pacman_packages = config(packages_parameter); diff --git a/source/ubinstall-gtk-installation.c b/source/ubinstall-gtk-installation.c index 80daa2d..e35c10c 100644 --- a/source/ubinstall-gtk-installation.c +++ b/source/ubinstall-gtk-installation.c @@ -317,7 +317,7 @@ void yon_userdata_password_open(GtkWidget *, main_window *widgets){ void yon_install_init(main_window *widgets, enum YON_PAGES page){ if (!main_config.configure_mode){ - yon_config_update_by_args(AUTOINSTALL_TYPE_INSTALL,device_parameter,part_label_parameter,part_fs_type_parameter,NULL); + yon_config_update_by_args(main_config.config_load_path, AUTOINSTALL_TYPE_INSTALL,device_parameter,part_label_parameter,part_fs_type_parameter,NULL); } yon_devices_setup(widgets); diff --git a/source/ubinstall-gtk-kernel.c b/source/ubinstall-gtk-kernel.c index 0392142..657f854 100644 --- a/source/ubinstall-gtk-kernel.c +++ b/source/ubinstall-gtk-kernel.c @@ -189,7 +189,7 @@ void yon_kernel_addon_resize(main_window *widgets){ void yon_kernel_init(main_window *widgets){ on_status_update(NULL,widgets); if (!main_config.configure_mode){ - yon_config_update_by_args(packages_parameter,KERNEL_BOOT_parameter,NULL); + yon_config_update_by_args(main_config.config_load_path, packages_parameter,KERNEL_BOOT_parameter,NULL); } GList *list = gtk_container_get_children(GTK_CONTAINER(widgets->KernelListBox)); GList *iter; diff --git a/source/ubinstall-gtk-keyboard.c b/source/ubinstall-gtk-keyboard.c index a4714c7..11e8206 100644 --- a/source/ubinstall-gtk-keyboard.c +++ b/source/ubinstall-gtk-keyboard.c @@ -56,7 +56,7 @@ int yon_keyboard_save(main_window *widgets){ void yon_keyboard_init(main_window *widgets){ if (!main_config.configure_mode){ - yon_config_update_by_args(xkbmodel_parameter,num_lock_boot_parameter,NULL); + yon_config_update_by_args(main_config.config_load_path, xkbmodel_parameter,num_lock_boot_parameter,NULL); } g_signal_handlers_block_by_func(G_OBJECT(widgets->KeyboardModelCombo),G_CALLBACK(on_model_changed),widgets); g_signal_handlers_block_by_func(G_OBJECT(widgets->KeyboardDefaultLayoutsSwitch),G_CALLBACK(on_layout_default_toggled),widgets); diff --git a/source/ubinstall-gtk-language.c b/source/ubinstall-gtk-language.c index 5a524e9..f759ff0 100644 --- a/source/ubinstall-gtk-language.c +++ b/source/ubinstall-gtk-language.c @@ -281,7 +281,7 @@ int yon_language_save(main_window *widgets){ void yon_language_init(main_window *widgets){ if (!main_config.configure_mode){ - yon_config_update_by_args(lang_parameter, locale_parameter,NULL); + yon_config_update_by_args(main_config.config_load_path, lang_parameter, locale_parameter,NULL); } yon_language_update(widgets); } diff --git a/source/ubinstall-gtk-network.c b/source/ubinstall-gtk-network.c index 5212ee9..b694aab 100644 --- a/source/ubinstall-gtk-network.c +++ b/source/ubinstall-gtk-network.c @@ -320,7 +320,7 @@ void yon_network_init(main_window *widgets){ int size = 0; config_str users = yon_config_get_all_by_key(NETWORK_parameter_search,&size); yon_config_remove_by_list(users,size); - yon_config_update_by_args(DOMAIN_parameter,DOMAIN_admanger_parameter,NTPSERVERS_parameter,hostname_parameter,NULL); + yon_config_update_by_args(main_config.config_load_path, DOMAIN_parameter,DOMAIN_admanger_parameter,NTPSERVERS_parameter,hostname_parameter,NULL); yon_config_load_config(YON_CONFIG_CUSTOM,ubconfig_load_command(main_config.config_load_path),NETWORK_parameter_all,NULL); } GList *list = gtk_container_get_children(GTK_CONTAINER(widgets->NetworkConnectionsBox)); diff --git a/source/ubinstall-gtk-packages.c b/source/ubinstall-gtk-packages.c index d09b0a8..397086f 100644 --- a/source/ubinstall-gtk-packages.c +++ b/source/ubinstall-gtk-packages.c @@ -69,7 +69,7 @@ GtkTreeIter *yon_subcategory_check(GtkTreeStore *target, GtkTreeIter *parent_ite void yon_packages_tab_init(main_window *widgets){ on_status_update(NULL,widgets); if (!main_config.configure_mode){ - yon_config_update_by_args(packages_parameter,NULL); + yon_config_update_by_args(main_config.config_load_path, packages_parameter,NULL); } if (!main_config.configure_mode){ yon_config_remove_by_args(packages_parameter,NULL); diff --git a/source/ubinstall-gtk-region.c b/source/ubinstall-gtk-region.c index 818cff7..e335b74 100644 --- a/source/ubinstall-gtk-region.c +++ b/source/ubinstall-gtk-region.c @@ -196,7 +196,7 @@ void on_region_entry_changed(GtkWidget *, main_window *widgets){ void yon_region_init(main_window *widgets){ if (!main_config.configure_mode){ - yon_config_update_by_args(zone_parameter,NULL); + yon_config_update_by_args(main_config.config_load_path, zone_parameter,NULL); } yon_timezone_init(); gtk_combo_box_text_remove_all(GTK_COMBO_BOX_TEXT(widgets->RegionCombo)); diff --git a/source/ubinstall-gtk-saving.c b/source/ubinstall-gtk-saving.c index 53f018f..1994897 100644 --- a/source/ubinstall-gtk-saving.c +++ b/source/ubinstall-gtk-saving.c @@ -57,12 +57,18 @@ void on_config_local_load(GtkWidget *,main_window *widgets){ } void on_config_custom_load(GtkWidget *,main_window *){ + char *temp_custom_path = NULL; if (!yon_char_is_empty(main_config.config_load_path)){ - free(main_config.config_load_path); + temp_custom_path = main_config.config_load_path; main_config.config_load_path = NULL; } yon_load_proceed(YON_CONFIG_CUSTOM); - main_config.load_mode=YON_CONFIG_CUSTOM; + if (!yon_char_is_empty(main_config.config_load_path)){ + main_config.load_mode=YON_CONFIG_CUSTOM; + free(temp_custom_path); + } else { + main_config.config_load_path = temp_custom_path; + } } void on_config_custom_load_last(GtkWidget *,main_window *){ diff --git a/source/ubinstall-gtk-startup-apps.c b/source/ubinstall-gtk-startup-apps.c index 71489b1..c2a8fd0 100644 --- a/source/ubinstall-gtk-startup-apps.c +++ b/source/ubinstall-gtk-startup-apps.c @@ -43,7 +43,7 @@ void on_startup_apps_remove(GtkWidget *self,main_window *widgets){ void yon_startup_apps_init(main_window *widgets){ if (!main_config.configure_mode){ - yon_config_update_by_args(AUTOEXEC_parameter,NULL); + yon_config_update_by_args(main_config.config_load_path, AUTOEXEC_parameter,NULL); } GtkTreeIter iter; gtk_list_store_clear(widgets->StartupAppsList); diff --git a/source/ubinstall-gtk-startup-services.c b/source/ubinstall-gtk-startup-services.c index 9d4a656..2ffbc04 100644 --- a/source/ubinstall-gtk-startup-services.c +++ b/source/ubinstall-gtk-startup-services.c @@ -51,7 +51,7 @@ void on_startup_services_remove(GtkWidget *self,main_window *widgets){ void yon_startup_services_init(main_window *widgets){ if (!main_config.configure_mode){ - yon_config_update_by_args(SERVICES_ENABLE_parameter,NULL); + yon_config_update_by_args(main_config.config_load_path, SERVICES_ENABLE_parameter,NULL); } GtkTreeIter iter; gtk_list_store_clear(widgets->StartupList); diff --git a/source/ubinstall-gtk-users.c b/source/ubinstall-gtk-users.c index 5efd748..80ca30e 100644 --- a/source/ubinstall-gtk-users.c +++ b/source/ubinstall-gtk-users.c @@ -194,7 +194,7 @@ void yon_user_init(main_window *widgets){ } } yon_config_remove_by_list(users,size); - yon_config_update_by_args(autologin_parameter,root_password_parameter,NULL); + yon_config_update_by_args(main_config.config_load_path, autologin_parameter,root_password_parameter,NULL); config_str parameters = yon_config_load(config_get_command(main_config.config_load_path),&size); for (int i=0;i