From e2c349a88c33bb36040b2e1bdee72747022f95cb Mon Sep 17 00:00:00 2001 From: Ivan Dmitrievich Yartsev Date: Fri, 13 Feb 2026 15:12:31 +0600 Subject: [PATCH] Design changes; Partitions tables changes --- locale/ubinstall-gtk.pot | 11 +- locale/ubinstall-gtk_ru.po | 15 +- source/ubinstall-gtk-installation.c | 47 ++- source/ubinstall-gtk.c | 2 +- source/ubl-strings.h | 5 +- ubinstall-gtk.glade | 425 +++++++++++++++++++++------- 6 files changed, 384 insertions(+), 121 deletions(-) diff --git a/locale/ubinstall-gtk.pot b/locale/ubinstall-gtk.pot index 7ba8133..80d4e26 100644 --- a/locale/ubinstall-gtk.pot +++ b/locale/ubinstall-gtk.pot @@ -388,7 +388,7 @@ msgid "Restore missing or corrupted system files. Users data is not affected" msgstr "" #: source/ubl-strings.h:88 -msgid "User data only" +msgid "User data restore" msgstr "" #: source/ubl-strings.h:89 @@ -1903,6 +1903,15 @@ msgid "" "network or the Internet (even over slow connection channels)." msgstr "" +msgid "File system label" +msgstr "" + +msgid "Flags" +msgstr "" + +msgid "Mount point" +msgstr "" + msgid "About" msgstr "" diff --git a/locale/ubinstall-gtk_ru.po b/locale/ubinstall-gtk_ru.po index a5743d3..e0d518b 100644 --- a/locale/ubinstall-gtk_ru.po +++ b/locale/ubinstall-gtk_ru.po @@ -251,7 +251,7 @@ msgstr "Метка" #: source/ubl-strings.h:63 msgid "Size" -msgstr "Общий размер" +msgstr "Размер" #: source/ubl-strings.h:64 msgid "Free" @@ -401,7 +401,7 @@ msgid "Restore missing or corrupted system files. Users data is not affected" msgstr "Восстановление отсутствующих или поврежденных системных файлов. Данные пользователей не затрагиваются" #: source/ubl-strings.h:88 -msgid "User data only" +msgid "User data restore" msgstr "Только пользовательские данные" #: source/ubl-strings.h:89 @@ -504,7 +504,7 @@ msgstr "Раздел" #: source/ubl-strings.h:119 msgid "Capacity" -msgstr "Объём" +msgstr "Размер" #: source/ubl-strings.h:120 msgid "Free space" @@ -2047,6 +2047,15 @@ msgstr "" msgid "About" msgstr "О программе" +msgid "File system label" +msgstr "Метка файловой системы" + +msgid "Flags" +msgstr "Флаги" + +msgid "Mount point" +msgstr "Точка монтирования" + msgid "Documentation" msgstr "Справка" diff --git a/source/ubinstall-gtk-installation.c b/source/ubinstall-gtk-installation.c index 37e505e..645db17 100644 --- a/source/ubinstall-gtk-installation.c +++ b/source/ubinstall-gtk-installation.c @@ -327,8 +327,8 @@ void on_device_selection_changed(GtkWidget *self, main_window *widgets){ yon_char_remove_last_symbol(partitions[i],'\n'); int parsed_size; config_str parsed = yon_char_parse(partitions[i],&parsed_size,";"); - if (!strcmp(parsed[0],"part")){ - char *name = parsed[1]; + if (!strcmp(parsed[1],"part")){ + char *name = parsed[2]; if (strstr(name,disk_path)){ char *capacity = NULL; long capacity_long = 0; @@ -336,33 +336,54 @@ void on_device_selection_changed(GtkWidget *self, main_window *widgets){ long free_space_long = 0; char *fs_type = NULL; char *label = NULL; + char *fs_label = NULL; + char *mount_point = NULL; + char *flags = NULL; if (parsed_size>2){ char sizemod='\0'; - capacity_long = atol(parsed[2]); + capacity_long = atol(parsed[3]); char *temp = yon_char_from_double(yon_size_long_convert_automatic(capacity_long,&sizemod)); char *size_str = yon_size_get_name_from_letter(sizemod); capacity = yon_char_unite(temp," ", size_str,NULL); free(temp); } - if (parsed_size>7&&!yon_char_is_empty(parsed[7])){ + // if (parsed_size>8&&!yon_char_is_empty(parsed[8])){ + // char sizemod='\0'; + // free_space_long = capacity_long-atol(parsed[8]); + // char *temp = yon_char_from_double(yon_size_long_convert_automatic(free_space_long,&sizemod)); + // char *size_str = yon_size_get_name_from_letter(sizemod); + // capacity = yon_char_unite(temp," ", size_str,parsed_size>9?" ":NULL,parsed[9],NULL); + // free(temp); + // } + if (parsed_size>4){ + fs_type = parsed[4]; + } + if (parsed_size>5){ + label = parsed[5]; + } + if (parsed_size>8&&!yon_char_is_empty(parsed[8])){ + long used_cap = capacity_long-atol(parsed[8]); + long capacity_persent = ((double)used_cap/(double)capacity_long)*100; char sizemod='\0'; - free_space_long = capacity_long-atol(parsed[7]); - char *temp = yon_char_from_double(yon_size_long_convert_automatic(free_space_long,&sizemod)); + char *temp = yon_char_from_double(yon_size_long_convert_automatic(used_cap,&sizemod)); char *size_str = yon_size_get_name_from_letter(sizemod); - capacity = yon_char_unite(temp," ", size_str,NULL); - free(temp); + free_space = yon_char_unite(temp, " ",size_str," (",yon_char_from_long(capacity_persent),"%",")",NULL); + } - if (parsed_size>3){ - fs_type = parsed[3]; + if (parsed_size>6){ + fs_label = parsed[6]; } - if (parsed_size>4){ - label = parsed[4]; + if (parsed_size>7){ + mount_point = parsed[7]; + } + if (parsed_size>10){ + flags = parsed[10]; } gtk_list_store_append(widgets->PartitionsList,&iter); - gtk_list_store_set(widgets->PartitionsList,&iter,0,name,1,capacity,2,free_space,3,fs_type,4,label,5,capacity_long,6,free_space_long,9,disk_path,-1); + gtk_list_store_set(widgets->PartitionsList,&iter,0,name,1,capacity,2,free_space,3,fs_type,4,label,5,capacity_long,6,free_space_long,9,disk_path,9,mount_point,10,fs_label,11,flags,-1); } yon_char_parsed_free(parsed,parsed_size); } diff --git a/source/ubinstall-gtk.c b/source/ubinstall-gtk.c index 147f4af..4ab91f0 100644 --- a/source/ubinstall-gtk.c +++ b/source/ubinstall-gtk.c @@ -914,7 +914,7 @@ void yon_main_window_create(main_window *widgets){ if (access(path,F_OK)){ fullscreen = 1; 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/ubl-strings.h b/source/ubl-strings.h index 2a9e060..f458a96 100644 --- a/source/ubl-strings.h +++ b/source/ubl-strings.h @@ -82,7 +82,7 @@ NULL) #define SEPARATE_INSTALL_LABEL _("Installing OS components and user data on different disk partitions") #define OS_ONLY_HEAD_LABEL _("System restore") #define OS_ONLY_LABEL _("Restore missing or corrupted system files. Users data is not affected") -#define USER_DATA_HEAD_LABEL _("User data only") +#define USER_DATA_HEAD_LABEL _("User data restore") #define USER_DATA_LABEL _("Installing only user data without OS components") #define KEYBOARD__LABEL _("Keyboard layout language") @@ -458,6 +458,9 @@ NULL) // #define _LABEL _("Packager") // #define _LABEL _("Build Date") // #define _LABEL _("Validated By") +// #define REBOOT_LABEL _("File system label") +// #define REBOOT_LABEL _("Flags") +// #define REBOOT_LABEL _("Mount point") #define slide_1_title _("Product ecosystem") #define slide_1_text _("Developed by a team of professionals and successfully presented on the market.\n\ diff --git a/ubinstall-gtk.glade b/ubinstall-gtk.glade index 61a2ce5..898ae6a 100644 --- a/ubinstall-gtk.glade +++ b/ubinstall-gtk.glade @@ -263,7 +263,11 @@ - + + + + + @@ -914,7 +918,6 @@ agreement True False left - False True @@ -8304,7 +8307,40 @@ or continue working in the system Live environment. - Capacity + File system + + + + 3 + + + + + + + Label + + + + 4 + + + + + + + File system label + + + + 10 + + + + + + + Size @@ -8326,22 +8362,22 @@ or continue working in the system Live environment. - File system + Flags - 3 + 11 - Label + Mount point - 4 + 9 @@ -9012,7 +9048,40 @@ or continue working in the system Live environment. - Capacity + File system + + + + 3 + + + + + + + Label + + + + 4 + + + + + + + File system label + + + + 10 + + + + + + + Size @@ -9034,22 +9103,22 @@ or continue working in the system Live environment. - File system + Flags - 3 + 11 - Label + Mount point - 4 + 9 @@ -9700,98 +9769,118 @@ separately into the selected partition. - + True - False - 0 + True in + 128 - + + 125 True - False + True + PartitionsList + 0 + + + - - 125 - True - True - PartitionsList - 0 - - + + + + + + + + Section - - - - - 8 - 7 - - - + + + 0 + + + + + + File system - - Section - - - - 0 - - - + + + 3 + + + + + + Label - - Capacity - - - - 1 - - - + + + 4 + + + + + + File system label - - Free space - - - - 2 - - - + + + 10 + + + + + + Size - - File system - - - - 3 - - - + + + 1 + + + + + + + Free space + + + + 2 + + + + + + Flags - - Label - - - - 4 - - - + + + 11 + + + + + + + Mount point + + + + 9 + - - - False @@ -11181,7 +11270,40 @@ separately into the selected partition. - Capacity + File system + + + + 3 + + + + + + + Label + + + + 4 + + + + + + + File system label + + + + 10 + + + + + + + Size @@ -11203,22 +11325,22 @@ separately into the selected partition. - File system + Flags - 3 + 11 - Label + Mount point - 4 + 9 @@ -11594,7 +11716,40 @@ separately into the selected partition. - Capacity + File system + + + + 3 + + + + + + + Label + + + + 4 + + + + + + + File system label + + + + 10 + + + + + + + Size @@ -11616,22 +11771,22 @@ separately into the selected partition. - File system + Flags - 3 + 11 - Label + Mount point - 4 + 9 @@ -12000,7 +12155,40 @@ separately into the selected partition. - Capacity + File system + + + + 3 + + + + + + + Label + + + + 4 + + + + + + + File system label + + + + 10 + + + + + + + Size @@ -12022,22 +12210,22 @@ separately into the selected partition. - File system + Flags - 3 + 11 - Label + Mount point - 4 + 9 @@ -12808,7 +12996,40 @@ separately into the selected partition. - Capacity + File system + + + + 3 + + + + + + + Label + + + + 4 + + + + + + + File system label + + + + 10 + + + + + + + Size @@ -12830,22 +13051,22 @@ separately into the selected partition. - File system + Flags - 3 + 11 - Label + Mount point - 4 + 9