From ad44cd119df9b1cce5999b1447bcf2e3abcefdbe Mon Sep 17 00:00:00 2001 From: Ivan Dmitrievich Yartsev Date: Fri, 28 Nov 2025 14:36:05 +0600 Subject: [PATCH 1/6] Test fix for region locale setting --- source/ubinstall-gtk-region.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/source/ubinstall-gtk-region.c b/source/ubinstall-gtk-region.c index 9732ec9..b4a8dc6 100644 --- a/source/ubinstall-gtk-region.c +++ b/source/ubinstall-gtk-region.c @@ -77,17 +77,19 @@ void yon_region_init(main_window *widgets){ GtkTreeIter iter; gtk_list_store_clear(widgets->LanguagesList); - parsed = yon_file_open(languages_path,&size); + + yon_locale_init(); + + parsed = yon_locale_get_all_codes(&size); + textdomain(LOCALES_DOMAIN_NAME); for (int i=0;iLanguagesList,&iter); - gtk_list_store_set(widgets->LanguagesList,&iter,0,0,1,_(cur[1]),2,cur[0],-1); + gtk_list_store_set(widgets->LanguagesList,&iter,0,0,1,_(lang_name),2,parsed[i],-1); } - yon_char_parsed_free(cur,cur_size); } + textdomain(LocaleName); yon_char_parsed_free(parsed,size); if (lang) yon_char_parsed_free(lang,langsize); -- 2.35.1 From 2da9386f8a3c802383b6b67acf01ee993c913c4d Mon Sep 17 00:00:00 2001 From: Ivan Dmitrievich Yartsev Date: Fri, 28 Nov 2025 15:04:02 +0600 Subject: [PATCH 2/6] Locale names changed --- source/ubinstall-gtk-keyboard.c | 1 + source/ubinstall-gtk-region.c | 10 +++++++++- ubinstall-gtk-language.glade | 6 +++++- 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/source/ubinstall-gtk-keyboard.c b/source/ubinstall-gtk-keyboard.c index 2ca7d6e..01c4ff9 100644 --- a/source/ubinstall-gtk-keyboard.c +++ b/source/ubinstall-gtk-keyboard.c @@ -211,6 +211,7 @@ void on_language_clicked(GtkWidget *, main_window *widgets){ yon_dictionary_add_or_create_if_exists_with_data(dict,"widgets",widgets); yon_dictionary_add_or_create_if_exists_with_data(dict,"window",window); g_signal_connect(G_OBJECT(window->SaveButton),"clicked",G_CALLBACK(on_language_window_accept),dict); + gtk_tree_view_column_clicked(gtk_tree_view_get_column(GTK_TREE_VIEW(window->LanguagesTree),0)); gtk_widget_show(window->MainWindow); } diff --git a/source/ubinstall-gtk-region.c b/source/ubinstall-gtk-region.c index b4a8dc6..9a467d8 100644 --- a/source/ubinstall-gtk-region.c +++ b/source/ubinstall-gtk-region.c @@ -83,10 +83,18 @@ void yon_region_init(main_window *widgets){ parsed = yon_locale_get_all_codes(&size); textdomain(LOCALES_DOMAIN_NAME); for (int i=0;iLanguagesList,&iter); - gtk_list_store_set(widgets->LanguagesList,&iter,0,0,1,_(lang_name),2,parsed[i],-1); + gtk_list_store_set(widgets->LanguagesList,&iter,0,0,1,full_name,2,parsed[i],-1); } } textdomain(LocaleName); diff --git a/ubinstall-gtk-language.glade b/ubinstall-gtk-language.glade index 22cdb91..0fae60e 100644 --- a/ubinstall-gtk-language.glade +++ b/ubinstall-gtk-language.glade @@ -1,5 +1,5 @@ - + @@ -74,11 +74,15 @@ True liststore1 False + 1 + 1 + True + 1 -- 2.35.1 From 6e8b5d9220cfe7fd0343d4d0a06fd09e7e08f86f Mon Sep 17 00:00:00 2001 From: Ivan Dmitrievich Yartsev Date: Fri, 28 Nov 2025 16:59:50 +0600 Subject: [PATCH 3/6] Fixed language choosing --- source/ubinstall-gtk-keyboard.c | 4 +-- source/ubinstall-gtk-region.c | 20 ++++--------- source/ubinstall-gtk.c | 12 ++++++++ source/ubinstall-gtk.h | 4 +++ ubinstall-gtk-language.glade | 53 ++++++++++++++++++++++++++++----- ubinstall-gtk.glade | 10 ++++--- 6 files changed, 74 insertions(+), 29 deletions(-) diff --git a/source/ubinstall-gtk-keyboard.c b/source/ubinstall-gtk-keyboard.c index 01c4ff9..fb9508a 100644 --- a/source/ubinstall-gtk-keyboard.c +++ b/source/ubinstall-gtk-keyboard.c @@ -114,7 +114,7 @@ void on_language_window_accept(GtkWidget *,dictionary *dict){ char *final = ""; for_iter(widgets->LanguagesList,&iter){ char *code, *labl; - gtk_tree_model_get(GTK_TREE_MODEL(widgets->LanguagesList),&iter,1,&labl,2,&code,-1); + gtk_tree_model_get(GTK_TREE_MODEL(widgets->LanguagesList),&iter,1,&code,2,&labl,-1); if (yon_char_parsed_check_exist(lang_parsed,size,code)!=-1){ gtk_list_store_set(widgets->LanguagesList,&iter,0,1,-1); char *tmp = yon_char_unite(final,!yon_char_is_empty(final)?";":"",labl,NULL); @@ -137,7 +137,7 @@ void on_language_window_accept(GtkWidget *,dictionary *dict){ for_iter(GTK_TREE_MODEL(window->liststore1),&iter){ char *current; int status; - gtk_tree_model_get(GTK_TREE_MODEL(window->liststore1),&iter,0,&status,1,¤t,-1); + gtk_tree_model_get(GTK_TREE_MODEL(window->liststore1),&iter,0,&status,2,¤t,-1); if (status) yon_char_parsed_add_or_create_if_exists(parsed,&size,current); } diff --git a/source/ubinstall-gtk-region.c b/source/ubinstall-gtk-region.c index 9a467d8..e8ff73c 100644 --- a/source/ubinstall-gtk-region.c +++ b/source/ubinstall-gtk-region.c @@ -80,24 +80,14 @@ void yon_region_init(main_window *widgets){ yon_locale_init(); - parsed = yon_locale_get_all_codes(&size); - textdomain(LOCALES_DOMAIN_NAME); + config_str languages = yon_config_load(languages_command,&size); + for (int i=0;iLanguagesList,&iter); - gtk_list_store_set(widgets->LanguagesList,&iter,0,0,1,full_name,2,parsed[i],-1); - } + gtk_list_store_set(widgets->LanguagesList,&iter,0,0,1,parsed[0],2,parsed[1],3,parsed[2],-1); } - textdomain(LocaleName); yon_char_parsed_free(parsed,size); if (lang) yon_char_parsed_free(lang,langsize); diff --git a/source/ubinstall-gtk.c b/source/ubinstall-gtk.c index fd64d2c..ef027ca 100644 --- a/source/ubinstall-gtk.c +++ b/source/ubinstall-gtk.c @@ -554,6 +554,18 @@ void config_init(){ main_config.force_ini=NULL; main_config.network_types = g_hash_table_new(g_str_hash,g_str_equal); main_config.cur_slide=0; + + main_config.languages = g_hash_table_new(g_str_hash,g_str_equal); + int size; + config_str languages = yon_config_load(languages_command,&size); + for (int i=0;i - + - + - + + + @@ -73,16 +75,14 @@ True True liststore1 - False 1 - 1 + both + True - True - 1 @@ -93,14 +93,51 @@ + Locale - + + word + 150 + 1 + + + autosize + 35 + Language + True + + + word + 100 + + + 2 + + + + + + + autosize + Territory + True + + + word + 125 + + + 3 + + + + diff --git a/ubinstall-gtk.glade b/ubinstall-gtk.glade index e27fb4e..72a6f9d 100644 --- a/ubinstall-gtk.glade +++ b/ubinstall-gtk.glade @@ -1,5 +1,5 @@ - + @@ -108,11 +108,13 @@ - + - + - + + + -- 2.35.1 From c45c0c69f3ead3ca76011710ed1fa0fb359af507 Mon Sep 17 00:00:00 2001 From: Ivan Dmitrievich Yartsev Date: Fri, 28 Nov 2025 17:56:07 +0600 Subject: [PATCH 4/6] Cancel button wrong warning fix --- source/ubinstall-gtk-page-switch.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/source/ubinstall-gtk-page-switch.c b/source/ubinstall-gtk-page-switch.c index 65def82..ef05a46 100644 --- a/source/ubinstall-gtk-page-switch.c +++ b/source/ubinstall-gtk-page-switch.c @@ -430,14 +430,16 @@ void on_page_cancel_clicked(GtkWidget *, main_window *widgets){ gtk_widget_set_sensitive(widgets->ConfigurationModeMenuItem,1); yon_page_update(widgets); - dialog_confirmation_data *data = yon_confirmation_dialog_data_new(); - data->action_text=INTERRUPT_TEXT_LABEL; - data->title=WARNING_TITLE_LABEL; - if (yon_confirmation_dialog_call(widgets->MainWindow,data)==GTK_RESPONSE_ACCEPT ){ - if (main_config.install_thread){ - gtk_widget_hide(gtk_widget_get_parent(widgets->InstallationProgress)); - gtk_widget_hide(gtk_widget_get_parent(widgets->PackageInstallationProgress)); - pthread_cancel((pthread_t)main_config.install_thread); + if (main_config.install_thread){ + dialog_confirmation_data *data = yon_confirmation_dialog_data_new(); + data->action_text=INTERRUPT_TEXT_LABEL; + data->title=WARNING_TITLE_LABEL; + if (yon_confirmation_dialog_call(widgets->MainWindow,data)==GTK_RESPONSE_ACCEPT ){ + if (main_config.install_thread){ + gtk_widget_hide(gtk_widget_get_parent(widgets->InstallationProgress)); + gtk_widget_hide(gtk_widget_get_parent(widgets->PackageInstallationProgress)); + pthread_cancel((pthread_t)main_config.install_thread); + } } } } -- 2.35.1 From a604ec7821355a7275b76687e63bf654a54d34e3 Mon Sep 17 00:00:00 2001 From: Ivan Dmitrievich Yartsev Date: Fri, 28 Nov 2025 17:59:48 +0600 Subject: [PATCH 5/6] Partition error message changed --- locale/ubinstall-gtk.pot | 4 ++++ locale/ubinstall-gtk_ru.po | 4 ++++ source/ubinstall-gtk-grub.c | 4 ++-- source/ubinstall-gtk-installation.c | 4 ++-- source/ubinstall-gtk-separate.c | 2 +- source/ubl-strings.h | 1 + 6 files changed, 14 insertions(+), 5 deletions(-) diff --git a/locale/ubinstall-gtk.pot b/locale/ubinstall-gtk.pot index f7df02d..b39496c 100644 --- a/locale/ubinstall-gtk.pot +++ b/locale/ubinstall-gtk.pot @@ -272,6 +272,10 @@ msgstr "" msgid "No device were chosen" msgstr "" +#: source/ubl-strings.h:71 +msgid "No partition were chosen" +msgstr "" + #: source/ubl-strings.h:73 msgid "Installation parameters" msgstr "" diff --git a/locale/ubinstall-gtk_ru.po b/locale/ubinstall-gtk_ru.po index ce95a19..4606539 100644 --- a/locale/ubinstall-gtk_ru.po +++ b/locale/ubinstall-gtk_ru.po @@ -284,6 +284,10 @@ msgstr "Доступные языки в системе" msgid "No device were chosen" msgstr "Устройство не выбрано" +#: source/ubl-strings.h:71 +msgid "No partition were chosen" +msgstr "Раздел не выбран" + #: source/ubl-strings.h:73 msgid "Installation parameters" msgstr "Параметры установки" diff --git a/source/ubinstall-gtk-grub.c b/source/ubinstall-gtk-grub.c index 749f496..4b70364 100644 --- a/source/ubinstall-gtk-grub.c +++ b/source/ubinstall-gtk-grub.c @@ -11,7 +11,7 @@ int yon_grub_install_save(main_window *widgets){ char *cur_device; gtk_tree_model_get(model,&iter,0,&cur_device,-1); if (!gtk_tree_selection_get_selected(gtk_tree_view_get_selection(GTK_TREE_VIEW(widgets->GrubInstallPartitionTree)),&model,&iter)){ - yon_ubl_status_box_spawn(GTK_CONTAINER(widgets->StatusBox),NO_DEVICE_CHOSEN_LABEL,5,BACKGROUND_IMAGE_FAIL_TYPE); + yon_ubl_status_box_spawn(GTK_CONTAINER(widgets->StatusBox),NO_PART_CHOSEN_LABEL,5,BACKGROUND_IMAGE_FAIL_TYPE); yon_ubl_status_highlight_incorrect(gtk_widget_get_parent(widgets->GrubInstallPartitionTree)); return 0; } @@ -45,7 +45,7 @@ int yon_grub_update_save(main_window *widgets){ char *cur_device; gtk_tree_model_get(model,&iter,0,&cur_device,-1); if (!gtk_tree_selection_get_selected(gtk_tree_view_get_selection(GTK_TREE_VIEW(widgets->GrubUpdatePartitionTree)),&model,&iter)){ - yon_ubl_status_box_spawn(GTK_CONTAINER(widgets->StatusBox),NO_DEVICE_CHOSEN_LABEL,5,BACKGROUND_IMAGE_FAIL_TYPE); + yon_ubl_status_box_spawn(GTK_CONTAINER(widgets->StatusBox),NO_PART_CHOSEN_LABEL,5,BACKGROUND_IMAGE_FAIL_TYPE); yon_ubl_status_highlight_incorrect(gtk_widget_get_parent(widgets->GrubUpdatePartitionTree)); return 0; } diff --git a/source/ubinstall-gtk-installation.c b/source/ubinstall-gtk-installation.c index 15a1863..a4b4390 100644 --- a/source/ubinstall-gtk-installation.c +++ b/source/ubinstall-gtk-installation.c @@ -54,7 +54,7 @@ int yon_install_separate_save(main_window *widgets){ char *device; gtk_tree_model_get(model,&iter,0,&device,-1); if (!gtk_tree_selection_get_selected(gtk_tree_view_get_selection(GTK_TREE_VIEW(widgets->NextInstallationSysSectionTree)),&model,&iter)){ - yon_ubl_status_box_spawn(GTK_CONTAINER(widgets->StatusBox),NO_DEVICE_CHOSEN_LABEL,5,BACKGROUND_IMAGE_FAIL_TYPE); + yon_ubl_status_box_spawn(GTK_CONTAINER(widgets->StatusBox),NO_PART_CHOSEN_LABEL,5,BACKGROUND_IMAGE_FAIL_TYPE); yon_ubl_status_highlight_incorrect(gtk_widget_get_parent(widgets->CommonInstallationDevicesTree)); return 0; } @@ -124,7 +124,7 @@ int yon_install_same_partition_save(main_window *widgets){ char *device; gtk_tree_model_get(model,&iter,0,&device,-1); if (!gtk_tree_selection_get_selected(gtk_tree_view_get_selection(GTK_TREE_VIEW(widgets->SamePlacePartTree)),&model,&iter)){ - yon_ubl_status_box_spawn(GTK_CONTAINER(widgets->StatusBox),NO_DEVICE_CHOSEN_LABEL,5,BACKGROUND_IMAGE_FAIL_TYPE); + yon_ubl_status_box_spawn(GTK_CONTAINER(widgets->StatusBox),NO_PART_CHOSEN_LABEL,5,BACKGROUND_IMAGE_FAIL_TYPE); yon_ubl_status_highlight_incorrect(gtk_widget_get_parent(widgets->CommonInstallationDevicesTree)); return 0; } diff --git a/source/ubinstall-gtk-separate.c b/source/ubinstall-gtk-separate.c index 5403d94..1fc8930 100644 --- a/source/ubinstall-gtk-separate.c +++ b/source/ubinstall-gtk-separate.c @@ -9,7 +9,7 @@ int yon_install_options_save(GtkWidget *device_tree, GtkWidget *part_tree,char * return 0; } if (!gtk_tree_selection_get_selected(gtk_tree_view_get_selection(GTK_TREE_VIEW(part_tree)),&model2,&itar)){ - yon_ubl_status_box_spawn(GTK_CONTAINER(widgets->StatusBox),NO_DEVICE_CHOSEN_LABEL,5,BACKGROUND_IMAGE_FAIL_TYPE); + yon_ubl_status_box_spawn(GTK_CONTAINER(widgets->StatusBox),NO_PART_CHOSEN_LABEL,5,BACKGROUND_IMAGE_FAIL_TYPE); yon_ubl_status_highlight_incorrect(gtk_widget_get_parent(part_tree)); return 0; } diff --git a/source/ubl-strings.h b/source/ubl-strings.h index 04c031f..8462d36 100644 --- a/source/ubl-strings.h +++ b/source/ubl-strings.h @@ -74,6 +74,7 @@ NULL) #define AVALIABLE_LANGUAGES_TITLE_LABEL _("Available languages in the system") #define NO_DEVICE_CHOSEN_LABEL _("No device were chosen") +#define NO_PART_CHOSEN_LABEL _("No partition were chosen") #define INSTALLATION_PARAMETERS_LABEL _("Installation parameters") -- 2.35.1 From 10401a78b204edd201fa9a80f35d059fd74d0e94 Mon Sep 17 00:00:00 2001 From: Ivan Dmitrievich Yartsev Date: Fri, 28 Nov 2025 18:05:52 +0600 Subject: [PATCH 6/6] Changed 'Skip installation' button label --- locale/ubinstall-gtk.pot | 2 +- locale/ubinstall-gtk_ru.po | 4 ++-- source/ubl-strings.h | 2 +- ubinstall-gtk.glade | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/locale/ubinstall-gtk.pot b/locale/ubinstall-gtk.pot index b39496c..2271d1b 100644 --- a/locale/ubinstall-gtk.pot +++ b/locale/ubinstall-gtk.pot @@ -1170,7 +1170,7 @@ msgid "Source" msgstr "" #: source/ubl-strings.h:331 -msgid "Skip installation" +msgid "Skip configuration" msgstr "" #: source/ubl-strings.h:331 diff --git a/locale/ubinstall-gtk_ru.po b/locale/ubinstall-gtk_ru.po index 4606539..033d640 100644 --- a/locale/ubinstall-gtk_ru.po +++ b/locale/ubinstall-gtk_ru.po @@ -1209,8 +1209,8 @@ msgid "Source" msgstr "Источник" #: source/ubl-strings.h:331 -msgid "Skip installation" -msgstr "Пропустить установку" +msgid "Skip configuration" +msgstr "Пропустить настройку" msgid "" "Attention! The system will be installed in the selected partition. " diff --git a/source/ubl-strings.h b/source/ubl-strings.h index 8462d36..8afdaaa 100644 --- a/source/ubl-strings.h +++ b/source/ubl-strings.h @@ -341,4 +341,4 @@ NULL) // #define _LABEL _("Recovery section") // #define _LABEL _("Start installation scenario") // #define _LABEL _("Source") -// #define _LABEL _("Skip installation") \ No newline at end of file +// #define _LABEL _("Skip configuration") \ No newline at end of file diff --git a/ubinstall-gtk.glade b/ubinstall-gtk.glade index 72a6f9d..e20465b 100644 --- a/ubinstall-gtk.glade +++ b/ubinstall-gtk.glade @@ -10674,7 +10674,7 @@ separately into the selected partition. - Skip installation + Skip configuration True True image28 -- 2.35.1