Fixed main components softlock

pull/356/head
parent b31de076b7
commit 2a78cc0d46

@ -449,7 +449,7 @@ void yon_bootloader_init(main_window *widgets){
int size = 0; int size = 0;
config_str users = yon_config_get_all_by_key(GRUB_PASSWORD_parameter_search,&size); config_str users = yon_config_get_all_by_key(GRUB_PASSWORD_parameter_search,&size);
yon_config_remove_by_list(users,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); 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); gtk_list_store_clear(widgets->BootloadUsersList);

@ -320,7 +320,7 @@ void yon_modules_missed_func(main_window *widgets){
void yon_os_components_init(main_window *widgets){ void yon_os_components_init(main_window *widgets){
if (!main_config.configure_mode){ 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; // int size = 0;
GList *list = gtk_container_get_children(GTK_CONTAINER(widgets->OSSoftwareListBox)); 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){ void yon_software_init(main_window *widgets){
on_status_update(NULL,widgets); on_status_update(NULL,widgets);
if (!main_config.configure_mode){ 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 *list = gtk_container_get_children(GTK_CONTAINER(widgets->AdditionalComponentsList));
GList *iter; GList *iter;
@ -550,7 +550,7 @@ int yon_pacman_software_save(main_window *widgets){
void yon_pacman_init(main_window *widgets){ void yon_pacman_init(main_window *widgets){
on_status_update(NULL,widgets); on_status_update(NULL,widgets);
if (!main_config.configure_mode){ 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); gtk_list_store_clear(widgets->PacmanSoftwareChosenList);
char *pacman_packages = config(packages_parameter); char *pacman_packages = config(packages_parameter);

@ -317,7 +317,7 @@ void yon_userdata_password_open(GtkWidget *, main_window *widgets){
void yon_install_init(main_window *widgets, enum YON_PAGES page){ void yon_install_init(main_window *widgets, enum YON_PAGES page){
if (!main_config.configure_mode){ 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); yon_devices_setup(widgets);

@ -189,7 +189,7 @@ void yon_kernel_addon_resize(main_window *widgets){
void yon_kernel_init(main_window *widgets){ void yon_kernel_init(main_window *widgets){
on_status_update(NULL,widgets); on_status_update(NULL,widgets);
if (!main_config.configure_mode){ 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 *list = gtk_container_get_children(GTK_CONTAINER(widgets->KernelListBox));
GList *iter; GList *iter;

@ -56,7 +56,7 @@ int yon_keyboard_save(main_window *widgets){
void yon_keyboard_init(main_window *widgets){ void yon_keyboard_init(main_window *widgets){
if (!main_config.configure_mode){ 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->KeyboardModelCombo),G_CALLBACK(on_model_changed),widgets);
g_signal_handlers_block_by_func(G_OBJECT(widgets->KeyboardDefaultLayoutsSwitch),G_CALLBACK(on_layout_default_toggled),widgets); g_signal_handlers_block_by_func(G_OBJECT(widgets->KeyboardDefaultLayoutsSwitch),G_CALLBACK(on_layout_default_toggled),widgets);

@ -281,7 +281,7 @@ int yon_language_save(main_window *widgets){
void yon_language_init(main_window *widgets){ void yon_language_init(main_window *widgets){
if (!main_config.configure_mode){ 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); yon_language_update(widgets);
} }

@ -320,7 +320,7 @@ void yon_network_init(main_window *widgets){
int size = 0; int size = 0;
config_str users = yon_config_get_all_by_key(NETWORK_parameter_search,&size); config_str users = yon_config_get_all_by_key(NETWORK_parameter_search,&size);
yon_config_remove_by_list(users,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); 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)); GList *list = gtk_container_get_children(GTK_CONTAINER(widgets->NetworkConnectionsBox));

@ -69,7 +69,7 @@ GtkTreeIter *yon_subcategory_check(GtkTreeStore *target, GtkTreeIter *parent_ite
void yon_packages_tab_init(main_window *widgets){ void yon_packages_tab_init(main_window *widgets){
on_status_update(NULL,widgets); on_status_update(NULL,widgets);
if (!main_config.configure_mode){ 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){ if (!main_config.configure_mode){
yon_config_remove_by_args(packages_parameter,NULL); yon_config_remove_by_args(packages_parameter,NULL);

@ -196,7 +196,7 @@ void on_region_entry_changed(GtkWidget *, main_window *widgets){
void yon_region_init(main_window *widgets){ void yon_region_init(main_window *widgets){
if (!main_config.configure_mode){ 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(); yon_timezone_init();
gtk_combo_box_text_remove_all(GTK_COMBO_BOX_TEXT(widgets->RegionCombo)); gtk_combo_box_text_remove_all(GTK_COMBO_BOX_TEXT(widgets->RegionCombo));

@ -57,12 +57,18 @@ void on_config_local_load(GtkWidget *,main_window *widgets){
} }
void on_config_custom_load(GtkWidget *,main_window *){ void on_config_custom_load(GtkWidget *,main_window *){
char *temp_custom_path = NULL;
if (!yon_char_is_empty(main_config.config_load_path)){ 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; main_config.config_load_path = NULL;
} }
yon_load_proceed(YON_CONFIG_CUSTOM); yon_load_proceed(YON_CONFIG_CUSTOM);
if (!yon_char_is_empty(main_config.config_load_path)){
main_config.load_mode=YON_CONFIG_CUSTOM; 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 *){ void on_config_custom_load_last(GtkWidget *,main_window *){

@ -43,7 +43,7 @@ void on_startup_apps_remove(GtkWidget *self,main_window *widgets){
void yon_startup_apps_init(main_window *widgets){ void yon_startup_apps_init(main_window *widgets){
if (!main_config.configure_mode){ 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; GtkTreeIter iter;
gtk_list_store_clear(widgets->StartupAppsList); gtk_list_store_clear(widgets->StartupAppsList);

@ -51,7 +51,7 @@ void on_startup_services_remove(GtkWidget *self,main_window *widgets){
void yon_startup_services_init(main_window *widgets){ void yon_startup_services_init(main_window *widgets){
if (!main_config.configure_mode){ 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; GtkTreeIter iter;
gtk_list_store_clear(widgets->StartupList); gtk_list_store_clear(widgets->StartupList);

@ -194,7 +194,7 @@ void yon_user_init(main_window *widgets){
} }
} }
yon_config_remove_by_list(users,size); 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); config_str parameters = yon_config_load(config_get_command(main_config.config_load_path),&size);
for (int i=0;i<size;i++){ for (int i=0;i<size;i++){
if (strstr(parameters[i],USERADD_parameter_search)){ if (strstr(parameters[i],USERADD_parameter_search)){

Loading…
Cancel
Save