diff --git a/source/ubinstall-gtk-components.c b/source/ubinstall-gtk-components.c index 2f46b4f..36483b1 100644 --- a/source/ubinstall-gtk-components.c +++ b/source/ubinstall-gtk-components.c @@ -20,13 +20,12 @@ int yon_kernel_save(main_window *widgets){ } } - if (yon_char_is_empty(enabled_module)){ + if (!yon_char_is_empty(enabled_module)){ yon_config_register(KERNEL_BOOT_parameter,KERNEL_BOOT_parameter_command,enabled_module); } else { yon_config_remove_by_key(KERNEL_BOOT_parameter); } - return 1; } @@ -124,6 +123,10 @@ gboolean yon_os_component_insert(struct row_data *row_input){ main_window *widgets = row_input->widgets; gtk_list_box_insert(GTK_LIST_BOX(widgets->OSSoftwareListBox),row->row,-1); yon_os_row_setup(row,row_input->name,row_input->version,row_input->tags,row_input->description); + char *modules = config(modules_parameter); + if (yon_char_is_empty(modules)){ + gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(row->InstallCheck),1); + } return G_SOURCE_REMOVE; } @@ -201,9 +204,12 @@ int yon_software_save(main_window *widgets){ GList *list = gtk_container_get_children(GTK_CONTAINER(widgets->AdditionalComponentsList)); GList *iter; char *config_val = config(modules_extra_parameter); + if (yon_char_is_empty(config_val)){ + yon_config_register(modules_extra_parameter,modules_extra_parameter_command,""); + } for(iter = list;iter;iter=iter->next){ os_row *row = g_object_get_data(iter->data,"kernel_row"); - char *target = row->name; + char *target = row->name; int status = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(row->InstallCheck)); if (status){ if (!yon_char_check_element(config_val,target,",")){ @@ -221,7 +227,14 @@ gboolean yon_software_insert(struct row_data *row_input){ main_window *widgets = row_input->widgets; gtk_list_box_insert(GTK_LIST_BOX(widgets->AdditionalComponentsList),row->row,-1); yon_os_row_setup(row,row_input->name,row_input->version,row_input->tags,row_input->description); - gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(row->InstallCheck),0); + + char *modules = config(modules_extra_parameter); + if (yon_char_check_element(modules,row_input->name,",")){ + gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(row->InstallCheck),1); + } else { + gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(row->InstallCheck),0); + } + // gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(row->InstallCheck),0); return G_SOURCE_REMOVE; } diff --git a/source/ubinstall-gtk-keyboard.c b/source/ubinstall-gtk-keyboard.c index 556083f..659fa74 100644 --- a/source/ubinstall-gtk-keyboard.c +++ b/source/ubinstall-gtk-keyboard.c @@ -13,8 +13,15 @@ int yon_keyboard_save(main_window *widgets){ char *final = NULL; for_iter(widgets->LayoutsList, &iter){ char *target; - gtk_tree_model_get(GTK_TREE_MODEL(widgets->LayoutsList),&iter,0,&target,-1); - char *temp = yon_char_append_element(final,target,","); + char *code; + gtk_tree_model_get(GTK_TREE_MODEL(widgets->LayoutsList),&iter,0,&target,1,&code,-1); + char *temp = NULL; + if (!yon_char_is_empty(code)){ + char *tmp = yon_char_unite(target,"_",code,NULL); + temp = yon_char_append_element(final,tmp,","); + } else { + temp = yon_char_append_element(final,target,","); + } if (!yon_char_is_empty(final)) free(final); final = temp; } @@ -149,6 +156,7 @@ void on_layouts_accept(GtkWidget *self, layouts_window *window){ main_window *widgets = g_object_get_data(G_OBJECT(window->Window),"widgets"); gtk_list_store_clear(widgets->LayoutsList); GtkTreeIter iter; + GtkTreeIter child_iter; for_iter (window->list,&iter){ int active; char *target; @@ -156,6 +164,18 @@ void on_layouts_accept(GtkWidget *self, layouts_window *window){ if (active){ yon_layout_load(target,widgets); } + if (gtk_tree_model_iter_children(GTK_TREE_MODEL(window->list),&child_iter,&iter)){ + for (int valid2=1;valid2;valid2=gtk_tree_model_iter_next(GTK_TREE_MODEL(window->list),&child_iter)){ + char *code; + gtk_tree_model_get(GTK_TREE_MODEL(window->list),&child_iter,0,&target,1,&code,3,&active,-1); + if (active){ + char *full_code = yon_char_unite(target,"_",code,NULL); + yon_layout_load(full_code,widgets); + free(full_code); + } + } + + } } on_subwindow_close(self); } diff --git a/source/ubinstall-gtk-network.c b/source/ubinstall-gtk-network.c index 1461e9b..9908e2c 100644 --- a/source/ubinstall-gtk-network.c +++ b/source/ubinstall-gtk-network.c @@ -286,6 +286,11 @@ int yon_network_save(main_window *widgets){ } void yon_network_init(main_window *widgets){ + GList *list = gtk_container_get_children(GTK_CONTAINER(widgets->NetworkConnectionsBox)); + GList *iter; + for (iter=list;iter;iter=iter->next){ + gtk_widget_destroy(list->data); + } int size; config_str network_types = yon_resource_open_file(network_path,&size); for (int i=1;i1 - - - True - False - - - False - True - 2 - - True diff --git a/ubinstall-gtk-os-row.glade b/ubinstall-gtk-os-row.glade index 9d68dbf..16900aa 100644 --- a/ubinstall-gtk-os-row.glade +++ b/ubinstall-gtk-os-row.glade @@ -12,7 +12,6 @@ True True False - True True diff --git a/ubinstall-gtk.glade b/ubinstall-gtk.glade index ae65003..6ff08c1 100644 --- a/ubinstall-gtk.glade +++ b/ubinstall-gtk.glade @@ -12150,6 +12150,11 @@ separately into the selected partition. False 1 True + + + False + + False @@ -12255,7 +12260,9 @@ separately into the selected partition. True - True + False + False + * True @@ -12961,6 +12968,11 @@ separately into the selected partition. False 1 True + + + False + + False @@ -13065,7 +13077,9 @@ separately into the selected partition. True - True + False + False + * True