From e1a2631f69e304d80d082e0a0ca503911850ce92 Mon Sep 17 00:00:00 2001 From: Ivan Yarcev Date: Mon, 15 Jul 2024 14:32:09 +0600 Subject: [PATCH] Localisation update; fixes; toggle button selecrion changes --- source/ubinstall-gtk.c | 32 +++++++++++++++++++++++--------- source/ubl-strings.h | 2 ++ ubinstall-gtk-keyboard.glade | 4 ++-- ubinstall-gtk-language.glade | 4 ++-- ubinstall-gtk.glade | 2 +- ubinstall-gtk.pot | 4 ++++ ubinstall-gtk_ru.po | 8 ++++++-- 7 files changed, 40 insertions(+), 16 deletions(-) diff --git a/source/ubinstall-gtk.c b/source/ubinstall-gtk.c index cd688b0..5fbb601 100644 --- a/source/ubinstall-gtk.c +++ b/source/ubinstall-gtk.c @@ -400,7 +400,6 @@ gboolean yon_installation_progress_update(void *data){ void on_page_changed(GtkWidget *,GtkWidget *,int page, main_window *widgets); void on_page_changed(GtkWidget *,GtkWidget *,int page, main_window *widgets){ - yon_switch_page_render(widgets,page>3?page-2:page); switch(page){ case YON_PAGE_WELCOME: { gtk_widget_set_sensitive(widgets->CancelInstallButton,0); @@ -412,24 +411,34 @@ void on_page_changed(GtkWidget *,GtkWidget *,int page, main_window *widgets){ gtk_image_set_from_icon_name(GTK_IMAGE(gtk_button_get_image(GTK_BUTTON(widgets->NextButton))),"com.ublinux.ubinstall-gtk.arrow-right-symbolic",GTK_ICON_SIZE_BUTTON); gtk_image_set_from_icon_name(GTK_IMAGE(gtk_button_get_image(GTK_BUTTON(widgets->CancelInstallButton))),"com.ublinux.ubinstall-gtk.circle-exit-symbolic",GTK_ICON_SIZE_BUTTON); gtk_widget_set_sensitive(widgets->ConfigurationModeMenuItem,1); + yon_switch_page_render(widgets,0); } break; case YON_PAGE_LICENCE:{ gtk_widget_set_sensitive(widgets->CancelInstallButton,1); gtk_widget_set_sensitive(widgets->BackButton,1); + yon_switch_page_render(widgets,1); } break; case YON_PAGE_REGION: { yon_image_resize_from_container(GTK_IMAGE(widgets->RegionImage), widgets->regions_original); - + yon_switch_page_render(widgets,4); } break; case YON_PAGE_KEYBOARD: { + yon_switch_page_render(widgets,5); yon_image_resize_from_container(GTK_IMAGE(widgets->KeyboardImage), widgets->keyboard_original); } break; + case YON_PAGE_OS_COMPONENTS: + case YON_PAGE_SOFTWARE: + case YON_PAGE_INSTALLATION_BEGIN: + yon_switch_page_render(widgets,3); + + break; case YON_PAGE_INSTALLATION:{ + yon_switch_page_render(widgets,3); gtk_widget_set_sensitive(widgets->BackButton,0); if (main_config.config_save_thread&&!main_config.configure_mode) g_thread_join(main_config.config_save_thread); @@ -441,17 +450,14 @@ void on_page_changed(GtkWidget *,GtkWidget *,int page, main_window *widgets){ gtk_widget_show(gtk_widget_get_parent(widgets->InstallationProgress)); } break; - case YON_PAGE_OS_COMPONENTS: - case YON_PAGE_SOFTWARE: - yon_switch_page_render(widgets,3); - break; - case YON_PAGE_USERS: + yon_switch_page_render(widgets,6); gtk_widget_set_sensitive(widgets->NextButton,1); break; case YON_PAGE_INSTALL_ERROR: case YON_PAGE_COMPLETION:{ + yon_switch_page_render(widgets,7); gtk_widget_set_sensitive(widgets->BackButton,0); gtk_widget_hide(gtk_widget_get_parent(widgets->PackageInstallationProgress)); gtk_widget_hide(widgets->InstallationLabel); @@ -466,9 +472,17 @@ void on_page_changed(GtkWidget *,GtkWidget *,int page, main_window *widgets){ } break; + case YON_PAGE_SECTIONS: case YON_PAGE_INSTALL_COMMON: case YON_PAGE_INSTALL_SEPARATE: - case YON_PAGE_INSTALL_SAME_PARTITION: { + case YON_PAGE_INSTALL_SAME_PARTITION: + case YON_PAGE_INSTALL_OPTIONS: + case YON_PAGE_OPTIONS_GRUB_INSTALL: + case YON_PAGE_OPTIONS_GRUB_UPDATE: + case YON_PAGE_OPTIONS_SEPARATE: + case YON_PAGE_OPTIONS_SEPARATE_USRDATA: + case YON_PAGE_OPTIONS_OS_ONLY: + case YON_PAGE_OPTIONS_USRDATA_ONLY: { yon_switch_page_render(widgets,2); } } @@ -1127,7 +1141,7 @@ void on_near_installation_device_changed(GtkWidget *self, main_window *widgets){ free_space_string = yon_char_append(yon_char_from_float(free_space)," "); free_space_string[strlen(free_space_string)-1]=json_object_get_string(size)[strlen(json_object_get_string(size))-1]; } - gtk_spin_button_set_value(GTK_SPIN_BUTTON(widgets->InstallationNearSizeSpin),0.0); + // gtk_spin_button_set_value(GTK_SPIN_BUTTON(widgets->InstallationNearSizeSpin),0.0); gtk_adjustment_set_upper(gtk_spin_button_get_adjustment(GTK_SPIN_BUTTON(widgets->InstallationNearSizeSpin)),0.0); gtk_list_store_append(widgets->PartitionsList,&iter); gtk_list_store_set(widgets->PartitionsList,&iter,0,json_object_get_string(path),1,json_object_get_string(size),2,free_space_string,3,json_object_get_string(fstype),-1); diff --git a/source/ubl-strings.h b/source/ubl-strings.h index ab2ed2f..e31411d 100644 --- a/source/ubl-strings.h +++ b/source/ubl-strings.h @@ -131,5 +131,7 @@ #define INSTALLATION_ERROR _("Installation error") #define ATTENTION_NEXT_LABEL _("Attention! The UBLinux OS will be installed on the selected partition with OS already installed. All user data will be saved.") +#define INSTALLATION_OPTIONS_LABEL _("Installation options") + #define ERROR_HEAD_LABEL _("Error") #define ERROR_LABEL _("Error has occured while installation process") \ No newline at end of file diff --git a/ubinstall-gtk-keyboard.glade b/ubinstall-gtk-keyboard.glade index bbfee24..c5f6ad6 100644 --- a/ubinstall-gtk-keyboard.glade +++ b/ubinstall-gtk-keyboard.glade @@ -8,7 +8,7 @@ False True 800 - com.ublinux.libublsettingsui-gtk3 + com.ublinux.ubinstall-gtk True @@ -123,7 +123,7 @@ True False 32 - com.ublinux.ubinstall-gtk-gui + com.ublinux.ubinstall-gtk diff --git a/ubinstall-gtk-language.glade b/ubinstall-gtk-language.glade index 2c3886b..d9d5636 100644 --- a/ubinstall-gtk-language.glade +++ b/ubinstall-gtk-language.glade @@ -18,7 +18,7 @@ False True 800 - com.ublinux.ubinstall-gui + com.ublinux.ubinstall-gtk True @@ -134,7 +134,7 @@ True False 32 - com.ublinux.ubinstall-gtk-gui + com.ublinux.ubinstall-gtk diff --git a/ubinstall-gtk.glade b/ubinstall-gtk.glade index 37b4371..93db897 100644 --- a/ubinstall-gtk.glade +++ b/ubinstall-gtk.glade @@ -73,6 +73,7 @@ 100 + 16 1 10 @@ -905,7 +906,6 @@ and help you install UBLinux on your computer - True True False True diff --git a/ubinstall-gtk.pot b/ubinstall-gtk.pot index ee1a341..d098b31 100644 --- a/ubinstall-gtk.pot +++ b/ubinstall-gtk.pot @@ -470,6 +470,10 @@ msgstr "" msgid "Attention! The UBLinux OS will be installed on the selected partition with OS already installed. All user data will be saved." msgstr "" +#: source/ubl-strings.h:134 +msgid "Installation options" +msgstr "" + #: source/ubl-strings.h:102 msgid "Error" msgstr "" diff --git a/ubinstall-gtk_ru.po b/ubinstall-gtk_ru.po index 0684f71..8335e1e 100644 --- a/ubinstall-gtk_ru.po +++ b/ubinstall-gtk_ru.po @@ -441,11 +441,11 @@ msgstr "Тип ФС" #: source/ubl-strings.h:103 msgid "Default (L_Alt + L_Shift)" -msgstr "По умолчанию ((L_Alt + L_Shift))" +msgstr "По умолчанию (L_Alt + L_Shift)" #: source/ubl-strings.h:104 msgid "Default (Regular 105-key)" -msgstr "По умолчанию ((Regular 105-key))" +msgstr "По умолчанию (Обычная 105-клавишная)" #: source/ubl-strings.h:102 msgid "Installation configuration has ended" @@ -487,6 +487,10 @@ msgstr "Ошибка установки" msgid "Attention! The UBLinux OS will be installed on the selected partition with OS already installed. All user data will be saved." msgstr "Внимание! ОС UBLinux будет установлена в выбранный раздел. Если не менять тип ФС и не форматировать, все данные на разделе будут сохранены" +#: source/ubl-strings.h:134 +msgid "Installation options" +msgstr "Параметры установки" + #: source/ubl-strings.h:102 msgid "Error" msgstr "Ошибка"