From f2db718bf85ba581eee500cf1c3fb5248e510199 Mon Sep 17 00:00:00 2001 From: Ivan Dmitrievich Yartsev Date: Mon, 1 Dec 2025 11:09:25 +0600 Subject: [PATCH 01/10] Fixed language window searching --- source/ubinstall-gtk-keyboard.c | 8 +++++++- source/ubinstall-gtk-region.c | 1 - source/ubinstall-gtk.h | 3 ++- ubinstall-gtk-language.glade | 2 +- 4 files changed, 10 insertions(+), 4 deletions(-) diff --git a/source/ubinstall-gtk-keyboard.c b/source/ubinstall-gtk-keyboard.c index fb9508a..0c2f096 100644 --- a/source/ubinstall-gtk-keyboard.c +++ b/source/ubinstall-gtk-keyboard.c @@ -157,6 +157,11 @@ void on_language_window_accept(GtkWidget *,dictionary *dict){ free(window); } +void yon_focus_set(GtkWidget *,GtkWidget *target){ + gtk_widget_grab_focus(target); + +} + ubinstall_language_window *yon_ubinstall_language_new(){ ubinstall_language_window *window = malloc(sizeof(ubinstall_language_window)); GtkBuilder *builder = gtk_builder_new_from_resource(glade_path_ubinstall_language); @@ -171,6 +176,7 @@ ubinstall_language_window *yon_ubinstall_language_new(){ window->ToggleRenderer=GTK_CELL_RENDERER(gtk_builder_get_object(builder,"ToggleRenderer")); g_signal_connect(G_OBJECT(window->DefaultCheck),"toggled",G_CALLBACK(yon_gtk_widget_set_sensitive_from_toggle_button_inversed),window->LanguagesTree); + g_signal_connect(G_OBJECT(window->DefaultCheck),"toggled",G_CALLBACK(yon_focus_set),window->LanguagesTree); g_signal_connect(G_OBJECT(window->ToggleRenderer),"toggled",G_CALLBACK(yon_language_selection_changed),window); g_signal_connect(G_OBJECT(window->CancelButton),"clicked",G_CALLBACK(on_subwindow_close),NULL); return window; @@ -183,7 +189,7 @@ void on_language_clicked(GtkWidget *, main_window *widgets){ yon_gtk_list_store_copy_full(window->liststore1,widgets->LanguagesList); gtk_tree_view_set_model(GTK_TREE_VIEW(window->LanguagesTree),GTK_TREE_MODEL(window->liststore1)); yon_gtk_window_setup(GTK_WINDOW(window->MainWindow),GTK_WINDOW(widgets->MainWindow),TITLE_LABEL,icon_path,"language-chooser-window"); - + gtk_tree_view_set_search_column(GTK_TREE_VIEW(window->LanguagesTree),2); if (yon_char_is_empty(gtk_entry_get_text(GTK_ENTRY(widgets->AvailableLanguagesEntry)))){ gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(window->DefaultCheck),1); } diff --git a/source/ubinstall-gtk-region.c b/source/ubinstall-gtk-region.c index e8ff73c..5a51c75 100644 --- a/source/ubinstall-gtk-region.c +++ b/source/ubinstall-gtk-region.c @@ -150,5 +150,4 @@ void yon_region_init(main_window *widgets){ if (!yon_char_is_empty(lang_param)){ gtk_combo_box_set_active_id(GTK_COMBO_BOX(widgets->LanguagesCombo),lang_param); } - } \ No newline at end of file diff --git a/source/ubinstall-gtk.h b/source/ubinstall-gtk.h index 2541f38..f79b928 100755 --- a/source/ubinstall-gtk.h +++ b/source/ubinstall-gtk.h @@ -1207,4 +1207,5 @@ int yon_advanced_section_append(advanced_section *section); gboolean on_format_changed(GtkWidget *self, gboolean state, advanced_partition *part); int yon_layouts_get(); void on_link(GtkWidget *self, char* uri, gpointer ); -void on_source_changed(GtkComboBox *self); \ No newline at end of file +void on_source_changed(GtkComboBox *self); +void yon_focus_set(GtkWidget *,GtkWidget *target); \ No newline at end of file diff --git a/ubinstall-gtk-language.glade b/ubinstall-gtk-language.glade index a1576b9..848cf11 100644 --- a/ubinstall-gtk-language.glade +++ b/ubinstall-gtk-language.glade @@ -75,7 +75,7 @@ True True liststore1 - 1 + 0 both True -- 2.35.1 From d14118a909be8aa99169fdb7780e462e152831e8 Mon Sep 17 00:00:00 2001 From: Ivan Dmitrievich Yartsev Date: Mon, 1 Dec 2025 11:20:33 +0600 Subject: [PATCH 02/10] Fixed previous page button wrong page --- source/ubinstall-gtk-page-switch.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/ubinstall-gtk-page-switch.c b/source/ubinstall-gtk-page-switch.c index ef05a46..4cd7a13 100644 --- a/source/ubinstall-gtk-page-switch.c +++ b/source/ubinstall-gtk-page-switch.c @@ -55,7 +55,7 @@ enum YON_PAGES yon_page_get_prev(enum YON_PAGES page){ case YON_PAGE_KERNEL_ADDON: return YON_PAGE_KERNEL; break; case YON_PAGE_PACMAN_SOFTWARE: return YON_PAGE_KERNEL_ADDON; break; case YON_PAGE_SOFTWARE: return YON_PAGE_PACMAN_SOFTWARE; break; - case YON_PAGE_REGION: return YON_PAGE_SOFTWARE; break; + case YON_PAGE_REGION: return YON_PAGE_PACMAN_SOFTWARE; break; case YON_PAGE_KEYBOARD: return YON_PAGE_REGION; break; case YON_PAGE_USERS: return YON_PAGE_KEYBOARD; break; case YON_PAGE_STARTUP: return YON_PAGE_USERS; break; -- 2.35.1 From 18b23bf23e170539187ff693fbbf3b11935f522a Mon Sep 17 00:00:00 2001 From: Ivan Dmitrievich Yartsev Date: Mon, 1 Dec 2025 13:44:53 +0600 Subject: [PATCH 03/10] Lolalisation fix; Fixed skip configuration button --- locale/ubinstall-gtk.pot | 8 ++++++-- locale/ubinstall-gtk_ru.po | 8 ++++++-- source/ubinstall-gtk-page-switch.c | 8 ++++++-- ubinstall-gtk-configuration-mode.glade | 4 ++-- ubinstall-gtk.glade | 1 - 5 files changed, 20 insertions(+), 9 deletions(-) diff --git a/locale/ubinstall-gtk.pot b/locale/ubinstall-gtk.pot index 2271d1b..14ba39c 100644 --- a/locale/ubinstall-gtk.pot +++ b/locale/ubinstall-gtk.pot @@ -451,7 +451,7 @@ msgid "Installation configuration has ended" msgstr "" #: source/ubl-strings.h:124 -msgid "system installation is about to begin" +msgid "System installation is about to begin" msgstr "" #: source/ubl-strings.h:126 @@ -1183,4 +1183,8 @@ msgstr "" #: source/ubl-strings.h:331 msgid "About system installation" -msgstr "" \ No newline at end of file +msgstr "" + +#: source/ubl-strings.h:331 +msgid "Repeating values" +msgstr "" diff --git a/locale/ubinstall-gtk_ru.po b/locale/ubinstall-gtk_ru.po index 033d640..12c1eb2 100644 --- a/locale/ubinstall-gtk_ru.po +++ b/locale/ubinstall-gtk_ru.po @@ -471,7 +471,7 @@ msgid "Installation configuration has ended" msgstr "Настройка установщика завершена" #: source/ubl-strings.h:124 -msgid "system installation is about to begin" +msgid "System installation is about to begin" msgstr "Начало установки системы" #: source/ubl-strings.h:126 @@ -3023,4 +3023,8 @@ msgid "Zulu" msgstr "Зулу" msgid "Zurich" -msgstr "Цюрих" \ No newline at end of file +msgstr "Цюрих" + +#: source/ubl-strings.h:331 +msgid "Repeating values" +msgstr "Повторяющиеся значения" \ No newline at end of file diff --git a/source/ubinstall-gtk-page-switch.c b/source/ubinstall-gtk-page-switch.c index 4cd7a13..24ca3c8 100644 --- a/source/ubinstall-gtk-page-switch.c +++ b/source/ubinstall-gtk-page-switch.c @@ -372,7 +372,7 @@ void yon_page_init(main_window *widgets, enum YON_PAGES page){ break; case YON_PAGE_INSTALL_ADVANCED: yon_install_advanced_init(widgets); - [[fallthrough]]; + __attribute__((fallthrough)); case YON_PAGE_INSTALL_COMMON: case YON_PAGE_INSTALL_SEPARATE: case YON_PAGE_INSTALL_SAME_PARTITION: @@ -449,7 +449,11 @@ void on_system_setup_pass(GtkWidget *, main_window *widgets){ if (main_config.configure_mode){ gtk_notebook_set_current_page(GTK_NOTEBOOK(widgets->Notebook),YON_PAGE_CONFIGURE_END); } else { - gtk_notebook_set_current_page(GTK_NOTEBOOK(widgets->Notebook),YON_PAGE_INSTALLATION); + if (main_config.install_complete) { + gtk_notebook_set_current_page(GTK_NOTEBOOK(widgets->Notebook),YON_PAGE_COMPLETION); + } else { + gtk_notebook_set_current_page(GTK_NOTEBOOK(widgets->Notebook),YON_PAGE_INSTALLATION); + } } yon_page_update(widgets); } \ No newline at end of file diff --git a/ubinstall-gtk-configuration-mode.glade b/ubinstall-gtk-configuration-mode.glade index f4e73df..676b330 100644 --- a/ubinstall-gtk-configuration-mode.glade +++ b/ubinstall-gtk-configuration-mode.glade @@ -1,5 +1,5 @@ - + @@ -152,7 +152,7 @@ True False 2 - UBLinux installation + System installation diff --git a/ubinstall-gtk.glade b/ubinstall-gtk.glade index 53a7dd8..201d8e3 100644 --- a/ubinstall-gtk.glade +++ b/ubinstall-gtk.glade @@ -766,7 +766,6 @@ agreement 5 5 left - False True -- 2.35.1 From ba99ba2141a00c1e856784a62431604dacbaa7d3 Mon Sep 17 00:00:00 2001 From: Ivan Dmitrievich Yartsev Date: Mon, 1 Dec 2025 15:22:32 +0600 Subject: [PATCH 04/10] Unstaller starts up in maximised mode if application configuration doesn't exist --- source/ubinstall-gtk.c | 33 ++++++++++----------------------- source/ubinstall-gtk.h | 3 ++- ubinstall-gtk.glade | 1 + 3 files changed, 13 insertions(+), 24 deletions(-) diff --git a/source/ubinstall-gtk.c b/source/ubinstall-gtk.c index a14a8ef..d838057 100644 --- a/source/ubinstall-gtk.c +++ b/source/ubinstall-gtk.c @@ -615,6 +615,7 @@ gboolean on_yon_exit(GtkWidget *,GdkEvent*, main_window *widgets){ data->action_text=INTERRUPT_TEXT_LABEL; data->title=WARNING_TITLE_LABEL; if (yon_confirmation_dialog_call(widgets->MainWindow,data)==GTK_RESPONSE_ACCEPT ){ + yon_window_config_save_instant(); on_exit_accepted(widgets); gtk_main_quit(); return 1; @@ -1219,18 +1220,11 @@ void yon_main_window_create(main_window *widgets){ yon_char_parsed_free(slides,size); } gtk_builder_connect_signals(builder,NULL); - // yon_load_proceed(YON_CONFIG_LOCAL); - // yon_interface_update(widgets); if (!yon_char_is_empty(config(AUTOINSTALL_TYPE_INSTALL))){ gtk_widget_show(widgets->StartScenarioButton); } else { gtk_widget_hide(widgets->StartScenarioButton); } - // char *locale = config(installer_lang_parameter); - // if (!yon_char_is_empty(locale)){ - // locale = setlocale(LC_ALL,NULL); - // } - // yon_ubl_window_init(TITLE_LABEL,DESCRIPTION_LABEL,locale,CssPath,LocaleName,version_application,WIKI_LINK); if (main_config.force_ini){ main_config.configure_mode=1; g_signal_handlers_block_by_func(G_OBJECT(widgets->ConfigurationModeMenuItem),G_CALLBACK(on_configuration_mode_switch),widgets); @@ -1242,20 +1236,6 @@ void yon_main_window_create(main_window *widgets){ } yon_locale_init(); set_locales_list(widgets); - // { - // char *parameter = config(installer_lang_parameter); - // if (yon_char_is_empty(parameter)){ - // parameter=setlocale(LC_ALL,NULL); - // } - // GList *list = gtk_container_get_children(GTK_CONTAINER(widgets->LanguagesBox)); - // GList *iter; - // for (iter = list;iter;iter=iter->next){ - // char *lang = g_object_get_data(G_OBJECT(iter->data),"language"); - // if (!strcmp(lang,parameter)){ - // gtk_flow_box_select_child(GTK_FLOW_BOX(widgets->LanguagesBox),GTK_FLOW_BOX_CHILD(iter->data)); - // } - // } - // } } /**yon_main_window_complete(main_window *widgets) @@ -1268,6 +1248,8 @@ main_window *yon_main_window_complete(){ main_window *widgets=NULL; widgets = yon_remalloc(widgets,sizeof(main_window)); yon_main_window_create(widgets); + yon_window_config_setup(GTK_WINDOW(widgets->MainWindow)); + // yon_window_config_custom_window_setup(GTK_WINDOW(widgets->MainWindow),"MainWindow"); return widgets; } @@ -1301,12 +1283,17 @@ int main(int argc, char *argv[]){ } gtk_init(&argc,&argv); main_window *widgets = NULL; + if (widgets){}; + int fullscreen = 0; widgets = yon_main_window_complete(); on_config_global_load(NULL,widgets); - if (widgets){}; char *path = yon_char_unite(yon_ubl_user_get_home_directory(),"/.config/",LocaleName,"/",LocaleName,".conf",NULL); - yon_window_config_setup(GTK_WINDOW(widgets->MainWindow)); + if (access(path,F_OK)){ + fullscreen = 1; + gtk_window_maximize(GTK_WINDOW(widgets->MainWindow)); + } yon_window_config_load(path); + yon_window_config_add_instant_parameter("fullscreen","window",&fullscreen,YON_TYPE_BOOLEAN); main_config.launch_arguments=yon_char_parsed_copy(argv,argc); main_config.launch_size=argc; GtkCssProvider *css=gtk_css_provider_new(); diff --git a/source/ubinstall-gtk.h b/source/ubinstall-gtk.h index f79b928..f1d74d1 100755 --- a/source/ubinstall-gtk.h +++ b/source/ubinstall-gtk.h @@ -1208,4 +1208,5 @@ gboolean on_format_changed(GtkWidget *self, gboolean state, advanced_partition int yon_layouts_get(); void on_link(GtkWidget *self, char* uri, gpointer ); void on_source_changed(GtkComboBox *self); -void yon_focus_set(GtkWidget *,GtkWidget *target); \ No newline at end of file +void yon_focus_set(GtkWidget *,GtkWidget *target); +void on_main_window_close(GtkWidget*, main_window *); \ No newline at end of file diff --git a/ubinstall-gtk.glade b/ubinstall-gtk.glade index 201d8e3..53a7dd8 100644 --- a/ubinstall-gtk.glade +++ b/ubinstall-gtk.glade @@ -766,6 +766,7 @@ agreement 5 5 left + False True -- 2.35.1 From 1cf1259ca5bba1940cb5cba03b9b51fd134da37f Mon Sep 17 00:00:00 2001 From: Ivan Dmitrievich Yartsev Date: Mon, 1 Dec 2025 17:58:44 +0600 Subject: [PATCH 05/10] Changes --- source/ubinstall-gtk-components.c | 55 +++++------ source/ubinstall-gtk-configuration-mode.c | 30 +++++- source/ubinstall-gtk-page-switch.c | 8 +- source/ubl-strings.h | 3 + ubinstall-gtk-os-row.glade | 3 +- ubinstall-gtk.glade | 106 ++++++++++------------ 6 files changed, 107 insertions(+), 98 deletions(-) diff --git a/source/ubinstall-gtk-components.c b/source/ubinstall-gtk-components.c index ee5bc3f..fbef016 100644 --- a/source/ubinstall-gtk-components.c +++ b/source/ubinstall-gtk-components.c @@ -204,7 +204,14 @@ void yon_os_components_init(main_window *widgets){ list = gtk_container_get_children(GTK_CONTAINER(widgets->OSSoftwareListBox)); for(iter = list;iter;iter=iter->next){ os_row *row = g_object_get_data(iter->data,"kernel_row"); - gtk_widget_set_size_request(row->NameLabel,size,-1); + int cur_size = 0; + gtk_widget_realize(row->RowBox); + gtk_widget_get_preferred_width(row->RowBox,&cur_size,NULL); + if (sizenext){ + os_row *row = g_object_get_data(iter->data,"kernel_row"); + gtk_widget_set_size_request(row->RowBox,size,-1); } } @@ -260,37 +267,23 @@ int yon_software_save(main_window *widgets){ } void yon_software_init(main_window *widgets){ - GtkTreeIter iter; - if (!gtk_tree_model_get_iter_first(GTK_TREE_MODEL(widgets->AdditionalSoftwareList),&iter)){ - int size; - config_str parsed = NULL; - parsed = yon_resource_open_file(additional_software_path,&size); - for (int i=1;iAdditionalSoftwareList,&iter); - gtk_list_store_set(widgets->AdditionalSoftwareList,&iter,0,1,1,module_parsed[0],2,module_parsed[1],3,module_parsed[2],-1); //2,module_parsed[2] - yon_char_parsed_free(module_parsed,module_size); - } - } - if (size) yon_char_parsed_free(parsed,size); - } - - char *modules = config(modules_extra_parameter); - - int size; - config_str parsed = yon_char_parse(modules,&size,","); - for_iter(GTK_TREE_MODEL(widgets->AdditionalSoftwareList),&iter){ - char *target; - gtk_tree_model_get(GTK_TREE_MODEL(widgets->AdditionalSoftwareList),&iter,1,&target); - if (yon_char_parsed_check_exist(parsed,size,target)>-1){ - gtk_list_store_set(widgets->AdditionalSoftwareList,&iter,0,1,-1); - } else { - gtk_list_store_set(widgets->AdditionalSoftwareList,&iter,0,0,-1); - } + int base_size; + config_str base = yon_config_load(get_modules_command,&base_size); + for (int i=0;iversion = parsed[1]; + row->name = parsed[0]; + row->tags = yon_char_replace(parsed[2]," ",", "); + row->description = parsed[3]; + row->widgets=widgets; + g_idle_add((GSourceFunc)yon_os_component_insert,row); } - yon_char_parsed_free(parsed,size); + g_idle_add((GSourceFunc)yon_spinner_switch_off,widgets->OSSpinner); + yon_char_parsed_free(base,base_size); + return NULL; } int yon_pacman_software_save(main_window *widgets){ diff --git a/source/ubinstall-gtk-configuration-mode.c b/source/ubinstall-gtk-configuration-mode.c index 2e97ea6..1d0ef6a 100644 --- a/source/ubinstall-gtk-configuration-mode.c +++ b/source/ubinstall-gtk-configuration-mode.c @@ -7,8 +7,28 @@ void configuration_mode_accept(GtkWidget *,configuration_window *window){ yon_ubl_status_highlight_incorrect(window->PathEntry); return; } - if (!yon_char_is_empty(main_config.config_save_path)) free(main_config.config_save_path); - main_config.config_save_path = yon_char_new(path); + + if (access(path,F_OK)){ + int homedir_create = 0; + if (!strstr(path,"/")){ + homedir_create = 1; + } + dialog_confirmation_data *data = yon_confirmation_dialog_data_new(); + data->action_text = homedir_create?CREATE_CONFIG_DIALOG_LABEL_HOMEDIR:CREATE_CONFIG_DIALOG_LABEL; + data->title = WARNING_TITLE_LABEL; + if (yon_confirmation_dialog_call(window->Window,data)==GTK_RESPONSE_ACCEPT){ + char *full_path = NULL; + if (homedir_create){ + full_path = yon_char_unite(yon_ubl_user_get_home_directory(),"/",path,NULL); + } else { + full_path = yon_char_new(path); + } + + yon_launch(ubconfig_file_create(full_path)); + } else return; + } + if (!yon_char_is_empty(main_config.config_save_path)) free(main_config.config_save_path); + main_config.config_save_path = yon_char_new(path); gtk_widget_destroy(window->Window); } @@ -29,6 +49,9 @@ void on_configuration_exit(GtkWidget *,configuration_window *window){ main_window *widgets = g_object_get_data(G_OBJECT(window->Window),"widgets"); gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(widgets->ConfigurationModeMenuItem),0); gtk_widget_destroy(window->Window); + if (getuid()){ + gtk_main_quit(); + } } void on_configuration_mode_switch(GtkWidget *self,main_window *widgets){ @@ -48,6 +71,9 @@ void on_configuration_mode_switch(GtkWidget *self,main_window *widgets){ g_signal_connect(G_OBJECT(window->PathButton),"clicked",G_CALLBACK(on_path_choose),window); g_object_set_data(G_OBJECT(window->Window),"widgets",widgets); yon_gtk_window_setup(GTK_WINDOW(window->Window),GTK_WINDOW(widgets->MainWindow),CONFIGURATION_MODE_TITLE_LABEL,icon_path,"configuration_window"); + if (getuid()){ + yon_ubl_status_box_spawn_infinite(GTK_CONTAINER(window->StatusBox),"force_configure_mode",ROOT_FORCE_CONFIGURATION_MODE_LABEL,BACKGROUND_IMAGE_INFO_TYPE); + } if (!yon_char_is_empty(main_config.config_save_path)) gtk_entry_set_text(GTK_ENTRY(window->PathEntry),main_config.config_save_path); gtk_widget_show(window->Window); diff --git a/source/ubinstall-gtk-page-switch.c b/source/ubinstall-gtk-page-switch.c index 24ca3c8..22b2787 100644 --- a/source/ubinstall-gtk-page-switch.c +++ b/source/ubinstall-gtk-page-switch.c @@ -8,12 +8,12 @@ enum YON_PAGES yon_page_get_next(main_window *widgets, enum YON_PAGES page){ case YON_PAGE_WELCOME: return YON_PAGE_LICENCE; break; case YON_PAGE_LICENCE: return YON_PAGE_SECTIONS; break; case YON_PAGE_SECTIONS: return yon_sections_get_next_page(widgets); break; - case YON_PAGE_OS_COMPONENTS: return main_config.configure_mode? YON_PAGE_KERNEL : YON_PAGE_INSTALLATION_BEGIN; break; + case YON_PAGE_OS_COMPONENTS: return YON_PAGE_SOFTWARE; break; + case YON_PAGE_SOFTWARE: return main_config.configure_mode? YON_PAGE_KERNEL : YON_PAGE_INSTALLATION_BEGIN; break; case YON_PAGE_INSTALLATION_BEGIN: return YON_PAGE_KERNEL; break; case YON_PAGE_KERNEL: return YON_PAGE_KERNEL_ADDON; break; case YON_PAGE_KERNEL_ADDON: return YON_PAGE_PACMAN_SOFTWARE; break; case YON_PAGE_PACMAN_SOFTWARE: return YON_PAGE_REGION; - case YON_PAGE_SOFTWARE: return YON_PAGE_PACMAN_SOFTWARE; break; case YON_PAGE_REGION: return YON_PAGE_KEYBOARD; break; case YON_PAGE_KEYBOARD: return YON_PAGE_USERS; break; case YON_PAGE_USERS: return YON_PAGE_STARTUP; break; @@ -50,11 +50,11 @@ enum YON_PAGES yon_page_get_prev(enum YON_PAGES page){ case YON_PAGE_LICENCE: return YON_PAGE_WELCOME; break; case YON_PAGE_SECTIONS: return YON_PAGE_LICENCE; break; case YON_PAGE_OS_COMPONENTS: return YON_PAGE_SECTIONS; break; - case YON_PAGE_INSTALLATION_BEGIN: return YON_PAGE_SECTIONS; break; + case YON_PAGE_SOFTWARE: return YON_PAGE_OS_COMPONENTS; break; + case YON_PAGE_INSTALLATION_BEGIN: return YON_PAGE_SOFTWARE; break; case YON_PAGE_KERNEL: return YON_PAGE_SECTIONS; break; case YON_PAGE_KERNEL_ADDON: return YON_PAGE_KERNEL; break; case YON_PAGE_PACMAN_SOFTWARE: return YON_PAGE_KERNEL_ADDON; break; - case YON_PAGE_SOFTWARE: return YON_PAGE_PACMAN_SOFTWARE; break; case YON_PAGE_REGION: return YON_PAGE_PACMAN_SOFTWARE; break; case YON_PAGE_KEYBOARD: return YON_PAGE_REGION; break; case YON_PAGE_USERS: return YON_PAGE_KEYBOARD; break; diff --git a/source/ubl-strings.h b/source/ubl-strings.h index 8afdaaa..b5552cf 100644 --- a/source/ubl-strings.h +++ b/source/ubl-strings.h @@ -227,6 +227,9 @@ NULL) #define ABOUT_TITLE_LABEL _("About system installation") #define VALUE_REPEAT_LABEL _("Repeating values") #define SOURCE_CREATE_ONGOING_ERROR_LABEL _("Source creation were not done") +#define CREATE_CONFIG_DIALOG_LABEL _("Configuration file does not exist. Create new configuration file?") +#define CREATE_CONFIG_DIALOG_LABEL_HOMEDIR _("Configuration file does not exist. Create new configuration file? New configuration file will be created at your user's home directory") +#define ROOT_FORCE_CONFIGURATION_MODE_LABEL _("Warning! Application was launched without root. Only configuration mode is allowed.") // #define _LABEL _("New section at") // #define _LABEL _("\"/ublinux-data/\" user data section") // #define _LABEL _("\"/ublinux/\" system section") diff --git a/ubinstall-gtk-os-row.glade b/ubinstall-gtk-os-row.glade index 58c5b7e..e3cd295 100644 --- a/ubinstall-gtk-os-row.glade +++ b/ubinstall-gtk-os-row.glade @@ -64,7 +64,7 @@ True False - start + center 3 5 2 @@ -75,6 +75,7 @@ False True + end 6 diff --git a/ubinstall-gtk.glade b/ubinstall-gtk.glade index 53a7dd8..a55258b 100644 --- a/ubinstall-gtk.glade +++ b/ubinstall-gtk.glade @@ -3,18 +3,6 @@ - - - - - - - - - - - - 100 1 @@ -2196,63 +2184,61 @@ and help you install system on your computer 5 5 - + True - True - in + False - + True - True - AdditionalSoftwareList - 0 - - - - - - - - - 0 - - - - - - - Module name - - - - 1 - - - - - - - Type - - - - 2 - - - - + False + vertical + 5 - - Description + + True + True - - - 3 - + + True + False + 5 + 5 + 5 + 5 + 5 + 5 + + + True + False + vertical + + + True + False + none + + + True + True + 1 + + + + + + + True + True + 1 + + + -1 + -- 2.35.1 From d1c638025c001bdf85572a7193ae06e15d315e5f Mon Sep 17 00:00:00 2001 From: Ivan Dmitrievich Yartsev Date: Tue, 2 Dec 2025 14:53:59 +0600 Subject: [PATCH 06/10] Fixed fullscreen --- source/ubinstall-gtk.c | 14 +++++++++++++- source/ubinstall-gtk.h | 4 +++- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/source/ubinstall-gtk.c b/source/ubinstall-gtk.c index d838057..fce9334 100644 --- a/source/ubinstall-gtk.c +++ b/source/ubinstall-gtk.c @@ -1238,6 +1238,17 @@ void yon_main_window_create(main_window *widgets){ set_locales_list(widgets); } +gboolean yon_maximize_start(main_window *widgets){ + gtk_window_maximize(GTK_WINDOW(widgets->MainWindow)); + return G_SOURCE_REMOVE; +} + +void *yon_maximize(main_window *widgets){ + g_usleep(G_USEC_PER_SEC/10); + g_idle_add((GSourceFunc)yon_maximize_start,widgets); + return NULL; +} + /**yon_main_window_complete(main_window *widgets) * [EN] * @@ -1290,7 +1301,8 @@ int main(int argc, char *argv[]){ char *path = yon_char_unite(yon_ubl_user_get_home_directory(),"/.config/",LocaleName,"/",LocaleName,".conf",NULL); if (access(path,F_OK)){ fullscreen = 1; - gtk_window_maximize(GTK_WINDOW(widgets->MainWindow)); + g_thread_new("fullscreen",(GThreadFunc)yon_maximize,widgets); + } yon_window_config_load(path); yon_window_config_add_instant_parameter("fullscreen","window",&fullscreen,YON_TYPE_BOOLEAN); diff --git a/source/ubinstall-gtk.h b/source/ubinstall-gtk.h index f1d74d1..56c49d3 100755 --- a/source/ubinstall-gtk.h +++ b/source/ubinstall-gtk.h @@ -1209,4 +1209,6 @@ int yon_layouts_get(); void on_link(GtkWidget *self, char* uri, gpointer ); void on_source_changed(GtkComboBox *self); void yon_focus_set(GtkWidget *,GtkWidget *target); -void on_main_window_close(GtkWidget*, main_window *); \ No newline at end of file +void on_main_window_close(GtkWidget*, main_window *); +gboolean yon_maximize_start(main_window *widgets); +void *yon_maximize(main_window *widgets); \ No newline at end of file -- 2.35.1 From ee764f69b6e6ad4b720eb86701ea32f477af387f Mon Sep 17 00:00:00 2001 From: Ivan Dmitrievich Yartsev Date: Tue, 2 Dec 2025 18:21:33 +0600 Subject: [PATCH 07/10] Fixes; initialization fixes; build fixes --- source/ubinstall-gtk-components.c | 2 +- source/ubinstall-gtk-installation.c | 37 +- source/ubinstall-gtk.c | 8 +- source/ubinstall-gtk.h | 2 + ubinstall-gtk.glade | 3420 ++++++++++++++++++++------- 5 files changed, 2662 insertions(+), 807 deletions(-) diff --git a/source/ubinstall-gtk-components.c b/source/ubinstall-gtk-components.c index fbef016..f4a4f71 100644 --- a/source/ubinstall-gtk-components.c +++ b/source/ubinstall-gtk-components.c @@ -283,7 +283,7 @@ void yon_software_init(main_window *widgets){ } g_idle_add((GSourceFunc)yon_spinner_switch_off,widgets->OSSpinner); yon_char_parsed_free(base,base_size); - return NULL; + return ; } int yon_pacman_software_save(main_window *widgets){ diff --git a/source/ubinstall-gtk-installation.c b/source/ubinstall-gtk-installation.c index a4b4390..802b662 100644 --- a/source/ubinstall-gtk-installation.c +++ b/source/ubinstall-gtk-installation.c @@ -502,18 +502,7 @@ void yon_install_init(main_window *widgets, enum YON_PAGES page){ } } if (format_switch){ - char *format = config(part_format_parameter); - if ((!yon_char_is_empty(format)&&!strcmp(format,"yes"))||format_switch==widgets->CommonFormatSwitch){ - gtk_switch_set_active(GTK_SWITCH(format_switch),1); - if (device_label){ - char *parameter = config(part_label_parameter); - if (!yon_char_is_empty(parameter)){ - gtk_entry_set_text(GTK_ENTRY(device_label),parameter); - } else { - gtk_entry_set_text(GTK_ENTRY(device_label),""); - } - } - if (fs_type_combo){ + if (fs_type_combo){ gtk_combo_box_text_remove_all(GTK_COMBO_BOX_TEXT(fs_type_combo)); int size; config_str fs_types = yon_resource_open_file(fs_types_path,&size); @@ -533,6 +522,30 @@ void yon_install_init(main_window *widgets, enum YON_PAGES page){ gtk_combo_box_set_active(GTK_COMBO_BOX(fs_type_combo),0); } } + + if (partition_encryption_combo && partition_encryption_entry){ + int size; + gtk_combo_box_text_remove_all(GTK_COMBO_BOX_TEXT(partition_encryption_combo)); + gtk_combo_box_text_append(GTK_COMBO_BOX_TEXT(partition_encryption_combo),NULL,yon_char_get_localised_from_lib(DEFAULT_LABEL)); + config_str encryptions = yon_char_parsed_new(&size,encryptions_list,NULL); + for (int i=0;iCommonFormatSwitch){ + gtk_switch_set_active(GTK_SWITCH(format_switch),1); + if (device_label){ + char *parameter = config(part_label_parameter); + if (!yon_char_is_empty(parameter)){ + gtk_entry_set_text(GTK_ENTRY(device_label),parameter); + } else { + gtk_entry_set_text(GTK_ENTRY(device_label),""); + } + } + if (partition_size_spin&&partition_size_combo){ char *parameter = config(part_size_parameter); if (!yon_char_is_empty(parameter)){ diff --git a/source/ubinstall-gtk.c b/source/ubinstall-gtk.c index fce9334..1b6d0e9 100644 --- a/source/ubinstall-gtk.c +++ b/source/ubinstall-gtk.c @@ -913,6 +913,7 @@ void yon_main_window_create(main_window *widgets){ widgets->OSSysSectionTree = yon_gtk_builder_get_widget(builder,"OSSysSectionTree"); widgets->GpartedOSButton = yon_gtk_builder_get_widget(builder,"GpartedOSButton"); widgets->OSFormatSwitch = yon_gtk_builder_get_widget(builder,"OSFormatSwitch"); + widgets->OSRevealer = yon_gtk_builder_get_widget(builder,"OSRevealer"); widgets->OSFormatSizeSpin = yon_gtk_builder_get_widget(builder,"OSFormatSizeSpin"); widgets->OSFormatSizeCombo = yon_gtk_builder_get_widget(builder,"OSFormatSizeCombo"); widgets->OSFormatPartitionEntry = yon_gtk_builder_get_widget(builder,"OSFormatPartitionEntry"); @@ -925,6 +926,7 @@ void yon_main_window_create(main_window *widgets){ widgets->UserdataSysSectionTree = yon_gtk_builder_get_widget(builder,"UserdataSysSectionTree"); widgets->GpartedUserdataButton = yon_gtk_builder_get_widget(builder,"UserdataGpartedButton"); widgets->UserdataFormatSwitch = yon_gtk_builder_get_widget(builder,"UserdataFormatSwitch"); + widgets->UserdataRevealer = yon_gtk_builder_get_widget(builder,"UserdataRevealer"); widgets->UserdataFormatSizeSpin = yon_gtk_builder_get_widget(builder,"UserdataFormatSizeSpin"); widgets->UserdataFormatSizeCombo = yon_gtk_builder_get_widget(builder,"UserdataFormatSizeCombo"); widgets->UserdataFormatPartitionEntry = yon_gtk_builder_get_widget(builder,"UserdataFormatPartitionEntry"); @@ -1124,6 +1126,8 @@ void yon_main_window_create(main_window *widgets){ yon_gtk_revealer_set_from_switch(GTK_REVEALER(widgets->NextInstallationFormatRevealer),GTK_SWITCH(widgets->NextInstallationFormatSwitch)); yon_gtk_revealer_set_from_switch(GTK_REVEALER(widgets->SameInstallationFormatRevealer),GTK_SWITCH(widgets->SameInstallationFormatSwitch)); + yon_gtk_revealer_set_from_switch(GTK_REVEALER(widgets->OSRevealer),GTK_SWITCH(widgets->OSFormatSwitch)); + yon_gtk_revealer_set_from_switch(GTK_REVEALER(widgets->UserdataRevealer),GTK_SWITCH(widgets->UserdataFormatSwitch)); g_signal_connect(G_OBJECT(widgets->PacmanSoftwareAllCell),"toggled",G_CALLBACK(on_pacman_software_all_toggled),widgets); g_signal_connect(G_OBJECT(widgets->PacmanSoftwareChosenCell),"toggled",G_CALLBACK(on_pacman_software_chosen_toggled),widgets); @@ -1196,10 +1200,12 @@ void yon_main_window_create(main_window *widgets){ config_str parsed = NULL; parsed = yon_file_open(licence_path,&size); if (size){ + textdomain("ublinux-init-eula"); char *licence = yon_char_parsed_to_string(parsed,size,""); - gtk_label_set_text(GTK_LABEL(widgets->LicenceLabel),licence); + gtk_label_set_text(GTK_LABEL(widgets->LicenceLabel),_(licence)); free(licence); yon_char_parsed_free(parsed,size); + textdomain(LocaleName); } } { diff --git a/source/ubinstall-gtk.h b/source/ubinstall-gtk.h index 56c49d3..383a382 100755 --- a/source/ubinstall-gtk.h +++ b/source/ubinstall-gtk.h @@ -562,6 +562,7 @@ typedef struct { GtkWidget *OSDevicesTree; GtkWidget *OSSysSectionTree; GtkWidget *OSFormatSwitch; + GtkWidget *OSRevealer; GtkWidget *OSFormatSizeSpin; GtkWidget *OSFormatSizeCombo; GtkWidget *OSFormatPartitionEntry; @@ -576,6 +577,7 @@ typedef struct { GtkWidget *UserdataDevicesTree; GtkWidget *UserdataSysSectionTree; GtkWidget *UserdataFormatSwitch; + GtkWidget *UserdataRevealer; GtkWidget *UserdataFormatSizeSpin; GtkWidget *UserdataFormatSizeCombo; GtkWidget *UserdataFormatPartitionEntry; diff --git a/ubinstall-gtk.glade b/ubinstall-gtk.glade index a55258b..1c51eba 100644 --- a/ubinstall-gtk.glade +++ b/ubinstall-gtk.glade @@ -754,7 +754,6 @@ agreement 5 5 left - False True @@ -766,43 +765,6 @@ agreement False vertical 20 - - - True - False - center - Welcome to system installation - True - - - - - - - False - True - 0 - - - - - True - False - center - This program will ask you few questions -and help you install system on your computer - center - True - - - - - - False - True - 1 - - True @@ -810,13 +772,75 @@ and help you install system on your computer vertical 5 - + True False - center - center - 128 - /com/ublinux/images/language.png + 10 + 10 + 5 + + + True + False + 48 + com.ublinux.ubinstall-gtk + 0 + + + False + True + 0 + + + + + True + False + vertical + + + True + False + Welcome + True + 0 + + + + + + + + False + True + 0 + + + + + True + False + This program will ask you few questions and help you install system on your computer + center + True + 0 + + + + + + False + True + 1 + + + + + True + True + 1 + + False @@ -825,96 +849,101 @@ and help you install system on your computer - + True False - 5 - True + + + False + True + 2 + + + + + False + True + 0 + + + + + True + False + 5 + True + + + True + True + never + in + 132 - + True True - never - in - 132 + InstallerLanguageList + False + 1 - - True - True - InstallerLanguageList - False - 1 - - - + + True - - True - - - - 2 - - - + + + 2 + + + + + + column - - column - - - - 1 - - - + + + 1 + - - True - True - 0 - + + + True + True + 0 + + + + + True + True + never + in + 132 - + True True - never - in - 132 + InstallerCountryFilter + False + 1 + 3 + True - - True - True - InstallerCountryFilter - False - 1 - 3 - True - - - + - - - - - 1 - - - + + + 1 + - - True - True - 1 - @@ -927,7 +956,7 @@ and help you install system on your computer True True - 3 + 1 @@ -956,6 +985,109 @@ and help you install system on your computer False vertical 5 + + + True + False + vertical + 5 + + + True + False + 10 + 10 + 10 + 10 + 5 + + + True + False + 48 + com.ublinux.ubinstall-gtk + 0 + + + False + True + 0 + + + + + True + False + vertical + + + True + False + Licence agreement + True + 0 + + + + + + + + False + True + 0 + + + + + True + False + This program will ask you few questions and help you install system on your computer + center + True + 0 + + + + + + False + True + 1 + + + + + True + True + 1 + + + + + False + True + 0 + + + + + True + False + + + False + True + 2 + + + + + False + True + 0 + + True @@ -987,17 +1119,31 @@ and help you install system on your computer True True - 0 + 1 - - - 1 - - - - - True + + + Agree + True + True + False + True + + + False + True + 2 + + + + + 1 + + + + + True False Licences @@ -1017,29 +1163,102 @@ and help you install system on your computer True False vertical + 5 - + + True + False + 10 + 10 + 10 + 10 + 5 + + + True + False + 48 + com.ublinux.ubinstall-gtk + 0 + + + False + True + 0 + + + + + True + False + vertical + + + True + False + Installation options + True + 0 + + + + + + + + False + True + 0 + + + + + True + False + This program will ask you few questions and help you install system on your computer + center + True + 0 + + + + + + False + True + 1 + + + + + True + True + 1 + + + + + False + True + 0 + + + + True False - Installation options - - - - - - False True - 1 + 2 False True - 0 + 1 @@ -1489,15 +1708,102 @@ and help you install system on your computer vertical 5 - + True False - Installation completion - - - - - + vertical + 5 + + + True + False + 10 + 10 + 10 + 10 + 5 + + + True + False + 48 + com.ublinux.ubinstall-gtk + 0 + + + False + True + 0 + + + + + True + False + vertical + + + True + False + Installation completion + True + 0 + + + + + + + + + False + True + 0 + + + + + True + False + This program will ask you few questions and help you install system on your computer + center + True + 0 + + + + + + False + True + 1 + + + + + True + True + 1 + + + + + False + True + 0 + + + + + True + False + + + False + True + 2 + + False @@ -1591,7 +1897,7 @@ and help you install system on your computer True True - 1 + 2 @@ -1672,15 +1978,102 @@ and help you install system on your computer vertical 5 - + True False - Choose system kernel - - - - - + vertical + 5 + + + True + False + 10 + 10 + 10 + 10 + 5 + + + True + False + 48 + com.ublinux.ubinstall-gtk + 0 + + + False + True + 0 + + + + + True + False + vertical + + + True + False + Choose system kernel + True + 0 + + + + + + + + + False + True + 0 + + + + + True + False + This program will ask you few questions and help you install system on your computer + center + True + 0 + + + + + + False + True + 1 + + + + + True + True + 1 + + + + + False + True + 0 + + + + + True + False + + + False + True + 2 + + False @@ -1935,20 +2328,107 @@ and help you install system on your computer vertical 5 - + True False - Choose system kernel - - - - - + vertical + 5 + + + True + False + 10 + 10 + 10 + 10 + 5 + + + True + False + 48 + com.ublinux.ubinstall-gtk + 0 + + + False + True + 0 + + + + + True + False + vertical + + + True + False + Choose kernel addons + True + 0 + + + + + + + + + False + True + 0 + + + + + True + False + This program will ask you few questions and help you install system on your computer + center + True + 0 + + + + + + False + True + 1 + + + + + True + True + 1 + + + + + False + True + 0 + + + + + True + False + + + False + True + 2 + + False True - 0 + 1 @@ -2169,6 +2649,110 @@ and help you install system on your computer 0 + + + True + False + vertical + 5 + + + True + False + 10 + 10 + 10 + 10 + 5 + + + True + False + 48 + com.ublinux.ubinstall-gtk + 0 + + + False + True + 0 + + + + + True + False + vertical + + + True + False + Choose system kernel + True + 0 + + + + + + + + + False + True + 0 + + + + + True + False + This program will ask you few questions and help you install system on your computer + center + True + 0 + + + + + + False + True + 1 + + + + + True + True + 1 + + + + + False + True + 0 + + + + + True + False + + + False + True + 2 + + + + + False + True + 1 + + True @@ -2255,7 +2839,7 @@ and help you install system on your computer True True - 1 + 2 @@ -2297,6 +2881,110 @@ and help you install system on your computer 0 + + + True + False + vertical + 5 + + + True + False + 10 + 10 + 10 + 10 + 5 + + + True + False + 48 + com.ublinux.ubinstall-gtk + 0 + + + False + True + 0 + + + + + True + False + vertical + + + True + False + Choose system kernel + True + 0 + + + + + + + + + False + True + 0 + + + + + True + False + This program will ask you few questions and help you install system on your computer + center + True + 0 + + + + + + False + True + 1 + + + + + True + True + 1 + + + + + False + True + 0 + + + + + True + False + + + False + True + 2 + + + + + False + True + 1 + + True @@ -2501,7 +3189,7 @@ and help you install system on your computer True True - 1 + 2 @@ -2592,7 +3280,7 @@ and help you install system on your computer True True - 2 + 3 @@ -2635,6 +3323,110 @@ and help you install system on your computer 0 + + + True + False + vertical + 5 + + + True + False + 10 + 10 + 10 + 10 + 5 + + + True + False + 48 + com.ublinux.ubinstall-gtk + 0 + + + False + True + 0 + + + + + True + False + vertical + + + True + False + Choose system kernel + True + 0 + + + + + + + + + False + True + 0 + + + + + True + False + This program will ask you few questions and help you install system on your computer + center + True + 0 + + + + + + False + True + 1 + + + + + True + True + 1 + + + + + False + True + -1 + + + + + True + False + + + False + True + 1 + + + + + False + True + 1 + + True @@ -2656,7 +3448,7 @@ and help you install system on your computer True True - 1 + 2 @@ -2886,7 +3678,7 @@ and help you install system on your computer False True - 2 + 3 @@ -2911,6 +3703,110 @@ and help you install system on your computer False vertical 5 + + + True + False + vertical + 5 + + + True + False + 10 + 10 + 10 + 10 + 5 + + + True + False + 48 + com.ublinux.ubinstall-gtk + 0 + + + False + True + 0 + + + + + True + False + vertical + + + True + False + Choose system kernel + True + 0 + + + + + + + + + False + True + 0 + + + + + True + False + This program will ask you few questions and help you install system on your computer + center + True + 0 + + + + + + False + True + 1 + + + + + True + True + 1 + + + + + False + True + -1 + + + + + True + False + + + False + True + 1 + + + + + False + True + 0 + + True @@ -2926,7 +3822,7 @@ and help you install system on your computer False True - 0 + 1 @@ -2950,7 +3846,7 @@ and help you install system on your computer True True - 1 + 2 @@ -3065,7 +3961,7 @@ and help you install system on your computer False True - 2 + 3 @@ -3180,7 +4076,7 @@ and help you install system on your computer False True - 3 + 4 @@ -3205,82 +4101,186 @@ and help you install system on your computer False vertical 5 - - - True - False - Settings - - - - - - - - - False - True - 0 - - - - - True - False - 0 - none - - - 1 - 1 - True - False - - - - - - - - True - True - 1 - - True False + vertical 5 - - True - True - - - False - True - 0 - - - - + True False - Automatic login without password prompt - - - False - True - 1 - - - - - False - True - 2 - + 10 + 10 + 10 + 10 + 5 + + + True + False + 48 + com.ublinux.ubinstall-gtk + 0 + + + False + True + 0 + + + + + True + False + vertical + + + True + False + Choose system kernel + True + 0 + + + + + + + + + False + True + 0 + + + + + True + False + This program will ask you few questions and help you install system on your computer + center + True + 0 + + + + + + False + True + 1 + + + + + True + True + 1 + + + + + False + True + -1 + + + + + True + False + + + False + True + 1 + + + + + False + True + 0 + + + + + True + False + Settings + + + + + + + + + False + True + 1 + + + + + True + False + 0 + none + + + 1 + 1 + True + False + + + + + + + + True + True + 2 + + + + + True + False + 5 + + + True + True + + + False + True + 0 + + + + + True + False + Automatic login without password prompt + + + False + True + 1 + + + + + False + True + 3 + @@ -3733,6 +4733,9 @@ and help you install system on your computer 3 + + + 12 @@ -4095,6 +5098,9 @@ and help you install system on your computer 2 + + + 13 @@ -4487,6 +5493,9 @@ and help you install system on your computer 2 + + + 14 @@ -4509,6 +5518,110 @@ and help you install system on your computer False vertical 5 + + + True + False + vertical + 5 + + + True + False + 10 + 10 + 10 + 10 + 5 + + + True + False + 48 + com.ublinux.ubinstall-gtk + 0 + + + False + True + 0 + + + + + True + False + vertical + + + True + False + Choose system kernel + True + 0 + + + + + + + + + False + True + 0 + + + + + True + False + This program will ask you few questions and help you install system on your computer + center + True + 0 + + + + + + False + True + 1 + + + + + True + True + 1 + + + + + False + True + -1 + + + + + True + False + + + False + True + 1 + + + + + False + True + 0 + + True @@ -4523,7 +5636,7 @@ and help you install system on your computer False True - 0 + 1 @@ -4534,7 +5647,7 @@ and help you install system on your computer False True - 1 + 2 @@ -4559,11 +5672,306 @@ and help you install system on your computer False vertical 5 + + + True + False + vertical + 5 + + + True + False + 10 + 10 + 10 + 10 + 5 + + + True + False + 48 + com.ublinux.ubinstall-gtk + 0 + + + False + True + 0 + + + + + True + False + vertical + + + True + False + Choose system kernel + True + 0 + + + + + + + + + False + True + 0 + + + + + True + False + This program will ask you few questions and help you install system on your computer + center + True + 0 + + + + + + False + True + 1 + + + + + True + True + 1 + + + + + False + True + -1 + + + + + True + False + + + False + True + 1 + + + + + False + True + 0 + + + + + True + False + Installation completion + + + + + + + + + False + True + 1 + + + + + False + + + True + True + 2 + + + + + True + False + end + Success + + + + + + + True + True + 3 + + + + + True + False + start + You have system installed on your computer. +You can reboot and use your new system +or continue working in the environment, booted from the Live image. + center + True + + + + + + True + True + 4 + + + + + 16 + + + + + True + False + Completion + + + 16 + False + + + + + True + False + vertical + 5 + + + True + False + vertical + 5 + + + True + False + 10 + 10 + 10 + 10 + 5 + + + True + False + 48 + com.ublinux.ubinstall-gtk + 0 + + + False + True + 0 + + + + + True + False + vertical + + + True + False + Choose system kernel + True + 0 + + + + + + + + + False + True + 0 + + + + + True + False + This program will ask you few questions and help you install system on your computer + center + True + 0 + + + + + + False + True + 1 + + + + + True + True + 1 + + + + + False + True + -1 + + + + + True + False + + + False + True + 1 + + + + + False + True + 0 + + True False - Installation completion + Completion @@ -4574,7 +5982,7 @@ and help you install system on your computer False True - 0 + 1 @@ -4584,7 +5992,7 @@ and help you install system on your computer True True - 1 + 2 @@ -4592,7 +6000,7 @@ and help you install system on your computer True False end - Success + Configuration has been saved @@ -4601,7 +6009,7 @@ and help you install system on your computer True True - 2 + 3 @@ -4609,9 +6017,7 @@ and help you install system on your computer True False start - You have system installed on your computer. -You can reboot and use your new system -or continue working in the environment, booted from the Live image. + You can safely exit configurator or return and create new configuration file. center True @@ -4621,22 +6027,22 @@ or continue working in the environment, booted from the Live image. True True - 3 + 4 - 16 + 17 True False - Completion + Completed - 16 + 17 False @@ -4646,11 +6052,115 @@ or continue working in the environment, booted from the Live image. False vertical 5 + + + True + False + vertical + 5 + + + True + False + 10 + 10 + 10 + 10 + 5 + + + True + False + 48 + com.ublinux.ubinstall-gtk + 0 + + + False + True + 0 + + + + + True + False + vertical + + + True + False + Choose system kernel + True + 0 + + + + + + + + + False + True + 0 + + + + + True + False + This program will ask you few questions and help you install system on your computer + center + True + 0 + + + + + + False + True + 1 + + + + + True + True + 1 + + + + + False + True + -1 + + + + + True + False + + + False + True + 1 + + + + + False + True + 0 + + True False - Completion + Installation error @@ -4661,7 +6171,7 @@ or continue working in the environment, booted from the Live image. False True - 0 + 1 @@ -4669,9 +6179,9 @@ or continue working in the environment, booted from the Live image. False - True + False True - 1 + 2 @@ -4679,7 +6189,7 @@ or continue working in the environment, booted from the Live image. True False end - Configuration has been saved + Error @@ -4688,7 +6198,7 @@ or continue working in the environment, booted from the Live image. True True - 2 + 3 @@ -4696,7 +6206,7 @@ or continue working in the environment, booted from the Live image. True False start - You can safely exit configurator or return and create new configuration file. + Error has occured while installation process center True @@ -4706,22 +6216,22 @@ or continue working in the environment, booted from the Live image. True True - 3 + 4 - 17 + 18 True False - Completed + Configuration error - 17 + 18 False @@ -4732,90 +6242,109 @@ or continue working in the environment, booted from the Live image. vertical 5 - - True - False - Installation error - - - - - - - - - False - True - 0 - - - - - False - - - False - True - 1 - - - - - True - False - end - Error - - - - - - - True - True - 2 - - - - + True False - start - Error has occured while installation process - center - True - - - + vertical + 5 + + + True + False + 10 + 10 + 10 + 10 + 5 + + + True + False + 48 + com.ublinux.ubinstall-gtk + 0 + + + False + True + 0 + + + + + True + False + vertical + + + True + False + Choose system kernel + True + 0 + + + + + + + + + False + True + 0 + + + + + True + False + This program will ask you few questions and help you install system on your computer + center + True + 0 + + + + + + False + True + 1 + + + + + True + True + 1 + + + + + False + True + -1 + + + + + True + False + + + False + True + 1 + + - True + False True - 3 + 0 - - - 18 - - - - - True - False - Configuration error - - - 18 - False - - - - - True - False - vertical - 5 True @@ -4831,7 +6360,7 @@ or continue working in the environment, booted from the Live image. False True - 0 + 1 @@ -4841,7 +6370,7 @@ or continue working in the environment, booted from the Live image. False True - 1 + 2 @@ -4858,7 +6387,7 @@ or continue working in the environment, booted from the Live image. True True - 2 + 3 @@ -4876,7 +6405,7 @@ or continue working in the environment, booted from the Live image. True True - 3 + 4 @@ -4901,6 +6430,110 @@ or continue working in the environment, booted from the Live image. False vertical 5 + + + True + False + vertical + 5 + + + True + False + 10 + 10 + 10 + 10 + 5 + + + True + False + 48 + com.ublinux.ubinstall-gtk + 0 + + + False + True + 0 + + + + + True + False + vertical + + + True + False + Choose system kernel + True + 0 + + + + + + + + + False + True + 0 + + + + + True + False + This program will ask you few questions and help you install system on your computer + center + True + 0 + + + + + + False + True + 1 + + + + + True + True + 1 + + + + + False + True + -1 + + + + + True + False + + + False + True + 1 + + + + + False + True + 0 + + True @@ -4916,7 +6549,7 @@ or continue working in the environment, booted from the Live image. False True - 0 + 1 @@ -4926,7 +6559,7 @@ or continue working in the environment, booted from the Live image. False True - 1 + 2 @@ -4943,7 +6576,7 @@ or continue working in the environment, booted from the Live image. True True - 2 + 3 @@ -4961,7 +6594,7 @@ or continue working in the environment, booted from the Live image. True True - 3 + 4 @@ -4986,23 +6619,6 @@ or continue working in the environment, booted from the Live image. False vertical 5 - - - True - False - Installation parameters - - - - - - - - False - True - 0 - - True @@ -5029,12 +6645,18 @@ or continue working in the environment, booted from the Live image. True False + 10 + 10 + 10 + 10 5 True False + 48 /com/ublinux/images/install_type_fast_normal.png + 0 False @@ -5047,15 +6669,18 @@ or continue working in the environment, booted from the Live image. True False vertical - 5 - + True False Installation + True 0 - + + + + @@ -5065,11 +6690,16 @@ or continue working in the environment, booted from the Live image. - + True False Deleting all data on the selected disk and then installing the system + center + True 0 + + + False @@ -5088,9 +6718,33 @@ or continue working in the environment, booted from the Live image. False True - 0 + -1 + + + + + True + False + + + False + True + 1 + + + False + True + 0 + + + + + True + False + vertical + 5 True @@ -5218,7 +6872,7 @@ or continue working in the environment, booted from the Live image. False True - 0 + 1 @@ -5429,23 +7083,6 @@ or continue working in the environment, booted from the Live image. False vertical 5 - - - True - False - Installation parameters - - - - - - - - False - True - 0 - - True @@ -5472,12 +7109,18 @@ or continue working in the environment, booted from the Live image. True False + 10 + 10 + 10 + 10 5 True False + 48 /com/ublinux/images/install_type_next_normal.png + 0 False @@ -5490,15 +7133,18 @@ or continue working in the environment, booted from the Live image. True False vertical - 5 - + True False Installation next to another system + True 0 - + + + + @@ -5508,11 +7154,16 @@ or continue working in the environment, booted from the Live image. - + True False Shrinking a partition and creating a new one for installing OS + center + True 0 + + + False @@ -5531,23 +7182,18 @@ or continue working in the environment, booted from the Live image. False True - 1 + -1 - + True False - <b>Attention!</b> The system will be installed in the selected partition. If you do not change the FS type or format, all data on the partition will be saved. - True - True - 0 - 0 False True - 2 + 1 @@ -5557,6 +7203,22 @@ or continue working in the environment, booted from the Live image. 0 + + + True + False + <b>Attention!</b> The system will be installed in the selected partition. If you do not change the FS type or format, all data on the partition will be saved. + True + True + 0 + 0 + + + False + True + 1 + + True @@ -5808,7 +7470,7 @@ or continue working in the environment, booted from the Live image. False True - 1 + 2 @@ -6095,23 +7757,6 @@ or continue working in the environment, booted from the Live image. False vertical 5 - - - True - False - Installation parameters - - - - - - - - False - True - 0 - - True @@ -6132,22 +7777,24 @@ or continue working in the environment, booted from the Live image. True False - center - center - 20 - 20 vertical 5 True False + 10 + 10 + 10 + 10 5 True False + 48 /com/ublinux/images/install_type_part_normal.png + 0 False @@ -6160,15 +7807,18 @@ or continue working in the environment, booted from the Live image. True False vertical - 5 - + True False Installation on the same partition as another system + True 0 - + + + + @@ -6178,11 +7828,16 @@ or continue working in the environment, booted from the Live image. - + True False Unpacking into an existing system + center + True 0 + + + False @@ -6201,23 +7856,18 @@ or continue working in the environment, booted from the Live image. False True - 1 + -1 - + True False - <b>Attention!</b> The system will be installed on the selected partition with OS already installed. All user data will be saved. - True - True - 0 - 0 False True - 2 + 1 @@ -6227,6 +7877,22 @@ or continue working in the environment, booted from the Live image. 0 + + + True + False + <b>Attention!</b> The system will be installed on the selected partition with OS already installed. All user data will be saved. + True + True + 0 + 0 + + + False + True + 1 + + True @@ -6476,7 +8142,7 @@ or continue working in the environment, booted from the Live image. False True - 1 + 2 @@ -6720,23 +8386,6 @@ or continue working in the environment, booted from the Live image. False vertical 5 - - - True - False - Installation parameters - - - - - - - - False - True - 0 - - True @@ -6747,12 +8396,18 @@ or continue working in the environment, booted from the Live image. True False + 10 + 10 + 10 + 10 5 True False + 48 /com/ublinux/images/install_type_custom_normal.png + 0 False @@ -6766,13 +8421,17 @@ or continue working in the environment, booted from the Live image. False vertical - + True False Advanced installation mode + True 0 - + + + + @@ -6782,11 +8441,16 @@ or continue working in the environment, booted from the Live image. - + True False Installing OS files, user data on different partitions, creating RAID, etc. + center + True 0 + + + False @@ -6805,17 +8469,13 @@ or continue working in the environment, booted from the Live image. False True - 0 + -1 - + True False - <b>Attention!</b> The selected system components will be installed -separately into the selected partition. - True - 0 False @@ -6824,6 +8484,21 @@ separately into the selected partition. + + False + True + 0 + + + + + True + False + <b>Attention!</b> The selected system components will be installed +separately into the selected partition. + True + 0 + False True @@ -7768,15 +9443,102 @@ separately into the selected partition. vertical 5 - + True False - Installation options - - - - - + vertical + 5 + + + True + False + 10 + 10 + 10 + 10 + 5 + + + True + False + 48 + /com/ublinux/images/install_type_recovery_normal.png + 0 + + + False + True + 0 + + + + + True + False + vertical + + + True + False + Advanced installation mode + True + 0 + + + + + + + + + False + True + 0 + + + + + True + False + Installing OS files, user data on different partitions, creating RAID, etc. + center + True + 0 + + + + + + False + True + 1 + + + + + True + True + 1 + + + + + False + True + -1 + + + + + True + False + + + False + True + 1 + + False @@ -7798,96 +9560,18 @@ separately into the selected partition. False vertical - + True False - vertical - 5 - - - True - False - 5 - - - True - False - /com/ublinux/images/install_type_recovery_normal.png - - - False - True - 0 - - - - - True - False - vertical - - - True - False - Advanced installation mode - 0 - - - - - - False - True - 0 - - - - - True - False - Installing OS files, user data on different partitions, creating RAID, etc. - 0 - - - False - True - 1 - - - - - True - True - 1 - - - - - False - True - 0 - - - - - True - False - <b>Attention!</b> The selected system components will be installed + <b>Attention!</b> The selected system components will be installed separately into the selected partition. - True - 0 - - - False - True - 1 - - + True + 0 False True - 1 + 0 @@ -8250,15 +9934,102 @@ separately into the selected partition. vertical 5 - + True False - Installation parameters - - - - - + vertical + 5 + + + True + False + 10 + 10 + 10 + 10 + 5 + + + True + False + 48 + /com/ublinux/images/install_type_grub_install_normal.png + 0 + + + False + True + 0 + + + + + True + False + vertical + + + True + False + GRUB install + True + 0 + + + + + + + + + False + True + 0 + + + + + True + False + Install the GRUB bootloader + center + True + 0 + + + + + + False + True + 1 + + + + + True + True + 1 + + + + + False + True + -1 + + + + + True + False + + + False + True + 1 + + False @@ -8286,72 +10057,6 @@ separately into the selected partition. False vertical 5 - - - True - False - 5 - - - True - False - /com/ublinux/images/install_type_grub_install_normal.png - - - False - True - 0 - - - - - True - False - vertical - 5 - - - True - False - GRUB install - 0 - - - - - - False - True - 0 - - - - - True - False - Install the GRUB bootloader - 0 - - - False - True - 1 - - - - - True - True - 1 - - - - - False - True - 0 - - True @@ -8625,108 +10330,129 @@ separately into the selected partition. vertical 5 - + True False - Installation parameters - - - - - - - - False - True - 0 - - - - - True - True + vertical + 5 - + True False + 10 + 10 + 10 + 10 + 5 + + + True + False + 48 + /com/ublinux/images/install_type_grub_update_normal.png + 0 + + + False + True + 0 + + True False vertical - 5 - + True False - vertical - 5 - - - True - False - 5 - - - True - False - /com/ublinux/images/install_type_grub_update_normal.png - - - False - True - 0 - - - - - True - False - vertical - 5 - - - True - False - GRUB update - 0 - - - - - - False - True - 0 - - - - - True - False - Update (reinstall) the GRUB bootloader - 0 - - - False - True - 1 - - - - - True - True - 1 - - - - - False - True - 0 - - + GRUB update + True + 0 + + + + + + + + + False + True + 0 + + + + + True + False + Update (reinstall) the GRUB bootloader + center + True + 0 + + + + + + False + True + 1 + + + + + True + True + 1 + + + + + False + True + -1 + + + + + True + False + + + False + True + 1 + + + + + False + True + 0 + + + + + True + True + + + True + False + + + True + False + vertical + 5 + + + True + False + vertical + 5 True @@ -8993,15 +10719,102 @@ separately into the selected partition. vertical 5 - + True False - Installation parameters - - - - - + vertical + 5 + + + True + False + 10 + 10 + 10 + 10 + 5 + + + True + False + 48 + /com/ublinux/images/install_type_system_only_normal.png + 0 + + + False + True + 0 + + + + + True + False + vertical + + + True + False + OS only + True + 0 + + + + + + + + + False + True + 0 + + + + + True + False + Installing only OS components without user data + center + True + 0 + + + + + + False + True + 1 + + + + + True + True + 1 + + + + + False + True + -1 + + + + + True + False + + + False + True + 1 + + False @@ -9029,72 +10842,6 @@ separately into the selected partition. False vertical 5 - - - True - False - 5 - - - True - False - /com/ublinux/images/install_type_system_only_normal.png - - - False - True - 0 - - - - - True - False - vertical - 5 - - - True - False - OS only - 0 - - - - - - False - True - 0 - - - - - True - False - Installing only OS components without user data - 0 - - - False - True - 1 - - - - - True - True - 1 - - - - - False - True - 0 - - True @@ -9432,11 +11179,9 @@ separately into the selected partition. - + True False - none - True True @@ -9527,7 +11272,6 @@ separately into the selected partition. True - False False 1 @@ -9588,6 +11332,9 @@ separately into the selected partition. True False + + Default + False @@ -9708,15 +11455,102 @@ separately into the selected partition. vertical 5 - + True False - Installation parameters - - - - - + vertical + 5 + + + True + False + 10 + 10 + 10 + 10 + 5 + + + True + False + 48 + /com/ublinux/images/install_type_data_only_normal.png + 0 + + + False + True + 0 + + + + + True + False + vertical + + + True + False + User data only + True + 0 + + + + + + + + + False + True + 0 + + + + + True + False + Installing only user data without OS components + center + True + 0 + + + + + + False + True + 1 + + + + + True + True + 1 + + + + + False + True + -1 + + + + + True + False + + + False + True + 1 + + False @@ -10149,11 +11983,9 @@ separately into the selected partition. - + True False - none - True True @@ -10246,7 +12078,6 @@ separately into the selected partition. True - False False 1 @@ -10307,6 +12138,9 @@ separately into the selected partition. True False + + Default + False -- 2.35.1 From d73f327c4a2ca301f69e11ba593c1c54390a0539 Mon Sep 17 00:00:00 2001 From: Ivan Dmitrievich Yartsev Date: Tue, 2 Dec 2025 18:22:53 +0600 Subject: [PATCH 08/10] Tabs hide --- ubinstall-gtk.glade | 1 + 1 file changed, 1 insertion(+) diff --git a/ubinstall-gtk.glade b/ubinstall-gtk.glade index 1c51eba..8f2fcbf 100644 --- a/ubinstall-gtk.glade +++ b/ubinstall-gtk.glade @@ -754,6 +754,7 @@ agreement 5 5 left + False True -- 2.35.1 From da8c28ebd92ae8e504f5b81c0dc2f2a93ba0bbfe Mon Sep 17 00:00:00 2001 From: Ivan Dmitrievich Yartsev Date: Wed, 3 Dec 2025 14:26:48 +0600 Subject: [PATCH 09/10] Changed configuration window path loading --- source/ubinstall-gtk-configuration-mode.c | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/source/ubinstall-gtk-configuration-mode.c b/source/ubinstall-gtk-configuration-mode.c index 1d0ef6a..a004460 100644 --- a/source/ubinstall-gtk-configuration-mode.c +++ b/source/ubinstall-gtk-configuration-mode.c @@ -10,8 +10,16 @@ void configuration_mode_accept(GtkWidget *,configuration_window *window){ if (access(path,F_OK)){ int homedir_create = 0; - if (!strstr(path,"/")){ - homedir_create = 1; + int file_create = 0; + int pos = yon_char_find_last((char*)path,'/'); + if (pos>=-1){ + char *path_copy = yon_char_new(path); + char *dir_path = yon_char_divide(path_copy,pos); + if (access(dir_path,F_OK)){ + homedir_create = 1; + } + free(path_copy); + free(dir_path); } dialog_confirmation_data *data = yon_confirmation_dialog_data_new(); data->action_text = homedir_create?CREATE_CONFIG_DIALOG_LABEL_HOMEDIR:CREATE_CONFIG_DIALOG_LABEL; @@ -20,6 +28,8 @@ void configuration_mode_accept(GtkWidget *,configuration_window *window){ char *full_path = NULL; if (homedir_create){ full_path = yon_char_unite(yon_ubl_user_get_home_directory(),"/",path,NULL); + } else if (file_create){ + } else { full_path = yon_char_new(path); } @@ -33,12 +43,8 @@ void configuration_mode_accept(GtkWidget *,configuration_window *window){ } void on_path_choose(GtkWidget *,configuration_window *window){ - filechooser_window *dialog = yon_file_chooser_window_new(GTK_FILE_CHOOSER_ACTION_SAVE); + filechooser_window *dialog = yon_config_file_chooser_window_new(GTK_FILE_CHOOSER_ACTION_SAVE); yon_gtk_window_setup(GTK_WINDOW(dialog->Window),GTK_WINDOW(window->Window),CONFIGURATION_MODE_TITLE_LABEL,icon_path,"filechooser_window"); - GtkFileFilter *filter = gtk_file_filter_new(); - gtk_file_filter_add_pattern(filter,"*.ini"); - gtk_file_filter_set_name(filter,"*.ini"); - gtk_file_chooser_add_filter(GTK_FILE_CHOOSER(dialog->MainFileChooser),filter); if (yon_file_chooser_start(dialog)==GTK_RESPONSE_APPLY){ gtk_entry_set_text(GTK_ENTRY(window->PathEntry),dialog->last_success_selection); free(dialog); -- 2.35.1 From 8e414300f9ffa5d6533f1cd92b069a25b1fb673d Mon Sep 17 00:00:00 2001 From: Ivan Dmitrievich Yartsev Date: Wed, 3 Dec 2025 17:59:32 +0600 Subject: [PATCH 10/10] Kernel addon slide remake --- gresource.xml | 1 + locale/ubinstall-gtk.pot | 14 ++ locale/ubinstall-gtk_ru.po | 14 +- source/CMakeLists.txt | 1 + source/ubinstall-gtk-components.c | 62 ++++----- source/ubinstall-gtk-kernel.c | 122 +++++++++++++++--- source/ubinstall-gtk.c | 17 +-- source/ubinstall-gtk.h | 38 ++++-- source/ubl-strings.h | 4 + ubinstall-gtk-kernel-addon-row.glade | 183 +++++++++++++++++++++++++++ ubinstall-gtk.glade | 143 ++++----------------- 11 files changed, 414 insertions(+), 185 deletions(-) create mode 100644 ubinstall-gtk-kernel-addon-row.glade diff --git a/gresource.xml b/gresource.xml index a7ef298..fc38ddb 100644 --- a/gresource.xml +++ b/gresource.xml @@ -10,6 +10,7 @@ ubinstall-gtk-menu.glade ubinstall-gtk-menu-item.glade ubinstall-gtk-kernel-row.glade + ubinstall-gtk-kernel-addon-row.glade ubinstall-gtk-os-row.glade ubinstall-gtk-service-window.glade ubinstall-gtk-bootloader-user.glade diff --git a/locale/ubinstall-gtk.pot b/locale/ubinstall-gtk.pot index 14ba39c..68c41b1 100644 --- a/locale/ubinstall-gtk.pot +++ b/locale/ubinstall-gtk.pot @@ -1188,3 +1188,17 @@ msgstr "" #: source/ubl-strings.h:331 msgid "Repeating values" msgstr "" + +#: source/ubl-strings.h:331 +msgid "Package information" +msgstr "" + +#: source/ubl-strings.h:331 +msgid "Package:" +msgstr "" + +#: source/ubl-strings.h:331 +msgid "Module:" +msgstr "" + + diff --git a/locale/ubinstall-gtk_ru.po b/locale/ubinstall-gtk_ru.po index 12c1eb2..20d9b39 100644 --- a/locale/ubinstall-gtk_ru.po +++ b/locale/ubinstall-gtk_ru.po @@ -3027,4 +3027,16 @@ msgstr "Цюрих" #: source/ubl-strings.h:331 msgid "Repeating values" -msgstr "Повторяющиеся значения" \ No newline at end of file +msgstr "Повторяющиеся значения" + +#: source/ubl-strings.h:331 +msgid "Package information" +msgstr "Информация о пакете" + +#: source/ubl-strings.h:331 +msgid "Package:" +msgstr "Пакет:" + +#: source/ubl-strings.h:331 +msgid "Module:" +msgstr "Модуль:" diff --git a/source/CMakeLists.txt b/source/CMakeLists.txt index 9e28868..acc10a7 100644 --- a/source/CMakeLists.txt +++ b/source/CMakeLists.txt @@ -63,6 +63,7 @@ set(DEPENDFILES ../ubinstall-gtk-menu.glade ../ubinstall-gtk-menu-item.glade ../ubinstall-gtk-kernel-row.glade + ../ubinstall-gtk-kernel-addon-row.glade ../ubinstall-gtk-os-row.glade ../ubinstall-gtk-service-window.glade ../ubinstall-gtk-bootloader-user.glade diff --git a/source/ubinstall-gtk-components.c b/source/ubinstall-gtk-components.c index f4a4f71..ad413ef 100644 --- a/source/ubinstall-gtk-components.c +++ b/source/ubinstall-gtk-components.c @@ -232,37 +232,37 @@ void yon_os_components_init(main_window *widgets){ } } -int yon_software_save(main_window *widgets){ - GtkTreeIter iter; - GtkTreeModel *model = GTK_TREE_MODEL(widgets->AdditionalSoftwareList); - int size = 0; - config_str modules = NULL; - for_iter(model,&iter){ - char *target; - int status; - gtk_tree_model_get(model,&iter,0,&status,1,&target,-1); - if (status){ - yon_char_parsed_add_or_create_if_exists(modules,&size,target); - } - } - if (size){ - char *final = yon_char_parsed_to_string(modules,size,","); - char *parameter = config(modules_extra_parameter); - char *parameter_new = yon_char_unite(!yon_char_is_empty(parameter)?parameter:"",!yon_char_is_empty(parameter)?",":"",final,NULL); - yon_config_register(modules_extra_parameter,modules_extra_parameter_command,parameter_new); - free(parameter_new); - } - if (!main_config.configure_mode){ - int size; - config_str parameters = yon_config_get_save_parameters_by_key(&size,modules_extra_parameter,NULL); - if (parameters){ - char *command_parameters = yon_char_parsed_to_string(parameters,size," -- "); - char *command = yon_char_unite(ubconfig_dull_command,"--target system ",command_parameters,NULL); - if (!system(yon_debug_output("%s\n",command))){} - free(command); - yon_char_parsed_free(parameters,size); - } - } +int yon_software_save(main_window *){ + // GtkTreeIter iter; + // GtkTreeModel *model = GTK_TREE_MODEL(widgets->AdditionalSoftwareList); + // int size = 0; + // config_str modules = NULL; + // for_iter(model,&iter){ + // char *target; + // int status; + // gtk_tree_model_get(model,&iter,0,&status,1,&target,-1); + // if (status){ + // yon_char_parsed_add_or_create_if_exists(modules,&size,target); + // } + // } + // if (size){ + // char *final = yon_char_parsed_to_string(modules,size,","); + // char *parameter = config(modules_extra_parameter); + // char *parameter_new = yon_char_unite(!yon_char_is_empty(parameter)?parameter:"",!yon_char_is_empty(parameter)?",":"",final,NULL); + // yon_config_register(modules_extra_parameter,modules_extra_parameter_command,parameter_new); + // free(parameter_new); + // } + // if (!main_config.configure_mode){ + // int size; + // config_str parameters = yon_config_get_save_parameters_by_key(&size,modules_extra_parameter,NULL); + // if (parameters){ + // char *command_parameters = yon_char_parsed_to_string(parameters,size," -- "); + // char *command = yon_char_unite(ubconfig_dull_command,"--target system ",command_parameters,NULL); + // if (!system(yon_debug_output("%s\n",command))){} + // free(command); + // yon_char_parsed_free(parameters,size); + // } + // } return 1; } diff --git a/source/ubinstall-gtk-kernel.c b/source/ubinstall-gtk-kernel.c index f76edfe..2d1e50e 100644 --- a/source/ubinstall-gtk-kernel.c +++ b/source/ubinstall-gtk-kernel.c @@ -97,10 +97,10 @@ void yon_kernel_row_setup(kernel_row *row, char *name, char *modules,char *packa row->modules = yon_char_new(modules); row->package = yon_char_new(package); - char *description_full = yon_char_new(description); + char *description_full = yon_char_new(_(description)); if (strlen(description)>100){ guint size; - config_str description_wrapped = yon_char_wrap_to_lines(description,3,&size); + config_str description_wrapped = yon_char_wrap_to_lines(description_full,3,&size); description_full = yon_char_parsed_to_string(description_wrapped,size,"\n"); yon_char_parsed_free(description_wrapped,size); } @@ -154,9 +154,6 @@ void yon_kernel_addon_resize(main_window *widgets){ int install_size=0; int name_size=0; int modules_size=0; - gtk_widget_get_preferred_width(widgets->KernelAddonInstallLabel,&install_size,NULL); - gtk_widget_get_preferred_width(widgets->KernelAddonNameLabel,&name_size,NULL); - gtk_widget_get_preferred_width(widgets->KernelAddonModulesLabel,&modules_size,NULL); for (;iter;iter=iter->next){ kernel_row *row = g_object_get_data(G_OBJECT(iter->data),"kernel_row"); @@ -168,8 +165,6 @@ void yon_kernel_addon_resize(main_window *widgets){ if (name_sizeKernelAddonNameLabel),name_size,-1); - gtk_widget_set_size_request(GTK_WIDGET(widgets->KernelAddonModulesLabel),modules_size,-1); for (iter = list;iter;iter = iter->next){ kernel_row *row = g_object_get_data(G_OBJECT(iter->data),"kernel_row"); gtk_widget_set_size_request(GTK_WIDGET(row->InstallCheck),install_size,-1); @@ -241,11 +236,110 @@ void yon_kernel_setup(main_window *widgets){ yon_char_parsed_free(modules_parsed,modules_size); } +void on_kernel_addon_install_enabled(GtkWidget *, kernel_addon_row *row){ + if (!gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(row->InstallCheck))){ + gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(main_config.kernel_unchosen_radio),1); + } +} + + +void on_kernel_addon_info(GtkLabel *self){ + yon_window *window = yon_window_new(); + yon_gtk_window_setup(GTK_WINDOW(window->Window),NULL,TITLE_LABEL,icon_path,"info-label"); + char *package=NULL; + package = yon_char_new(gtk_label_get_text(self)); + int size; + + if (strstr(package,",")){ + + char *temp = yon_char_replace(package,","," "); + free(package); + package = temp; + } + + GtkWidget *label = NULL; + config_str info = yon_config_load(get_package_info_command(package),&size); + if (size!=-1){ + char *final_text = yon_char_parsed_to_string(info,size,""); + label = gtk_label_new(final_text); + gtk_widget_show(label); + gtk_box_pack_start(GTK_BOX(window->MainBox),label,0,0,0); + free(final_text); + } else { + label = gtk_label_new(PACKAGE_NOT_FOUND_LABEL); + gtk_widget_show(label); + gtk_box_pack_start(GTK_BOX(window->MainBox),label,0,0,0); + } + gtk_label_set_xalign(GTK_LABEL(label),0); + gtk_widget_show(window->Window); +} + +kernel_addon_row *yon_kernel_addon_row_new(){ + kernel_addon_row *row = new(kernel_addon_row); + GtkBuilder *builder = gtk_builder_new_from_resource(glade_path_kernel_addon_row); + + row->RowBox = yon_gtk_builder_get_widget(builder,"TableRow"); + row->InstallCheck = yon_gtk_builder_get_widget(builder,"InstallCheck"); + row->NameLabel = yon_gtk_builder_get_widget(builder,"NameLabel"); + row->ModuleLabel = yon_gtk_builder_get_widget(builder,"ModuleLabel"); + row->PackageLabel = yon_gtk_builder_get_widget(builder,"PackageLabel"); + row->DescriptionLabel = yon_gtk_builder_get_widget(builder,"DescriptionLabel"); + row->name=NULL; + row->modules=NULL; + row->package=NULL; + + g_signal_connect(G_OBJECT(row->InstallCheck),"toggled",G_CALLBACK(on_kernel_addon_install_enabled),row); + g_signal_connect(G_OBJECT(row->ModuleLabel),"activate-link",G_CALLBACK(on_kernel_addon_info),NULL); + g_signal_connect(G_OBJECT(row->PackageLabel),"activate-link",G_CALLBACK(on_kernel_addon_info),NULL); + + row->row = gtk_list_box_row_new(); + gtk_container_add(GTK_CONTAINER(row->row),row->RowBox); + gtk_widget_show(row->row); + + g_object_set_data(G_OBJECT(row->InstallCheck),"kernel_row",row); + g_object_set_data(G_OBJECT(row->row),"kernel_row",row); + + return row; +} + +void yon_kernel_addon_row_setup(kernel_addon_row *row, char *name, char *modules,char *package, char *description){ + row->name = yon_char_new(name); + row->modules = yon_char_new(modules); + row->package = yon_char_new(package); + + char *description_full = yon_char_new(_(description)); + if (strlen(description)>100){ + guint size; + config_str description_wrapped = yon_char_wrap_to_lines(description,3,&size); + description_full = yon_char_parsed_to_string(description_wrapped,size,"\n"); + yon_char_parsed_free(description_wrapped,size); + } + + char *package_label = NULL; + if (!yon_char_is_empty(row->modules)){ + package_label = yon_char_unite("",row->modules,"",NULL); + gtk_label_set_markup(GTK_LABEL(row->PackageLabel),package_label); + } else { + gtk_widget_hide(gtk_widget_get_parent(row->PackageLabel)); + } + char *module_label = NULL; + if (!yon_char_is_empty(row->package)){ + module_label = yon_char_unite("",row->package,"",NULL); + gtk_label_set_markup(GTK_LABEL(row->ModuleLabel),module_label); + } else { + gtk_widget_hide(gtk_widget_get_parent(row->ModuleLabel)); + } + gtk_label_set_label(GTK_LABEL(row->NameLabel),_(name)); + gtk_label_set_label(GTK_LABEL(row->DescriptionLabel),description_full); + + free(description_full); +} + void yon_kernel_addon_setup(main_window *widgets){ GList *list = gtk_container_get_children(GTK_CONTAINER(widgets->KernelAddonListBox)); GList *iter; for (iter = list; iter; iter = iter->next){ - kernel_row *row = g_object_get_data(G_OBJECT(iter->data),"kernel_row"); + kernel_addon_row *row = g_object_get_data(G_OBJECT(iter->data),"kernel_row"); if (row){ if (row->name) free(row->name); if (!yon_char_is_empty(row->modules)) free(row->modules); @@ -271,26 +365,20 @@ void yon_kernel_addon_setup(main_window *widgets){ config_str parsed = yon_char_parse(kernels[i],&parsed_size,";"); char *name = parsed[0]; char *modules = yon_char_new(parsed[1]); - char *tags = NULL; char *package = parsed[2]; char *description = parsed[3]; - kernel_row *row = yon_kernel_row_new(); + kernel_addon_row *row = yon_kernel_addon_row_new(); gtk_list_box_insert(GTK_LIST_BOX(widgets->KernelAddonListBox),row->row,-1); - gtk_size_group_add_widget(widgets->KernelSizeGroup,row->TagsBox); - gtk_widget_destroy(row->TagsBox); - gtk_widget_destroy(row->TagsSeparator); - gtk_widget_destroy(row->EnableRadio); - gtk_widget_destroy(row->EnableSeparator); - yon_kernel_row_setup(row,name,modules,package,tags,description); + yon_kernel_addon_row_setup(row,name,modules,package,description); if (yon_char_parsed_check_exist(modules_parsed,modules_size,parsed[1])>-1){ gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(row->InstallCheck),1); } else { gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(row->InstallCheck),0); } - yon_char_parsed_free(parsed,parsed_size); + // yon_char_parsed_free(parsed,parsed_size); } yon_kernel_addon_resize(widgets); diff --git a/source/ubinstall-gtk.c b/source/ubinstall-gtk.c index 1b6d0e9..5c88d01 100644 --- a/source/ubinstall-gtk.c +++ b/source/ubinstall-gtk.c @@ -574,12 +574,12 @@ void config_init(){ // void *on_setup_system_configuration(void *data); -void on_additional_software_toggled(GtkWidget *, char *path, main_window *widgets){ - GtkTreeIter iter; - int status; - gtk_tree_model_get_iter_from_string(GTK_TREE_MODEL(widgets->AdditionalSoftwareList),&iter,path); - gtk_tree_model_get(GTK_TREE_MODEL(widgets->AdditionalSoftwareList),&iter,0,&status,-1); - gtk_list_store_set(widgets->AdditionalSoftwareList,&iter,0,!status,-1); +void on_additional_software_toggled(GtkWidget *, char *, main_window *){ + // GtkTreeIter iter; + // int status; + // gtk_tree_model_get_iter_from_string(GTK_TREE_MODEL(widgets->AdditionalSoftwareList),&iter,path); + // gtk_tree_model_get(GTK_TREE_MODEL(widgets->AdditionalSoftwareList),&iter,0,&status,-1); + // gtk_list_store_set(widgets->AdditionalSoftwareList,&iter,0,!status,-1); } void on_gparted_open(){ @@ -975,9 +975,7 @@ void yon_main_window_create(main_window *widgets){ widgets->KeyboardBox = yon_gtk_builder_get_widget(builder,"KeyboardBox"); widgets->KeyboardLayoutChosenCell = GTK_CELL_RENDERER(gtk_builder_get_object(builder,"KeyboardLayoutChosenCell")); - widgets->AdditionalSoftwareList = GTK_LIST_STORE(gtk_builder_get_object(builder,"AdditionalSoftwareList")); - widgets->AdditionalSoftwareTree = yon_gtk_builder_get_widget(builder,"AdditionalSoftwareTree"); - widgets->AdditionalSoftwareCell = GTK_CELL_RENDERER(gtk_builder_get_object(builder,"AdditionalSoftwareCell")); + widgets->AdditionalComponentsList = yon_gtk_builder_get_widget(builder,"AdditionalComponentsList"); widgets->InstallationProgress = yon_gtk_builder_get_widget(builder,"InstallationProgress"); @@ -1113,7 +1111,6 @@ void yon_main_window_create(main_window *widgets){ g_signal_connect(G_OBJECT(widgets->LanguagesTree),"cursor-changed",G_CALLBACK(on_locale_changed),widgets); g_signal_connect(G_OBJECT(widgets->CountryLanguagesTree),"row-activated",G_CALLBACK(on_installer_language_changed),widgets); // g_signal_connect(G_OBJECT(widgets->LanguageCombo),"changed",G_CALLBACK(on_locale_changed),widgets); - g_signal_connect(G_OBJECT(widgets->AdditionalSoftwareCell),"toggled",G_CALLBACK(on_additional_software_toggled),widgets); g_signal_connect(G_OBJECT(widgets->StartupChosenCell),"toggled",G_CALLBACK(on_srartup_services_toggled),widgets); g_signal_connect(G_OBJECT(widgets->StartupServicesTree),"cursor-changed",G_CALLBACK(on_startup_services_selection_changed),widgets); diff --git a/source/ubinstall-gtk.h b/source/ubinstall-gtk.h index 383a382..fb7f732 100755 --- a/source/ubinstall-gtk.h +++ b/source/ubinstall-gtk.h @@ -30,6 +30,7 @@ #define glade_path_menu_window "/com/ublinux/ui/ubinstall-gtk-menu.glade" #define glade_path_menu_item "/com/ublinux/ui/ubinstall-gtk-menu-item.glade" #define glade_path_kernel_row "/com/ublinux/ui/ubinstall-gtk-kernel-row.glade" +#define glade_path_kernel_addon_row "/com/ublinux/ui/ubinstall-gtk-kernel-addon-row.glade" #define glade_path_os_row "/com/ublinux/ui/ubinstall-gtk-os-row.glade" #define glade_path_service "/com/ublinux/ui/ubinstall-gtk-service-window.glade" #define glade_path_bootloader_user "/com/ublinux/ui/ubinstall-gtk-bootloader-user.glade" @@ -274,6 +275,8 @@ layout && /description:/ {\ #define languages_command "while IFS= read -ru3 SELECT_LOCALE; do SELECT_LOCALE=\"${SELECT_LOCALE% *}\"; [[ $(< /usr/share/i18n/locales/${SELECT_LOCALE%.*}) =~ (\"language\"[[:blank:]]*\\\"([^\\\"]*)\\\".*\"territory\"[[:blank:]]*\\\"([^\\\"]*)\\\".*\"country_name\"[[:blank:]]*\\\"([^\\\"]*)\\\".*\"lang_name\"[[:blank:]]*\\\"([^\\\"]*)\\\")|(\"language\"[[:blank:]]*\\\"([^\\\"]*)\\\".*\"territory\"[[:blank:]]*\\\"([^\\\"]*)\\\".*\"lang_name\"[[:blank:]]*\\\"([^\\\"]*)\\\")|(\"language\"[[:blank:]]*\\\"([^\\\"]*)\\\".*\"territory\"[[:blank:]]*\\\"([^\\\"]*)\\\") ]] && echo \"${SELECT_LOCALE}|${BASH_REMATCH[2]}${BASH_REMATCH[7]}${BASH_REMATCH[11]}${BASH_REMATCH[5]:+ (${BASH_REMATCH[5]})}${BASH_REMATCH[9]:+ (${BASH_REMATCH[9]})}|${BASH_REMATCH[3]}${BASH_REMATCH[8]}${BASH_REMATCH[12]}${BASH_REMATCH[4]:+ (${BASH_REMATCH[4]})}\" || echo \"${SELECT_LOCALE}\"; done 3< \"/usr/share/i18n/SUPPORTED\"" +#define get_package_info_command(target) yon_char_append("pacman -Si ",target) + #define install_common_parameters \ AUTOINSTALL_TYPE_INSTALL,\ AUTOINSTALL_DEVICE,\ @@ -420,7 +423,6 @@ typedef struct { GtkListStore *DevicesList; GtkListStore *LanguagesList; GtkTreeStore *LayoutList; - GtkListStore *AdditionalSoftwareList; GtkListStore *PartitionsList; GtkWidget *LoadGlobalConfigurationMenuItem; @@ -540,9 +542,7 @@ typedef struct { GtkWidget *AboutMenuItem; GtkWidget *DocumentationMenuItem; - GtkCellRenderer *AdditionalSoftwareCell; - - GtkWidget *AdditionalSoftwareTree; + GtkWidget *AdditionalComponentsList; GtkWidget *GrubInstallRadio; GtkWidget *GrubUpdateRadio; @@ -851,28 +851,42 @@ typedef struct { typedef struct { GtkWidget *row; GtkWidget *RowBox; - GtkWidget *TagsBox; GtkWidget *InstallCheck; + GtkWidget *NameLabel; + GtkWidget *DescriptionLabel; + GtkWidget *ModulesLabel; + GtkWidget *TagsBox; GtkWidget *EnableRadio; GtkWidget *EnableSeparator; GtkWidget *TagsSeparator; + + char *name; + char *modules; + char *package; +} kernel_row; + +typedef struct { + GtkWidget *row; + GtkWidget *RowBox; + GtkWidget *InstallCheck; GtkWidget *NameLabel; GtkWidget *DescriptionLabel; - GtkWidget *ModulesLabel; + GtkWidget *ModuleLabel; + GtkWidget *PackageLabel; char *name; char *modules; char *package; -} kernel_row; +} kernel_addon_row; typedef struct { GtkWidget *row; GtkWidget *RowBox; - GtkWidget *TagsBox; GtkWidget *InstallCheck; GtkWidget *NameLabel; - GtkWidget *VersionLabel; GtkWidget *DescriptionLabel; + GtkWidget *VersionLabel; + GtkWidget *TagsBox; char *name; char *modules; @@ -1213,4 +1227,8 @@ void on_source_changed(GtkComboBox *self); void yon_focus_set(GtkWidget *,GtkWidget *target); void on_main_window_close(GtkWidget*, main_window *); gboolean yon_maximize_start(main_window *widgets); -void *yon_maximize(main_window *widgets); \ No newline at end of file +void *yon_maximize(main_window *widgets); +kernel_addon_row *yon_kernel_addon_row_new(); +void yon_kernel_addon_row_setup(kernel_addon_row *row, char *name, char *modules,char *package, char *description); +void on_kernel_addon_install_enabled(GtkWidget *, kernel_addon_row *row); +void on_kernel_addon_info(GtkLabel *self); \ No newline at end of file diff --git a/source/ubl-strings.h b/source/ubl-strings.h index b5552cf..5a3b300 100644 --- a/source/ubl-strings.h +++ b/source/ubl-strings.h @@ -230,6 +230,10 @@ NULL) #define CREATE_CONFIG_DIALOG_LABEL _("Configuration file does not exist. Create new configuration file?") #define CREATE_CONFIG_DIALOG_LABEL_HOMEDIR _("Configuration file does not exist. Create new configuration file? New configuration file will be created at your user's home directory") #define ROOT_FORCE_CONFIGURATION_MODE_LABEL _("Warning! Application was launched without root. Only configuration mode is allowed.") +#define PACKAGE_NOT_FOUND_LABEL _("Package were not found") +#define PACKAGE_INFO_LABEL _("Package information") +// #define _LABEL _("Package:") +// #define _LABEL _("Module:") // #define _LABEL _("New section at") // #define _LABEL _("\"/ublinux-data/\" user data section") // #define _LABEL _("\"/ublinux/\" system section") diff --git a/ubinstall-gtk-kernel-addon-row.glade b/ubinstall-gtk-kernel-addon-row.glade new file mode 100644 index 0000000..c418d9a --- /dev/null +++ b/ubinstall-gtk-kernel-addon-row.glade @@ -0,0 +1,183 @@ + + + + + + + True + False + 1 + vertical + + + True + False + 5 + 7 + + + True + True + False + 5 + True + + + + + + False + True + 0 + + + + + True + False + vertical + + + True + False + Name + True + True + False + 0 + + + False + True + 0 + + + + + True + False + 5 + + + True + False + <i><b>Module:</b></i> + True + + + False + True + 0 + + + + + True + False + Name + True + False + 0 + + + False + True + 1 + + + + + False + True + 1 + + + + + True + False + 5 + + + True + False + <i><b>Package:</b></i> + True + + + False + True + 0 + + + + + True + False + Name + True + False + 0 + + + False + True + 1 + + + + + False + True + 2 + + + + + False + True + 3 + + + + + True + False + 5 + 0 + + + False + True + 8 + + + + + True + False + 5 + 0 + + + False + True + end + 9 + + + + + + False + True + 0 + + + + + diff --git a/ubinstall-gtk.glade b/ubinstall-gtk.glade index 8f2fcbf..bb8bea3 100644 --- a/ubinstall-gtk.glade +++ b/ubinstall-gtk.glade @@ -754,7 +754,6 @@ agreement 5 5 left - False True @@ -887,6 +886,9 @@ agreement InstallerLanguageList False 1 + + + True @@ -934,6 +936,9 @@ agreement 1 3 True + + + @@ -1124,12 +1129,14 @@ agreement - - Agree + + Yes, I agree to the License Agreement True True False + True True + LicenseDisgreeRadio False @@ -1137,6 +1144,21 @@ agreement 2 + + + No, i do not agree + True + True + False + True + True + + + False + True + 3 + + 1 @@ -2467,121 +2489,10 @@ agreement 5 5 - + True False - vertical - - - True - False - 2 - 2 - 7 - - - True - False - Install - 0 - - - False - True - 0 - - - - - True - False - - - False - True - 3 - - - - - True - False - Name - 0 - - - False - True - 4 - - - - - True - False - - - False - True - 7 - - - - - True - False - Modules - 0 - - - False - True - 8 - - - - - True - False - - - False - True - 9 - - - - - True - False - Description - 0 - - - True - True - 10 - - - - - False - True - 0 - - - - - True - False - none - - - True - True - 1 - - + none -- 2.35.1