From 4d7d13b5b8a3f9cca1c3530d10fe9c14de806dec Mon Sep 17 00:00:00 2001 From: Ivan Dmitrievich Yartsev Date: Wed, 11 Mar 2026 17:38:48 +0600 Subject: [PATCH] Fixed kernel saving; Fixed startup services page saving --- source/ubinstall-gtk-components.c | 9 +++++++-- source/ubinstall-gtk-startup-services.c | 4 ---- source/ubinstall-gtk.h | 6 +++--- 3 files changed, 10 insertions(+), 9 deletions(-) diff --git a/source/ubinstall-gtk-components.c b/source/ubinstall-gtk-components.c index 5e42f36..779fea2 100644 --- a/source/ubinstall-gtk-components.c +++ b/source/ubinstall-gtk-components.c @@ -4,7 +4,10 @@ int yon_kernel_save(main_window *widgets){ GList *list = gtk_container_get_children(GTK_CONTAINER(widgets->KernelListBox)); char *config_val = config(packages_parameter); - if (yon_char_is_empty(config_val)) yon_config_register(packages_parameter,packages_parameter_command,NULL); + if (yon_char_is_empty(config_val)) { + yon_config_register(packages_parameter,packages_parameter_command,NULL); + yon_config_set_status(packages_parameter,-1); + } char *enabled_module = NULL; int overall_size = 0; int active_size = 0; @@ -13,7 +16,9 @@ int yon_kernel_save(main_window *widgets){ kernel_row *row = g_object_get_data(G_OBJECT(iter->data),"kernel_row"); if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(row->InstallCheck))){ char *append_str = yon_char_replace(row->modules," ",","); - yon_config_append_element(packages_parameter,append_str,","); + if (!yon_char_check_elements(config_val,append_str,",")){ + yon_config_append_element(packages_parameter,append_str,","); + } free(append_str); active_size++; if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(row->EnableRadio))){ diff --git a/source/ubinstall-gtk-startup-services.c b/source/ubinstall-gtk-startup-services.c index 12af9dd..45dbe95 100644 --- a/source/ubinstall-gtk-startup-services.c +++ b/source/ubinstall-gtk-startup-services.c @@ -207,12 +207,8 @@ int yon_startup_save(main_window *widgets){ } } if (size){ - if (list_size==size){ - yon_config_register(SERVICES_ENABLE_parameter,SERVICES_ENABLE_parameter_command,"auto"); - } else { char *final = yon_char_parsed_to_string(modules,size,","); yon_config_register(SERVICES_ENABLE_parameter,SERVICES_ENABLE_parameter_command,final); - } yon_char_parsed_free(modules,size); } else { yon_config_remove_by_key(SERVICES_ENABLE_parameter); diff --git a/source/ubinstall-gtk.h b/source/ubinstall-gtk.h index 5f2bcc8..35647e1 100755 --- a/source/ubinstall-gtk.h +++ b/source/ubinstall-gtk.h @@ -183,7 +183,7 @@ layout && /description:/ {\ #define xkbvariant_parameter_command "ubconfig --source global get [autoinstall] AUTOINSTALL['ubconfig set [keyboard] XKBVARIANT']" #define xkboptions_parameter "AUTOINSTALL[ubconfig set [keyboard] XKBOPTIONS]" #define xkboptions_parameter_command "ubconfig --source global get [autoinstall] AUTOINSTALL['ubconfig set [keyboard] XKBOPTIONS']" -#define hostname_parameter "AUTOINSTALL[ubconfig set [system] HOSTNAMEe]" +#define hostname_parameter "AUTOINSTALL[ubconfig set [system] HOSTNAME]" #define hostname_parameter_command "ubconfig --source global get [autoinstall] AUTOINSTALL['ubconfig set [system] HOSTNAME']" #define zone_parameter "AUTOINSTALL[ubconfig set [clock] ZONE]" #define zone_parameter_command "ubconfig --source global get [autoinstall] AUTOINSTALL['ubconfig set [clock] ZONE']" @@ -229,8 +229,8 @@ layout && /description:/ {\ #define USERADD_parameter_command(target) yon_char_unite("ubconfig --source global get autoinstall AUTOINSTALL['ubconfig set [users] USERADD[", target, "]']", NULL) #define KERNEL_BOOT_parameter "AUTOINSTALL[ubconfig set [boot] KERNEL_BOOT]" #define KERNEL_BOOT_parameter_command "ubconfig --source global get autoinstall AUTOINSTALL['ubconfig set [boot] KERNEL_BOOT']" -#define SERVICES_ENABLE_parameter "AUTOINSTALL[ubconfig set [boot] SERVICES_ENABLE]" -#define SERVICES_ENABLE_parameter_command "ubconfig get autoinstall AUTOINSTALL['ubconfig set [boot] SERVICES_ENABLE']" +#define SERVICES_ENABLE_parameter "AUTOINSTALL[ubconfig set [system] SERVICES_ENABLE]" +#define SERVICES_ENABLE_parameter_command "ubconfig get autoinstall AUTOINSTALL['ubconfig set [system] SERVICES_ENABLE']" #define AUTOEXEC_parameter "AUTOINSTALL[ubconfig set [desktop] AUTOEXEC[@users]]" #define AUTOEXEC_parameter_command "ubconfig get autoinstall AUTOINSTALL['ubconfig set [desktop] AUTOEXEC[@users]']" #define GRUB_SUPERUSERS_parameter "AUTOINSTALL[ubconfig set [boot] GRUB_SUPERUSERS]"