From 06892dd8c7caf73d4e68c97a71cd54873becd13d Mon Sep 17 00:00:00 2001 From: Ivan Dmitrievich Yartsev Date: Thu, 12 Feb 2026 18:32:49 +0600 Subject: [PATCH 01/17] Changes; Fixes; WIP device and partition fixes --- source/ubinstall-gtk-configuration-mode.c | 2 +- source/ubinstall-gtk-installation.c | 119 +++++++++++++--------- source/ubinstall-gtk.c | 8 +- source/ubinstall-gtk.h | 12 ++- 4 files changed, 87 insertions(+), 54 deletions(-) diff --git a/source/ubinstall-gtk-configuration-mode.c b/source/ubinstall-gtk-configuration-mode.c index 4030c1b..f4c1f06 100644 --- a/source/ubinstall-gtk-configuration-mode.c +++ b/source/ubinstall-gtk-configuration-mode.c @@ -79,7 +79,7 @@ void on_configuration_mode_switch(GtkWidget *self,main_window *widgets){ GList *box = gtk_container_get_children(GTK_CONTAINER(self)); GList *children = gtk_container_get_children(GTK_CONTAINER(box->data)); - GtkWidget *Check = GTK_WIDGET(g_list_nth_data(children,1)); + GtkWidget *Check = GTK_WIDGET(g_list_nth_data(children,0)); int active = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(Check)); if (!active){ GtkBuilder *builder = gtk_builder_new_from_resource(glade_path_configuration_mode); diff --git a/source/ubinstall-gtk-installation.c b/source/ubinstall-gtk-installation.c index d5fc62f..37e505e 100644 --- a/source/ubinstall-gtk-installation.c +++ b/source/ubinstall-gtk-installation.c @@ -237,6 +237,34 @@ int yon_advanced_sections_save(dictionary *dict){ return 1; } +void on_partition_size_changed(GtkWidget *self, main_window *widgets){ + GtkAdjustment *adj = NULL; + GtkWidget *tree = NULL; + if (self == widgets->OSFormatSizeCombo){ + adj = gtk_spin_button_get_adjustment(GTK_SPIN_BUTTON(widgets->OSFormatSizeSpin)); + tree = widgets->OSDevicesTree; + } else if (self == widgets->UserdataFormatSizeCombo){ + adj = gtk_spin_button_get_adjustment(GTK_SPIN_BUTTON(widgets->UserdataFormatSizeSpin)); + tree = widgets->UserdataDevicesTree; + } else if (self == widgets->NextInstallationSizeTypeSpin){ + adj = gtk_spin_button_get_adjustment(GTK_SPIN_BUTTON(widgets->NextInstallationSizeSpin)); + tree = widgets->NextInstallationSysSectionTree; + } + GtkTreeModel *model; + GtkTreeIter iter; + if (!gtk_tree_selection_get_selected(gtk_tree_view_get_selection(GTK_TREE_VIEW(tree)),&model,&iter)) return; + long selected_size =0; + + gtk_tree_model_get(model,&iter,6,&selected_size,-1); + if (!selected_size){ + gtk_tree_model_get(model,&iter,5,&selected_size,-1); + } + const char *sizemod = gtk_combo_box_get_active_id(GTK_COMBO_BOX(self)); + double new_size = yon_size_long_convert_to_mod(selected_size,sizemod[0]); + gtk_adjustment_set_upper(adj,new_size); + +} + void yon_set_max_size_from_partition(GtkTreeView *table, GtkSpinButton *spin_button, GtkComboBox *spin_combo){ GtkTreeModel *model; GtkTreeIter iter; @@ -251,29 +279,26 @@ void yon_set_max_size_from_partition(GtkTreeView *table, GtkSpinButton *spin_but const char *sizemod = gtk_combo_box_get_active_id(spin_combo); double new_size = yon_size_long_convert_to_mod(selected_size,sizemod[0]); gtk_adjustment_set_upper(adj,new_size); - gdouble old_value = gtk_adjustment_get_value(adj); - if (old_value>new_size){ - gtk_adjustment_set_value(adj,new_size); + char *command = yon_config_parameter_prepare_command(part_size_parameter_command,"default",NULL,NULL); + int size=0; + config_str parsed = yon_config_load(command,&size); + if (size&&strcmp(parsed[0],"(null)\n")){ + yon_char_remove_last_symbol(parsed[0],'\n'); + free(yon_char_divide_search(parsed[0],"=",-1)); + yon_char_remove_brackets(parsed[0]); + char *parameter = parsed[0]; + if (!yon_char_is_empty(parameter)){ + gtk_spin_button_set_value(GTK_SPIN_BUTTON(spin_button),atol(parameter)); + gtk_combo_box_set_active(GTK_COMBO_BOX(spin_combo),yon_get_size_get_from_letter(parameter[strlen(parameter)-1])-1); + } else { + gtk_spin_button_set_value(GTK_SPIN_BUTTON(spin_button),3); + gtk_combo_box_set_active(GTK_COMBO_BOX(spin_combo),2); + } } + } } } -// char *parameter = config(part_size_parameter); -// if (!yon_char_is_empty(parameter)){ -// GtkAdjustment *adj = gtk_spin_button_get_adjustment(GTK_SPIN_BUTTON(widgets->OSFormatSizeSpin)); -// gtk_adjustment_set_value(adj,atol(parameter)); -// g_signal_handlers_block_by_func(G_OBJECT(widgets->NextInstallationSizeTypeSpin),G_CALLBACK(on_partition_changed),widgets); -// g_signal_handlers_block_by_func(G_OBJECT(widgets->OSFormatSizeCombo),G_CALLBACK(on_partition_changed),widgets); -// g_signal_handlers_block_by_func(G_OBJECT(widgets->UserdataFormatSizeCombo),G_CALLBACK(on_partition_changed),widgets); - -// gtk_combo_box_set_active(GTK_COMBO_BOX(widgets->OSFormatSizeCombo),yon_get_size_get_from_letter(parameter[strlen(parameter)-1])-1); -// gtk_combo_box_set_active(GTK_COMBO_BOX(widgets->UserdataFormatSizeCombo),yon_get_size_get_from_letter(parameter[strlen(parameter)-1])-1); -// gtk_combo_box_set_active(GTK_COMBO_BOX(widgets->NextInstallationSizeTypeSpin),yon_get_size_get_from_letter(parameter[strlen(parameter)-1])-1); - -// g_signal_handlers_unblock_by_func(G_OBJECT(widgets->NextInstallationSizeTypeSpin),G_CALLBACK(on_partition_changed),widgets); -// g_signal_handlers_unblock_by_func(G_OBJECT(widgets->OSFormatSizeCombo),G_CALLBACK(on_partition_changed),widgets); -// g_signal_handlers_unblock_by_func(G_OBJECT(widgets->UserdataFormatSizeCombo),G_CALLBACK(on_partition_changed),widgets); -// } void on_partition_changed(GtkWidget *self, main_window *widgets){ if (self==widgets->NextInstallationSysSectionTree||self == widgets->NextInstallationSizeTypeSpin){ @@ -282,6 +307,11 @@ void on_partition_changed(GtkWidget *self, main_window *widgets){ } +void *yon_partitions_list_load(main_window *){ + main_config.partitions = yon_config_load(yon_debug_output("%s\n",get_parts_for_device_command),&main_config.part_size); + g_thread_exit(NULL); +} + void on_device_selection_changed(GtkWidget *self, main_window *widgets){ gtk_list_store_clear(widgets->PartitionsList); GtkTreeIter iter; @@ -289,10 +319,11 @@ void on_device_selection_changed(GtkWidget *self, main_window *widgets){ if (gtk_tree_selection_get_selected(gtk_tree_view_get_selection(GTK_TREE_VIEW(self)),&model,&iter)){ char *disk_path; gtk_tree_model_get(model,&iter,0,&disk_path,-1); - int size; + int size = main_config.part_size; config_str partitions; - partitions = yon_config_load(yon_debug_output("%s\n",get_parts_and_devices_command),&size); + partitions = main_config.partitions; for (int i=0;iDevicesList); int size; - config_str parsed = NULL; - parsed = yon_config_load(yon_debug_output("%s\n",get_devices_command),&size); - char *string = yon_char_parsed_to_string(parsed,size,""); - struct json_object *root; - struct json_object *blockdevices; - root = json_tokener_parse(string); - free(string); - json_object_object_get_ex(root, "blockdevices", &blockdevices); - for (long unsigned int i = 0; i < json_object_array_length(blockdevices); i++) { - struct json_object *device = json_object_array_get_idx(blockdevices, i); - struct json_object *path, *size, *model, *vendor, *serial; - - json_object_object_get_ex(device, "path", &path); - json_object_object_get_ex(device, "size", &size); - json_object_object_get_ex(device, "model", &model); - json_object_object_get_ex(device, "vendor", &vendor); - json_object_object_get_ex(device, "serial", &serial); + config_str parameters = NULL; + parameters = yon_config_load(yon_debug_output("%s\n",get_devices_command),&size); + for (int i=1;iDevicesList,&iter); - char *size_string = yon_char_new(json_object_get_string(size)); - char *size_str = yon_size_get_name_from_letter(size_string[strlen(size_string)-1]); - size_string[strlen(size_string)-1] = '\0'; - char *size_final_string = yon_char_unite(size_string," ",size_str,NULL); - gtk_list_store_set(widgets->DevicesList,&iter,0,json_object_get_string(path),1,json_object_get_string(model),2,json_object_get_string(serial),3,size_final_string,4,json_object_get_string(vendor),6,1,-1); - free(size_string); - free(size_str); - free(size_final_string); + gtk_list_store_set(widgets->DevicesList,&iter, + 0,yon_char_return_if_exist(parsed[0],""), + 1,yon_char_return_if_exist(parsed[2],""), + 2,yon_char_return_if_exist(parsed[4],""), + 3,yon_char_return_if_exist(size_string,""), + 4,yon_char_return_if_exist(parsed[3],""), + 6,1,-1); + // gtk_list_store_set(widgets->DevicesList,&iter,,1,json_object_get_string(model),2,json_object_get_string(serial),3,size_final_string,4,json_object_get_string(vendor),6,1,-1); + + yon_char_parsed_free(parsed,parsed_size); } - yon_char_parsed_free(parsed,size); + yon_char_parsed_free(parameters,size); } void yon_os_password_open(GtkWidget *, main_window *widgets){ diff --git a/source/ubinstall-gtk.c b/source/ubinstall-gtk.c index c0fd160..147f4af 100644 --- a/source/ubinstall-gtk.c +++ b/source/ubinstall-gtk.c @@ -808,9 +808,9 @@ void yon_main_window_create(main_window *widgets){ g_signal_connect(G_OBJECT(widgets->SamePlacePartTree),"cursor-changed",G_CALLBACK(on_partition_changed),widgets); g_signal_connect(G_OBJECT(widgets->NextInstallationSysSectionTree),"cursor-changed",G_CALLBACK(on_partition_changed),widgets); - g_signal_connect(G_OBJECT(widgets->NextInstallationSizeTypeSpin),"changed",G_CALLBACK(on_partition_changed),widgets); - g_signal_connect(G_OBJECT(widgets->OSFormatSizeCombo),"changed",G_CALLBACK(on_partition_changed),widgets); - g_signal_connect(G_OBJECT(widgets->UserdataFormatSizeCombo),"changed",G_CALLBACK(on_partition_changed),widgets); + g_signal_connect(G_OBJECT(widgets->NextInstallationSizeTypeSpin),"changed",G_CALLBACK(on_partition_size_changed),widgets); + g_signal_connect(G_OBJECT(widgets->OSFormatSizeCombo),"changed",G_CALLBACK(on_partition_size_changed),widgets); + g_signal_connect(G_OBJECT(widgets->UserdataFormatSizeCombo),"changed",G_CALLBACK(on_partition_size_changed),widgets); g_signal_connect(G_OBJECT(widgets->UserRootPasswordCombo),"changed",G_CALLBACK(yon_gtk_widget_set_sensitive_from_combo_box),widgets->UserRootPasswordEntry); g_signal_connect(G_OBJECT(widgets->UserRootPasswordCombo),"changed",G_CALLBACK(yon_gtk_widget_set_sensitive_from_combo_box),widgets->UserRootPasswordButton); @@ -931,7 +931,7 @@ void yon_main_window_create(main_window *widgets){ gtk_overlay_add_overlay(GTK_OVERLAY(widgets->RegionMapOverlay),widgets->TimeZoneMapOverlayBox); gtk_overlay_set_overlay_pass_through(GTK_OVERLAY(widgets->RegionMapOverlay),widgets->TimeZoneMapOverlayBox,1); gtk_widget_hide(widgets->TimeZoneMapOverlayBox); - + g_thread_new("Partitions_thread",(GThreadFunc)yon_partitions_list_load,widgets); { widgets->EnableRDPMenuItem = gtk_menu_item_new(); GtkWidget *Box = gtk_box_new(GTK_ORIENTATION_HORIZONTAL,5); diff --git a/source/ubinstall-gtk.h b/source/ubinstall-gtk.h index 18a769a..c6a8824 100755 --- a/source/ubinstall-gtk.h +++ b/source/ubinstall-gtk.h @@ -155,7 +155,7 @@ layout && /description:/ {\ #define disable_rdp_command "ubconfig --target system remove [desktop] AUTOEXEC[@users]" #define get_layouts_local_command(layout) yon_char_unite("xkbcli list --load-exotic | awk -v layout=\"", layout, "\" \"BEGIN {layout_pattern = sprintf(\\\"^ *- *layout: *'%s'\\\",layout);matched=0} matched && /variant:/ {match(\\$0, /: *'([^']+)'/, matches);variant = matches[1]} matched && /description:/ {match(\\$0, /: *(.+)/, matches);description = matches[1]} matched && /^ *-/{matched=0; if (variant) printf \\\"%s|%s\\n\\\",variant,description} \\$0 ~ layout_pattern {matched=1;variant=\\\"\\\";description=\\\"\\\";next}\" | sort -u", NULL) -#define get_devices_command "lsblk --noheadings --nodeps -Jo PATH,SIZE,MODEL,VENDOR,SERIAL --exclude 7" +// #define get_devices_command "lsblk --noheadings --nodeps -Jo PATH,SIZE,MODEL,VENDOR,SERIAL --exclude 7" #define get_parts_and_devices_command "lsblk --noheadings --bytes -o TYPE,PATH,SIZE,FSTYPE,LABEL,PARTLABEL,MOUNTPOINT,FSUSED,FSUSE% --exclude 7 |awk '{print ($1\";\"$2\";\"$3\";\"$4\";\"$5\";\"$6\";\"$7\";\"$8\";\"$9)}'" #define AUTOINSTALL(target) yon_char_unite("AUTOINSTALL[", target, "]", NULL) @@ -288,6 +288,9 @@ layout && /description:/ {\ #define full_log_path "/var/log/ubinstall.log" +#define get_devices_command "ubinstall show --lsdevices" +#define get_parts_for_device_command "ubinstall show --lsparts" + #define config_get_command(target) yon_char_unite("ubconfig -ea --conarg --source ", target, " get [autoinstall] AUTOINSTALL[*] -- get [locale] LANG", NULL) #define config_get_default_command "ubconfig -ea --conarg --source default get [autoinstall] AUTOINSTALL[*] -- get [locale] LANG" @@ -458,6 +461,9 @@ typedef struct gboolean force_scenario; char *os_name; + + config_str partitions; + int part_size; } config; extern config main_config; @@ -1494,4 +1500,6 @@ void yon_map_status_show(main_window *widgets, char *icon_name, char *title, cha gboolean on_map_box_ckicked_skip(); gboolean on_time_zone_status_hover(GtkWidget *, GdkEvent *, main_window *widgets); gboolean on_time_zone_status_hover_end(GtkWidget *, GdkEvent *, main_window *widgets); -void yon_map_update(main_window *widgets, const char *timezone); \ No newline at end of file +void yon_map_update(main_window *widgets, const char *timezone); +void on_partition_size_changed(GtkWidget *self, main_window *widgets); +void *yon_partitions_list_load(main_window *widgets); \ No newline at end of file -- 2.35.1 From e2c349a88c33bb36040b2e1bdee72747022f95cb Mon Sep 17 00:00:00 2001 From: Ivan Dmitrievich Yartsev Date: Fri, 13 Feb 2026 15:12:31 +0600 Subject: [PATCH 02/17] 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 -- 2.35.1 From db32acf42c82346cb06b69534e4b80963b0705ec Mon Sep 17 00:00:00 2001 From: Ivan Dmitrievich Yartsev Date: Fri, 13 Feb 2026 18:36:41 +0600 Subject: [PATCH 03/17] Modules, devices and partitions loading changes --- locale/ubinstall-gtk.pot | 12 ++ locale/ubinstall-gtk_ru.po | 16 ++- source/ubinstall-gtk-components.c | 51 +++++-- source/ubinstall-gtk-source.c | 40 ++++-- source/ubinstall-gtk.h | 13 +- source/ubl-strings.h | 11 +- ubinstall-gtk-os-row.glade | 205 +++++++++++++++++++++++------ ubinstall-gtk-source-element.glade | 13 +- ubinstall-gtk.glade | 1 + 9 files changed, 290 insertions(+), 72 deletions(-) diff --git a/locale/ubinstall-gtk.pot b/locale/ubinstall-gtk.pot index 80d4e26..2ead469 100644 --- a/locale/ubinstall-gtk.pot +++ b/locale/ubinstall-gtk.pot @@ -1915,6 +1915,18 @@ msgstr "" msgid "About" msgstr "" +msgid "Local system" +msgstr "" + +msgid "Source:" +msgstr "" + +msgid "Version:" +msgstr "" + +msgid "Size:" +msgstr "" + msgid "Documentation" msgstr "" diff --git a/locale/ubinstall-gtk_ru.po b/locale/ubinstall-gtk_ru.po index e0d518b..5e1fee9 100644 --- a/locale/ubinstall-gtk_ru.po +++ b/locale/ubinstall-gtk_ru.po @@ -1056,10 +1056,6 @@ msgstr "\"/ublinux-data/\" раздел данных пользователя" msgid "\"/ublinux/\" system section" msgstr "\"/ublinux/\" раздел системы" -#: source/ubl-strings.h:299 -msgid "Size:" -msgstr "Размер:" - #: source/ubl-strings.h:300 msgid "Part label:" msgstr "Метка раздела:" @@ -2047,6 +2043,18 @@ msgstr "" msgid "About" msgstr "О программе" +msgid "Local system" +msgstr "Локальная система" + +msgid "Source:" +msgstr "Источник:" + +msgid "Version:" +msgstr "Версия:" + +msgid "Size:" +msgstr "Размер:" + msgid "File system label" msgstr "Метка файловой системы" diff --git a/source/ubinstall-gtk-components.c b/source/ubinstall-gtk-components.c index 1bd2324..ddcde4b 100644 --- a/source/ubinstall-gtk-components.c +++ b/source/ubinstall-gtk-components.c @@ -85,6 +85,8 @@ os_row *yon_os_row_new(){ row->TagsBox = yon_gtk_builder_get_widget(builder,"TagsBox"); row->VersionLabel = yon_gtk_builder_get_widget(builder,"VersionLabel"); row->DescriptionLabel = yon_gtk_builder_get_widget(builder,"DescriptionLabel"); + row->SourceLabel = yon_gtk_builder_get_widget(builder,"SourceLabel"); + row->SizeLabel = yon_gtk_builder_get_widget(builder,"SizeLabel"); row->name=NULL; row->modules=NULL; row->version=NULL; @@ -99,21 +101,50 @@ os_row *yon_os_row_new(){ return row; } -void yon_os_row_setup(os_row *row, char *name, char *version,char *tags, char *description){ + +void *yon_modules_list_load(main_window *widgets){ + int size; + config_str modules = yon_config_load(yon_debug_output("%s\n",get_modules_command),&size); + for(int i=1;iversion = parsed[3]; + row->name = parsed[1]; + row->tags = yon_char_replace(parsed[2]," ",", "); + row->description = parsed[5]; + row->widgets=widgets; + row->source = parsed[0]; + + char sizemod; + char *temp = yon_char_from_double(yon_size_long_convert_automatic(atol(parsed[4]),&sizemod)); + char *size_str = yon_size_get_name_from_letter(sizemod); + row->size = yon_char_unite(temp," ", size_str,NULL); + free(temp); + g_idle_add((GSourceFunc)yon_os_component_insert,row); + } + g_idle_add((GSourceFunc)yon_spinner_switch_off,widgets->OSSpinner); + g_thread_exit(NULL); +} + +void yon_os_row_setup(os_row *row, char *name, char *version,char *tags, char *description,char *source, char *size){ row->name = yon_char_new(name); char *description_full = yon_char_new(description); - // if (strlen(description)>100){ - // guint size; - // config_str description_wrapped = yon_char_wrap_to_lines(description,2,&size); - // description_full = yon_char_parsed_to_string(description_wrapped,size,"\n"); - // yon_char_parsed_free(description_wrapped,size); - // } + if (yon_char_is_empty(source)||yon_char_check_begins_with(source,"(local)/")){ + gtk_widget_hide(gtk_widget_get_parent(row->SourceLabel)); + } else { + gtk_label_set_text(GTK_LABEL(row->SourceLabel),source); + } + gtk_label_set_label(GTK_LABEL(row->NameLabel),name); gtk_label_set_label(GTK_LABEL(row->VersionLabel),version); gtk_label_set_label(GTK_LABEL(row->DescriptionLabel),description_full); + gtk_label_set_label(GTK_LABEL(row->SizeLabel),size); yon_kernel_row_setup_tags((kernel_row*)row,tags); + free(size); free(description_full); } @@ -122,7 +153,7 @@ gboolean yon_os_component_insert(struct row_data *row_input){ main_window *widgets = row_input->widgets; gtk_list_box_insert(GTK_LIST_BOX(widgets->OSSoftwareListBox),row->row,-1); - yon_os_row_setup(row,row_input->name,row_input->version,row_input->tags,_(row_input->description)); + yon_os_row_setup(row,row_input->name,row_input->version,row_input->tags,_(row_input->description), row_input->source, row_input->size); char *modules = config(modules_parameter); if (yon_char_is_empty(modules)||yon_char_check_element(modules,row_input->name,",")||!strcmp(modules,"auto")){ gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(row->InstallCheck),1); @@ -168,7 +199,7 @@ void yon_os_components_init(main_window *widgets){ gtk_overlay_add_overlay(GTK_OVERLAY(widgets->OSOverlay),widgets->OSSpinner); gtk_spinner_start(GTK_SPINNER(widgets->OSSpinner)); gtk_widget_show(widgets->OSSpinner); - g_thread_new("geag",(GThreadFunc)yon_os_components_setup,widgets); + g_thread_new("geag",(GThreadFunc)yon_modules_list_load,widgets); while(gtk_events_pending()) gtk_main_iteration(); list = gtk_container_get_children(GTK_CONTAINER(widgets->OSSoftwareListBox)); for(iter = list;iter;iter=iter->next){ @@ -226,7 +257,7 @@ gboolean yon_software_insert(struct row_data *row_input){ main_window *widgets = row_input->widgets; gtk_list_box_insert(GTK_LIST_BOX(widgets->AdditionalComponentsList),row->row,-1); - yon_os_row_setup(row,row_input->name,row_input->version,row_input->tags,_(row_input->description)); + yon_os_row_setup(row,row_input->name,row_input->version,row_input->tags,_(row_input->description),NULL,NULL); char *modules = config(modules_extra_parameter); if (yon_char_check_element(modules,row_input->name,",")){ diff --git a/source/ubinstall-gtk-source.c b/source/ubinstall-gtk-source.c index 17dd8b2..1179c12 100644 --- a/source/ubinstall-gtk-source.c +++ b/source/ubinstall-gtk-source.c @@ -2,15 +2,25 @@ void on_source_changed(GtkComboBox *self){ source_element *element = g_object_get_data(G_OBJECT(self),"source_element"); - if (gtk_combo_box_get_active(self)){ - gtk_widget_show(element->PathButton); - gtk_widget_show(element->PathEntry); - gtk_widget_hide(element->DeviceCombo); - } else{ - gtk_widget_hide(element->PathButton); - gtk_widget_hide(element->PathEntry); - gtk_widget_show(element->DeviceCombo); - } + switch (gtk_combo_box_get_active(self)){ + case 0:{ + gtk_widget_hide(element->PathButton); + gtk_widget_hide(element->PathEntry); + gtk_widget_show(element->DeviceCombo); + } break; + case 1: + case 2:{ + gtk_widget_show(element->PathButton); + gtk_widget_show(element->PathEntry); + gtk_widget_hide(element->DeviceCombo); + + } break; + case 3: { + gtk_widget_hide(element->PathButton); + gtk_widget_hide(element->PathEntry); + gtk_widget_hide(element->DeviceCombo); + } + } } void yon_source_update(source_window *window){ @@ -26,6 +36,7 @@ void yon_source_update(source_window *window){ gtk_style_context_add_class(gtk_widget_get_style_context(button),"thin"); gtk_style_context_add_class(gtk_widget_get_style_context(button),"instant"); gtk_widget_show(button); + gtk_box_reorder_child(GTK_BOX(element->MainBox),button,0); } else if (iter->next){ if (element->AddButton) { gtk_widget_destroy(element->AddButton); @@ -95,6 +106,8 @@ void yon_source_element_add(char *key,void*,source_window *window){ } else if (g_regex_match_simple(".*\\.iso",key,G_REGEX_DEFAULT,G_REGEX_MATCH_DEFAULT)){ gtk_entry_set_text(GTK_ENTRY(element->PathEntry),key); gtk_combo_box_set_active(GTK_COMBO_BOX(element->TypeCombo),2); + } else if (!strcmp(key,"local")){ + gtk_combo_box_set_active(GTK_COMBO_BOX(element->TypeCombo),3); } else { gtk_entry_set_text(GTK_ENTRY(element->PathEntry),key); gtk_combo_box_set_active(GTK_COMBO_BOX(element->TypeCombo),1); @@ -192,6 +205,15 @@ void on_source_accept(GtkWidget *,source_window *window){ if (!yon_char_is_empty(sources_list)) free(sources_list); sources_list = temp; } break; + case 3: { + if (yon_char_check_element(sources_list,"local",",")){ + yon_ubl_status_box_spawn(GTK_CONTAINER(window->StatusBox),VALUE_REPEAT_LABEL,5,BACKGROUND_IMAGE_FAIL_TYPE); + yon_ubl_status_highlight_incorrect(element->TypeCombo); + return; + } + char *temp = yon_char_append_element(sources_list,"local",","); + sources_list = temp; + } } } if (!yon_char_is_empty(sources_list)){ diff --git a/source/ubinstall-gtk.h b/source/ubinstall-gtk.h index c6a8824..72f43f8 100755 --- a/source/ubinstall-gtk.h +++ b/source/ubinstall-gtk.h @@ -105,7 +105,7 @@ "/com/ublinux/images/slide-12.png", \ NULL -#define get_modules_command "pacman --color never -Qs ^ubm- | sed -Enr -e 'N;s/\\n/ ;/' -e \"s/^([^\\/]+)\\/([^[:blank:]]+)[[:blank:]]+([^[:blank:]]+)[[:blank:]]+(\\(([^\\)]+)\\)[^\\;]+|[^\\;]*);[[:blank:]]*(.*)/\\2;\\3;\\5;\\6/p\"" +// #define get_modules_command "pacman --color never -Qs ^ubm- | sed -Enr -e 'N;s/\\n/ ;/' -e \"s/^([^\\/]+)\\/([^[:blank:]]+)[[:blank:]]+([^[:blank:]]+)[[:blank:]]+(\\(([^\\)]+)\\)[^\\;]+|[^\\;]*);[[:blank:]]*(.*)/\\2;\\3;\\5;\\6/p\"" #define get_available_modules_command "pacman --color never -Ss ^ubm- | sed -Enr -e 'N;s/\\n/ ;/' -e \"s/^([^\\/]+)\\/([^[:blank:]]+)[[:blank:]]+([^[:blank:]]+)[[:blank:]]+(\\(([^\\)]+)\\)[^\\;]+|[^\\;]*);[[:blank:]]*(.*)/\\2;\\3;\\5;\\6/p\"" #define get_local_module_info_command(target) yon_char_unite("pacman --color never -Sp $(pacman -Ssq '", target, "') --print-format '%n;%v;%d' | grep -v \"^::\"", NULL); @@ -265,6 +265,7 @@ layout && /description:/ {\ #define SYSTEM_LANG_parameter "AUTOINSTALL['ubconfig set [locale] LANG']" #define SYSTEM_LANG_parameter_command "ubconfig --source global get autoinstall AUTOINSTALL['ubconfig set [locale] LANG']" + #define get_localisation_command "ubconfig -ea --source global get [autoinstall] AUTOINSTALL[installer_locale] -- get [autoinstall] AUTOINSTALL['ubconfig set [locale] LANG'] -- get [locale] LANG" #define save_config_command(parameters) yon_char_unite("ubconfig --target system set [autoinstall] AUTOINSTALL[log]=yes ", parameters, "; nice ubinstall2 --debug autoinstall", NULL) @@ -290,6 +291,7 @@ layout && /description:/ {\ #define get_devices_command "ubinstall show --lsdevices" #define get_parts_for_device_command "ubinstall show --lsparts" +#define get_modules_command "ubinstall show --lsmodules" #define config_get_command(target) yon_char_unite("ubconfig -ea --conarg --source ", target, " get [autoinstall] AUTOINSTALL[*] -- get [locale] LANG", NULL) @@ -990,6 +992,8 @@ typedef struct GtkWidget *DescriptionLabel; GtkWidget *VersionLabel; GtkWidget *TagsBox; + GtkWidget *SourceLabel; + GtkWidget *SizeLabel; char *name; char *modules; @@ -1101,6 +1105,8 @@ struct row_data char *name; char *tags; char *description; + char *source; + char *size; }; typedef struct @@ -1348,7 +1354,7 @@ advanced_partition *yon_advanced_partition_new(); void on_advanced_part_remove(GtkWidget *self, main_window *widgets); int yon_advanced_get_part_size(main_window *widgets); void yon_advanced_partition_clear(main_window *widgets); -void yon_os_row_setup(os_row *row, char *name, char *version, char *tags, char *description); +void yon_os_row_setup(os_row *row, char *name, char *version, char *tags, char *description, char *source, char *size); os_row *yon_os_row_new(); void yon_quick_install(GtkWidget *, main_window *widgets); void on_keyboard_layout_chosen(GtkCellRenderer *self, gchar *path, main_window *widgets); @@ -1502,4 +1508,5 @@ gboolean on_time_zone_status_hover(GtkWidget *, GdkEvent *, main_window *widgets gboolean on_time_zone_status_hover_end(GtkWidget *, GdkEvent *, main_window *widgets); void yon_map_update(main_window *widgets, const char *timezone); void on_partition_size_changed(GtkWidget *self, main_window *widgets); -void *yon_partitions_list_load(main_window *widgets); \ No newline at end of file +void *yon_partitions_list_load(main_window *widgets); +void *yon_modules_list_load(main_window *widgets); \ No newline at end of file diff --git a/source/ubl-strings.h b/source/ubl-strings.h index f458a96..7a91c44 100644 --- a/source/ubl-strings.h +++ b/source/ubl-strings.h @@ -458,9 +458,14 @@ 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 _LABEL _("File system label") +// #define _LABEL _("Flags") +// #define _LABEL _("Mount point") +// #define _LABEL _("Local system") +// #define _LABEL _("Local system") +// #define _LABEL _("Source:") +// #define _LABEL _("Version:") +// #define _LABEL _("Size:") #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-os-row.glade b/ubinstall-gtk-os-row.glade index e1f0660..87ca83a 100644 --- a/ubinstall-gtk-os-row.glade +++ b/ubinstall-gtk-os-row.glade @@ -17,6 +17,9 @@ True False + 5 + 5 + 5 5 @@ -24,7 +27,7 @@ False 1 vertical - 1 + 5 True @@ -49,19 +52,23 @@ - + True False - Version - True - 15 - False - 0 + center + start + 3 + 5 + 2 + + + False True - 1 + end + 2 diff --git a/ubinstall-gtk-source-element.glade b/ubinstall-gtk-source-element.glade index 3db4218..6e62fea 100644 --- a/ubinstall-gtk-source-element.glade +++ b/ubinstall-gtk-source-element.glade @@ -26,6 +26,7 @@ Device Folder ISO-image + Local system @@ -57,10 +58,11 @@ - + + True True True - image1 + image2 @@ -68,15 +70,15 @@ False True + end 3 - - True + True True - image2 + image1 @@ -84,6 +86,7 @@ False True + end 4 diff --git a/ubinstall-gtk.glade b/ubinstall-gtk.glade index 898ae6a..d7ff9c1 100644 --- a/ubinstall-gtk.glade +++ b/ubinstall-gtk.glade @@ -918,6 +918,7 @@ agreement True False left + False True -- 2.35.1 From b59ab8775c5be96ab139233490c2d1363e5533c1 Mon Sep 17 00:00:00 2001 From: Ivan Dmitrievich Yartsev Date: Mon, 16 Feb 2026 10:05:54 +0600 Subject: [PATCH 04/17] Style fixes; localisation fixes --- locale/ubinstall-gtk.pot | 8 ++------ locale/ubinstall-gtk_ru.po | 9 +++------ source/ubinstall-gtk-kernel.c | 3 ++- source/ubl-strings.h | 3 +-- ubinstall-gtk-os-row.glade | 3 ++- ubinstall-gtk.glade | 16 ++++++++-------- 6 files changed, 18 insertions(+), 24 deletions(-) diff --git a/locale/ubinstall-gtk.pot b/locale/ubinstall-gtk.pot index 2ead469..7c1778a 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 restore" +msgid "User data only" msgstr "" #: source/ubl-strings.h:89 @@ -482,12 +482,8 @@ msgstr "" msgid "Section" msgstr "" -#: source/ubl-strings.h:119 -msgid "Capacity" -msgstr "" - #: source/ubl-strings.h:120 -msgid "Free space" +msgid "Free (%)" msgstr "" #: source/ubl-strings.h:121 diff --git a/locale/ubinstall-gtk_ru.po b/locale/ubinstall-gtk_ru.po index 5e1fee9..202c5a0 100644 --- a/locale/ubinstall-gtk_ru.po +++ b/locale/ubinstall-gtk_ru.po @@ -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 restore" +msgid "User data only" msgstr "Только пользовательские данные" #: source/ubl-strings.h:89 @@ -502,13 +502,10 @@ msgstr "Серийный номер" msgid "Section" msgstr "Раздел" -#: source/ubl-strings.h:119 -msgid "Capacity" -msgstr "Размер" #: source/ubl-strings.h:120 -msgid "Free space" -msgstr "Свободно" +msgid "Free (%)" +msgstr "Свободно (%)" #: source/ubl-strings.h:121 msgid "File system" diff --git a/source/ubinstall-gtk-kernel.c b/source/ubinstall-gtk-kernel.c index a5ac137..8b7a3c2 100644 --- a/source/ubinstall-gtk-kernel.c +++ b/source/ubinstall-gtk-kernel.c @@ -68,7 +68,8 @@ int yon_tag_add(GtkBox *target,char *tag_label, char *tag_style, char *icon_name void yon_kernel_row_setup_tags(kernel_row *row, char *tags){ int size; config_str parsed = yon_char_parse(tags,&size,", "); - for (int i=0;i=0;i--){ char *passw = parsed[i][0]==' '?yon_char_divide(parsed[i],0):NULL; if (passw) free(passw); char *tag_name = _(parsed[i]); diff --git a/source/ubl-strings.h b/source/ubl-strings.h index 7a91c44..64c2b99 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 restore") +#define USER_DATA_HEAD_LABEL _("User data only") #define USER_DATA_LABEL _("Installing only user data without OS components") #define KEYBOARD__LABEL _("Keyboard layout language") @@ -113,7 +113,6 @@ NULL) #define DESIGNATION_LABEL _("Designation") #define SERIAL_LABEL _("Serial") #define SECTION_LABEL _("Section") -#define CAPACITY_LABEL _("Capacity") #define FREE_SPACE_LABEL _("Free space") #define FS_LABEL _("File system") #define DEFAULTSWITCHING_LABEL _("Default (L_Alt + L_Shift)") diff --git a/ubinstall-gtk-os-row.glade b/ubinstall-gtk-os-row.glade index 87ca83a..9590bb8 100644 --- a/ubinstall-gtk-os-row.glade +++ b/ubinstall-gtk-os-row.glade @@ -208,12 +208,13 @@ True False - center + start 5 True False + start Size: 0 diff --git a/ubinstall-gtk.glade b/ubinstall-gtk.glade index d7ff9c1..391d423 100644 --- a/ubinstall-gtk.glade +++ b/ubinstall-gtk.glade @@ -8352,7 +8352,7 @@ or continue working in the system Live environment. - Free space + Free (%) @@ -9093,7 +9093,7 @@ or continue working in the system Live environment. - Free space + Free (%) @@ -9849,7 +9849,7 @@ separately into the selected partition. - Free space + Free (%) @@ -10876,7 +10876,7 @@ separately into the selected partition. True False - User data restore + User data only 0 @@ -11315,7 +11315,7 @@ separately into the selected partition. - Free space + Free (%) @@ -11761,7 +11761,7 @@ separately into the selected partition. - Free space + Free (%) @@ -12200,7 +12200,7 @@ separately into the selected partition. - Free space + Free (%) @@ -13041,7 +13041,7 @@ separately into the selected partition. - Free space + Free (%) -- 2.35.1 From f9fb631f4ef194411e69b7acaedaf044cc0e936e Mon Sep 17 00:00:00 2001 From: Ivan Dmitrievich Yartsev Date: Mon, 16 Feb 2026 16:46:53 +0600 Subject: [PATCH 05/17] Changed partition size saving --- gresource.xml | 1 - modules-list.csv | 208 ------------------------- modules.csv | 109 -------------- source/CMakeLists.txt | 1 - source/ubinstall-gtk-components.c | 36 +++-- source/ubinstall-gtk-installation.c | 226 +++++++++++++++++++--------- source/ubinstall-gtk.c | 25 ++- source/ubinstall-gtk.h | 5 +- source/ubl-strings.h | 2 + ubinstall-gtk.glade | 2 +- 10 files changed, 207 insertions(+), 408 deletions(-) delete mode 100644 modules-list.csv delete mode 100644 modules.csv diff --git a/gresource.xml b/gresource.xml index 6f162c0..27a572a 100644 --- a/gresource.xml +++ b/gresource.xml @@ -28,7 +28,6 @@ ubinstall-gtk.css - modules.csv kernel-list.csv kernel-list-addon.csv services-list.csv diff --git a/modules-list.csv b/modules-list.csv deleted file mode 100644 index c09728f..0000000 --- a/modules-list.csv +++ /dev/null @@ -1,208 +0,0 @@ -OS_VERSION_ID;PACKAGE_UBM;NAME_UBM;TAG_UBM;DESCRIPTION_UBM -2405;ubm-001-linux515;001-linux515-*-*-*.ubm;base;UBLinux module the kernel and modules -2405;ubm-001-linux61;001-linux61-*-*-*.ubm;base;UBLinux module the kernel and modules -2405;ubm-001-linux66;001-linux66-*-*-*.ubm;base;UBLinux module the kernel and modules -2405;ubm-002-linux515-headers;002-linux515-headers-*-*-*.ubm;base;UBLinux module headers and scripts for building modules -2405;ubm-002-linux61-headers;002-linux61-headers-*-*-*.ubm;base;UBLinux module headers and scripts for building modules -2405;ubm-002-linux66-headers;002-linux66-headers-*-*-*.ubm;base;UBLinux module headers and scripts for building modules -2405;ubm-003-linux515-docs;003-linux515-docs-*-*-*.ubm;base;UBLinux module documentation for the UBLinux kernel -2405;ubm-003-linux61-docs;003-linux61-docs-*-*-*.ubm;base;UBLinux module documentation for the UBLinux kernel -2405;ubm-003-linux66-docs;003-linux66-docs-*-*-*.ubm;base;UBLinux module documentation for the UBLinux kernel -2405;ubm-004-linux-firmware;004-linux-firmware-*-*-*.ubm;base;UBLinux module firmwares -2405;ubm-010-core;010-core-*-*-*.ubm;base;UBLinux module includes the core developer components -2405;ubm-010-core-devel;010-core-devel-*-*-*.ubm;base;UBLinux module includes the core developer components -2405;ubm-020-xorg-base;020-xorg-base-*-*-*.ubm;base;UBLinux module includes basic components Xorg -2405;ubm-021-xorg-fonts;021-xorg-fonts-*-*-*.ubm;base;UBLinux module includes basic fonts -2405;ubm-025-xorg-gl;025-xorg-gl-*-*-*.ubm;base;UBLinux module includes graphics accelerators -2405;ubm-030-xorg-gtk;030-xorg-gtk-*-*-*.ubm;base;UBLinux module includes GTK libs -2405;ubm-035-xorg-qt;035-xorg-qt-*-*-*.ubm;base;UBLinux module includes Qt5 and Qt6 libs -2405;ubm-036-xorg-qt5;036-xorg-qt5-*-*-*.ubm;base;UBLinux module includes QT5 libs -2405;ubm-037-xorg-qt6;037-xorg-qt6-*-*-*.ubm;base;UBLinux module includes QT6 libs -2405;ubm-040-xorg-xfce;040-xorg-xfce-*-*-*.ubm;base;UBLinux module includes Xfce applications -2405;ubm-041-xorg-plasma;041-xorg-plasma-*-*-*.ubm;base;UBLinux module includes KDE Plasma applications -2405;ubm-042-xorg-gnome;042-xorg-gnome-*-*-*.ubm;base;UBLinux module includes GNOME next generation desktop shell -2405;ubm-043-xorg-mate;043-xorg-mate-*-*-*.ubm;base;UBLinux module includes MATE desktop shell -2405;ubm-045-xorg-pantheon;045-xorg-pantheon-*-*-*.ubm;base;UBLinux module includes Pantheon desktop shell -2405;ubm-050-xorg-gtk-app;050-xorg-gtk-app-*-*-*.ubm;base;UBLinux module includes GTK applications -2405;ubm-055-xorg-qt-app;055-xorg-qt-app-*-*-*.ubm;base;UBLinux module includes QT applications -2405;ubm-060-xorg-theme;060-xorg-theme-*-*-*.ubm;base;UBLinux module includes GTK and icons themes -2405;ubm-070-dm-lightdm;070-dm-lightdm-*-*-*.ubm;base;UBLinux module includes Lightdm display manager -2405;ubm-080-multimedia;080-multimedia-*-*-*.ubm;base;UBLinux module includes multimedia applications -2405;ubm-100-ublinux;100-ublinux-*-*-*.ubm;base;UBLinux module include system utilites -2405;ubm-anydesk;anydesk-*-*-*.ubm;extra;UBLinux module include AnyDesk -2405;ubm-backgrounds;backgrounds-*-*-*.ubm;extra;UBLinux module include desktop backgrounds -2405;ubm-blender;blender-*-*-*.ubm;extra;UBLinux module include blender and utilities -2405;ubm-chromium;chromium-*-*-*.ubm;extra;UBLinux module includes Chromium and some plugins -2405;ubm-chromium-gost;chromium-gost-*-*-*.ubm;extra;UBLinux module includes Chromium and some plugins -2405;ubm-database;database-*-*-*.ubm;extra;UBLinux module includes postgresql, mariadb database and utilities -2405;ubm-docker;docker-*-*-*.ubm;extra;UBLinux module includes docker and webmanager and utils -2405;ubm-drv-brother;drv-brother-*-*-*.ubm;extra;UBLinux module include Brother printer drivers -2405;ubm-drv-canon-capt;drv-canon-capt-*-*-*.ubm;extra;UBLinux module include Canon CAPT Printer Driver -2405;ubm-drv-canon-ufrii;drv-canon-ufrii-*-*-*.ubm;extra;UBLinux module include Canon UFR II LIPSLX CARPS2 printer driver -2405;ubm-drv-epson;drv-epson-*-*-*.ubm;extra;UBLinux module include Epson printer drivers -2405;ubm-drv-kyocera;drv-kyocera-*-*-*.ubm;extra;UBLinux module include Kyocera printer drivers -2405;ubm-drv-lexmark;drv-lexmark-*-*-*.ubm;extra;UBLinux module include Lexmark drivers -2405;ubm-drv-pantum;drv-pantum-*-*-*.ubm;extra;UBLinux module include Pantum printer drivers -2405;ubm-drv-printer;drv-printer-*-*-*.ubm;extra;UBLinux module include hplip, gutenprint, foomatic -2405;ubm-drv-ricoh;drv-ricoh-*-*-*.ubm;extra;UBLinux module include Ricoh drivers -2405;ubm-drv-samsung;drv-samsung-*-*-*.ubm;extra;UBLinux module include Samsung drivers -2405;ubm-drv-xerox;drv-xerox-*-*-*.ubm;extra;UBLinux module include Xerox drivers -2405;ubm-education;education-*-*-*.ubm;extra;UBLinux module includes education soft -2405;ubm-firefox;firefox-*-*-*.ubm;extra;UBLinux module includes Firefox and some plugins -2405;ubm-java17-openjfx;java17-openjfx-*-*-*.ubm;extra;UBLinux module include Java OpenJFX 17 client application platform -2405;ubm-jdk11;jdk11-*-*-*.ubm;extra;UBLinux module includes OpenJDK Java 11 development kit -2405;ubm-jdk17;jdk17-*-*-*.ubm;extra;UBLinux module includes OpenJDK Java 17 development kit -2405;ubm-jdk21;jdk21-*-*-*.ubm;extra;UBLinux module includes OpenJDK Java 21 development kit -2405;ubm-jdk8;jdk8-*-*-*.ubm;extra;UBLinux module includes OpenJDK Java 8 development kit -2405;ubm-lib32;lib32-*-*-*.ubm;extra;UBLinux module includes some library 32-bit -2405;ubm-libreoffice;libreoffice-*-*-*.ubm;extra;UBLinux module include LibreOffice -2405;ubm-linux515-dkms;linux515-dkms-*-*-*.ubm;extra;UBLinux module includes dkms additionals modules -2405;ubm-linux515-nvidia;linux515-nvidia-*-*-*.ubm;extra;UBLinux module include NVIDIA 470xx driver for linux -2405;ubm-linux515-nvidia-390xx;linux515-nvidia-390xx-*-*-*.ubm;extra;UBLinux module include NVIDIA 390xx driver for linux -2405;ubm-linux515-nvidia-470xx;linux515-nvidia-470xx-*-*-*.ubm;extra;UBLinux module include NVIDIA 470xx driver for linux -2405;ubm-linux61-dkms;linux61-dkms-*-*-*.ubm;extra;UBLinux module includes dkms additionals modules -2405;ubm-linux61-nvidia;linux61-nvidia-*-*-*.ubm;extra;UBLinux module include NVIDIA 470xx driver for linux -2405;ubm-linux61-nvidia-390xx;linux61-nvidia-390xx-*-*-*.ubm;extra;UBLinux module include NVIDIA 390xx driver for linux -2405;ubm-linux61-nvidia-470xx;linux61-nvidia-470xx-*-*-*.ubm;extra;UBLinux module include NVIDIA 470xx driver for linux -2405;ubm-linux61-r8168-8136;linux61-r8168-8136-*-*-*.ubm;extra;UBLinux module includes dkms additionals modules -2405;ubm-linux66-dkms;linux66-dkms-*-*-*.ubm;extra;UBLinux module includes dkms additionals modules -2405;ubm-onlyoffice;onlyoffice-*-*-*.ubm;extra;UBLinux module includes OnlyOffice suite -2405;ubm-patch;patch-*-*-*.ubm;extra;UBLinux module include apps patch -2405;ubm-podman;podman-*-*-*.ubm;extra;UBLinux module includes podman and webmanager and utils -2405;ubm-pycharm;pycharm-*-*-*.ubm;extra;UBLinux module include pycharm-community-edition and utilities -2405;ubm-qaratms-ru;qaratms-ru-*-*-*.ubm;extra;UBLinux module include pycharm-community-edition and utilities -2405;ubm-qemu;qemu-*-*-*.ubm;extra;UBLinux module includes QEMU, manager and utils -2405;ubm-r7-office;r7-office-*-*-*.ubm;extra;UBLinux module includes R7 Office -2405;ubm-realvnc;realvnc-*-*-*.ubm;extra;UBLinux module includes realvnc viewer and server -2405;ubm-rustdesk;rustdesk-*-*-*.ubm;extra;UBLinux module includes rustdesk -2405;ubm-rustdesk-server;rustdesk-server-*-*-*.ubm;extra;UBLinux module includes rustdesk -2405;ubm-telegram;telegram-*-*-*.ubm;extra;UBLinux module includes Telegram -2405;ubm-ubpile-workflow;ubpile-workflow-*-*-*.ubm;extra;UBLinux module include UBPile Workflow -2405;ubm-virtual-guest;virtual-guest-*-*-*.ubm;extra;UBLinux module includes agents for Linux guest -2405;ubm-virtualbox-host;virtualbox-host-*-*-*.ubm;extra;UBLinux module includes VirtualBox and extension packs -2405;ubm-web;web-*-*-*.ubm;extra;UBLinux module includes Web servers -2405;ubm-webmin;webmin-*-*-*.ubm;extra;UBLinux module includes Webmin and Usermin -2405;ubm-whiteboard;whiteboard-*-*-*.ubm;extra;UBLinux module includes interactive whiteboard soft -2405;ubm-winbox;winbox-*-*-*.ubm;extra;UBLinux module include Winbox -2405;ubm-wine;wine-*-*-*.ubm;extra;UBLinux module includes wine and utilities -2405;ubm-wps-office;wps-office-*-*-*.ubm;extra;UBLinux module include Kingsoft Office (WPS Office) - an office productivity suite -2405;ubm-yandex-browser;yandex-browser-*-*-*.ubm;extra;UBLinux module includes Yandex Browser and some utils -2204;ubm-001-linux;001-linux-*-*-*.ubm;base;UBLinux module the kernel and modules -2204;ubm-001-linux515;001-linux515-*-*-*.ubm;base;UBLinux module the kernel and modules -2204;ubm-001-linux61;001-linux61-*-*-*.ubm;base;UBLinux module the kernel and modules -2204;ubm-001-linux66;001-linux66-*-*-*.ubm;base;UBLinux module the kernel and modules -2204;ubm-002-linux-headers;002-linux-headers-*-*-*.ubm;base;UBLinux module headers and scripts for building modules for the Meta UBlinux kernel, modules, headers and documentation -2204;ubm-002-linux515-headers;002-linux515-headers-*-*-*.ubm;base;UBLinux module headers and scripts for building modules -2204;ubm-002-linux61-headers;002-linux61-headers-*-*-*.ubm;base;UBLinux module headers and scripts for building modules -2204;ubm-002-linux66-headers;002-linux66-headers-*-*-*.ubm;base;UBLinux module headers and scripts for building modules -2204;ubm-003-linux-docs;003-linux-docs-*-*-*.ubm;base;UBLinux module documentation for the UBLinux kernel -2204;ubm-003-linux515-docs;003-linux515-docs-*-*-*.ubm;base;UBLinux module documentation for the UBLinux kernel -2204;ubm-003-linux61-docs;003-linux61-docs-*-*-*.ubm;base;UBLinux module documentation for the UBLinux kernel -2204;ubm-003-linux66-docs;003-linux66-docs-*-*-*.ubm;base;UBLinux module documentation for the UBLinux kernel -2204;ubm-004-linux-firmware;004-linux-firmware-*-*-*.ubm;base;UBLinux module firmwares -2204;ubm-010-core;010-core-*-*-*.ubm;base;UBLinux module includes the core developer components -2204;ubm-010-core-devel;010-core-devel-*-*-*.ubm;base;UBLinux module includes the core developer components -2204;ubm-020-xorg-base;020-xorg-base-*-*-*.ubm;base;UBLinux module includes basic components Xorg -2204;ubm-021-xorg-fonts;021-xorg-fonts-*-*-*.ubm;base;UBLinux module includes basic fonts -2204;ubm-025-xorg-gl;025-xorg-gl-*-*-*.ubm;base;UBLinux module includes graphics accelerators -2204;ubm-030-xorg-gtk;030-xorg-gtk-*-*-*.ubm;base;UBLinux module includes GTK libs -2204;ubm-035-xorg-qt5;035-xorg-qt5-*-*-*.ubm;base;UBLinux module includes QT5 libs -2204;ubm-036-xorg-qt6;036-xorg-qt6-*-*-*.ubm;base;UBLinux module includes QT6 libs -2204;ubm-040-xorg-xfce;040-xorg-xfce-*-*-*.ubm;base;UBLinux module includes Xfce applications -2204;ubm-041-xorg-plasma;041-xorg-plasma-*-*-*.ubm;base;UBLinux module includes KDE Plasma applications -2204;ubm-042-xorg-gnome;042-xorg-gnome-*-*-*.ubm;base;UBLinux module includes GNOME next generation desktop shell -2204;ubm-043-xorg-mate;043-xorg-mate-*-*-*.ubm;base;UBLinux module includes MATE desktop shell -2204;ubm-045-xorg-pantheon;045-xorg-pantheon-*-*-*.ubm;base;UBLinux module includes Pantheon desktop shell -2204;ubm-049-xorg-liquidshell;049-xorg-liquidshell-*-*-*.ubm;base;UBLinux module includes Liquidshell basic desktop shell using QtWidgets -2204;ubm-050-xorg-gtk-app;050-xorg-gtk-app-*-*-*.ubm;base;UBLinux module includes GTK applications -2204;ubm-055-xorg-qt-app;055-xorg-qt-app-*-*-*.ubm;base;UBLinux module includes QT applications -2204;ubm-060-xorg-theme;060-xorg-theme-*-*-*.ubm;base;UBLinux module includes GTK and icons themes -2204;ubm-070-dm-lightdm;070-dm-lightdm-*-*-*.ubm;base;UBLinux module includes Lightdm display manager -2204;ubm-080-multimedia;080-multimedia-*-*-*.ubm;base;UBLinux module includes multimedia applications -2204;ubm-100-ublinux;100-ublinux-*-*-*.ubm;base;UBLinux module include system utilites -2204;ubm-amdgpu-pro;amdgpu-pro-*-*-*.ubm;extra;UBLinux module includes AMDGRU PRO driver and utilities -2204;ubm-anydesk;anydesk-*-*-*.ubm;extra;UBLinux module includes anydesk -2204;ubm-backgrounds;backgrounds-*-*-*.ubm;extra;UBLinux module include desktop backgrounds -2204;ubm-blender;blender-*-*-*.ubm;extra;UBLinux module includes wine and utilities -2204;ubm-chromium;chromium-*-*-*.ubm;extra;UBLinux module includes Chromium-GOST and some plugins -2204;ubm-chromium-gost;chromium-gost-*-*-*.ubm;extra;UBLinux module includes Chromium-GOST and some plugins -2204;ubm-database;database-*-*-*.ubm;extra;UBLinux module includes database applications -2204;ubm-docker;docker-*-*-*.ubm;extra;UBLinux module includes docker and webmanager and utils -2204;ubm-drv-brother;drv-brother-*-*-*.ubm;extra;UBLinux module include Brother printer drivers -2204;ubm-drv-canon-capt;drv-canon-capt-*-*-*.ubm;extra;UBLinux module include Canon CAPT Printer Driver -2204;ubm-drv-canon-ufrii;drv-canon-ufrii-*-*-*.ubm;extra;UBLinux module include Canon UFR II LIPSLX CARPS2 printer driver -2204;ubm-drv-epson;drv-epson-*-*-*.ubm;extra;UBLinux module include Epson printer drivers -2204;ubm-drv-kyocera;drv-kyocera-*-*-*.ubm;extra;UBLinux module include Kyocera printer drivers -2204;ubm-drv-lexmark;drv-lexmark-*-*-*.ubm;extra;UBLinux module include Lexmark drivers -2204;ubm-drv-pantum;drv-pantum-*-*-*.ubm;extra;UBLinux module include Pantum printer drivers -2204;ubm-drv-printer;drv-printer-*-*-*.ubm;extra;UBLinux module include hplip, gutenprint, foomatic -2204;ubm-drv-ricoh;drv-ricoh-*-*-*.ubm;extra;UBLinux module include Ricoh drivers -2204;ubm-drv-samsung;drv-samsung-*-*-*.ubm;extra;UBLinux module include Samsung drivers -2204;ubm-drv-xerox;drv-xerox-*-*-*.ubm;extra;UBLinux module include Xerox drivers -2204;ubm-firefox;firefox-*-*-*.ubm;extra;UBLinux module includes Firefox and some plugins -2204;ubm-gambas3;gambas3-*-*-*.ubm;extra;UBLinux module includes Gambas3 and components -2204;ubm-game-hedgewars;game-hedgewars-*-*-*.ubm;extra;UBLinux module include Hedgewars game similiar to Worms -2204;ubm-game-warfork;game-warfork-*-*-*.ubm;extra;UBLinux module include Hedgewars game similiar to Worms -2204;ubm-gitea;gitea-*-*-*.ubm;extra;UBLinux module includes Gitea and MemCached -2204;ubm-gitlab;gitlab-*-*-*.ubm;extra;UBLinux module include Gitlab CLI tools -2204;ubm-gitlab-cli;gitlab-cli-*-*-*.ubm;extra;UBLinux module include Gitlab CLI tools -2204;ubm-java11-openjfx;java11-openjfx-*-*-*.ubm;extra;UBLinux module include Java OpenJFX 11 client application platform -2204;ubm-java17-openjfx;java17-openjfx-*-*-*.ubm;extra;UBLinux module include Java OpenJFX 17 client application platform -2204;ubm-jdk11;jdk11-*-*-*.ubm;extra;UBLinux module includes OpenJDK Java 11 development kit -2204;ubm-jdk17;jdk17-*-*-*.ubm;extra;UBLinux module includes OpenJDK Java 17 development kit -2204;ubm-jdk8;jdk8-*-*-*.ubm;extra;UBLinux module includes OpenJDK Java 8 development kit -2204;ubm-lazarus-gtk2;lazarus-gtk2-*-*-*.ubm;extra;UBLinux module include Free Pascal and Lazarus GTK2 -2204;ubm-lazarus-qt5;lazarus-qt5-*-*-*.ubm;extra;UBLinux module include Free Pascal and Lazarus QT5 -2204;ubm-lib32;lib32-*-*-*.ubm;extra;UBLinux module includes some library 32-bit -2204;ubm-libreoffice;libreoffice-*-*-*.ubm;extra;UBLinux module includes rustdesk -2204;ubm-linux-dkms;linux-dkms-*-*-*.ubm;extra;UBLinux module includes dkms additionals modules -2204;ubm-linux515-dkms;linux515-dkms-*-*-*.ubm;extra;UBLinux module includes dkms additionals modules -2204;ubm-linux515-nvidia;linux515-nvidia-*-*-*.ubm;extra;UBLinux module include NVIDIA 470xx driver for linux -2204;ubm-linux515-nvidia-390xx;linux515-nvidia-390xx-*-*-*.ubm;extra;UBLinux module include NVIDIA 390xx driver for linux -2204;ubm-linux515-nvidia-470xx;linux515-nvidia-470xx-*-*-*.ubm;extra;UBLinux module include NVIDIA 470xx driver for linux -2204;ubm-linux61-dkms;linux61-dkms-*-*-*.ubm;extra;UBLinux module includes dkms additionals modules -2204;ubm-linux61-nvidia;linux61-nvidia-*-*-*.ubm;extra;UBLinux module include NVIDIA 470xx driver for linux -2204;ubm-linux61-nvidia-390xx;linux61-nvidia-390xx-*-*-*.ubm;extra;UBLinux module include NVIDIA 390xx driver for linux -2204;ubm-linux61-nvidia-470xx;linux61-nvidia-470xx-*-*-*.ubm;extra;UBLinux module include NVIDIA 470xx driver for linux -2204;ubm-linux66-dkms;linux66-dkms-*-*-*.ubm;extra;UBLinux module includes dkms additionals modules -2204;ubm-linux66-nvidia;linux66-nvidia-*-*-*.ubm;extra;UBLinux module include NVIDIA 470xx driver for linux -2204;ubm-linux66-nvidia-390xx;linux66-nvidia-390xx-*-*-*.ubm;extra;UBLinux module include NVIDIA 390xx driver for linux -2204;ubm-linux66-nvidia-470xx;linux66-nvidia-470xx-*-*-*.ubm;extra;UBLinux module include NVIDIA 470xx driver for linux -2204;ubm-lsi-megaraid;lsi-megaraid-*-*-*.ubm;extra;UBLinux module includes LSI MegaRaid SM, StorCLI, MegaCLI and utils -2204;ubm-nvidia-340;nvidia-340-*-*-*.ubm;extra;UBLinux module includes NVIDIA 340xx driver and utilities -2204;ubm-nvidia-390;nvidia-390-*-*-*.ubm;extra;UBLinux module includes NVIDIA 390xx driver and utilities -2204;ubm-nvidia-470;nvidia-470-*-*-*.ubm;extra;UBLinux module includes NVIDIA 470xx driver and utilities -2204;ubm-nvidia-510;nvidia-510-*-*-*.ubm;extra;UBLinux module includes NVIDIA 510xx driver and utilities -2204;ubm-nvidia-515;nvidia-515-*-*-*.ubm;extra;UBLinux module includes NVIDIA 515xx driver and utilities -2204;ubm-nvidia-optimus;nvidia-optimus-*-*-*.ubm;extra;UBLinux module includes NVIDIA Optimus -2204;ubm-onlyoffice;onlyoffice-*-*-*.ubm;extra;UBLinux module includes OnlyOffice DocumentServer suite -2204;ubm-onlyoffice-documentserver;onlyoffice-documentserver-*-*-*.ubm;extra;UBLinux module includes OnlyOffice DocumentServer suite -2204;ubm-opera;opera-*-*-*.ubm;extra;UBLinux module includes Opera and some plugins -2204;ubm-patch;patch-*-*-*.ubm;extra;UBLinux module includes patch -2204;ubm-podman;podman-*-*-*.ubm;extra;UBLinux module includes podman and webmanager and utils -2204;ubm-qemu;qemu-*-*-*.ubm;extra;UBLinux module includes QEMU headless and utils -2204;ubm-qemu-headless;qemu-headless-*-*-*.ubm;extra;UBLinux module includes QEMU headless and utils -2204;ubm-qt4;qt4-*-*-*.ubm;extra;UBLinux module include QT4 -2204;ubm-realvnc;realvnc-*-*-*.ubm;extra;UBLinux module includes realvnc viewer and server -2204;ubm-rustdesk;rustdesk-*-*-*.ubm;extra;UBLinux module include rustdesk-server -2204;ubm-rustdesk-server;rustdesk-server-*-*-*.ubm;extra;UBLinux module include rustdesk-server -2204;ubm-skype;skype-*-*-*.ubm;extra;UBLinux module include Skype -2204;ubm-telegram;telegram-*-*-*.ubm;extra;UBLinux module includes Telegram -2204;ubm-tor;tor-*-*-*.ubm;extra;UBLinux module include Tor utils and browser -2204;ubm-ubpile-workflow;ubpile-workflow-*-*-*.ubm;extra;UBLinux module include UBPile Workflow -2204;ubm-virtual-guest;virtual-guest-*-*-*.ubm;extra;UBLinux module includes agents for Linux guest without X support -2204;ubm-virtual-guest-nox;virtual-guest-nox-*-*-*.ubm;extra;UBLinux module includes agents for Linux guest without X support -2204;ubm-virtualbox-host;virtualbox-host-*-*-*.ubm;extra;UBLinux module includes VirtualBox headless and extension packs -2204;ubm-virtualbox-host-headless;virtualbox-host-headless-*-*-*.ubm;extra;UBLinux module includes VirtualBox headless and extension packs -2204;ubm-virtualbox-web;virtualbox-web-*-*-*.ubm;extra;UBLinux module includes phpvirtualbox for VirtualBox -2204;ubm-vivaldi;vivaldi-*-*-*.ubm;extra;UBLinux module include Vivaldi browser -2204;ubm-vmware-workstation16;vmware-workstation16-*-*-*.ubm;extra;UBLinux module includes VMware-Workstation 16 -2204;ubm-web;web-*-*-*.ubm;extra;UBLinux module includes Webmin and Usermin -2204;ubm-webmin;webmin-*-*-*.ubm;extra;UBLinux module includes Webmin and Usermin -2204;ubm-wiki-js;wiki-js-*-*-*.ubm;extra;UBLinux module include Wiki.js -2204;ubm-winbox;winbox-*-*-*.ubm;extra;UBLinux module include Winbox -2204;ubm-wine;wine-*-*-*.ubm;extra;UBLinux module includes wine and utilities -2204;ubm-wps-office;wps-office-*-*-*.ubm;extra;UBLinux module include Kingsoft Office (WPS Office) - an office productivity suite -2204;ubm-xremote;xremote-*-*-*.ubm;extra;UBLinux module include X11 remote utils -2204;ubm-yandex-browser;yandex-browser-*-*-*.ubm;extra;UBLinux module includes Yandex Browser and some utils -2204;ubm-zoom;zoom-*-*-*.ubm;extra;UBLinux module include Zoom \ No newline at end of file diff --git a/modules.csv b/modules.csv deleted file mode 100644 index c2f0af1..0000000 --- a/modules.csv +++ /dev/null @@ -1,109 +0,0 @@ -UBM_NAME|UBM_TAG|UBM_DECRIPTION -001-linux-5.17.6-2-x86_64.ubm|base|UBLinux module the kernel and modules -001-linux515-5.15.157-1-x86_64.ubm|base|UBLinux module the kernel and modules -001-linux61-6.1.92-1-x86_64.ubm|base|UBLinux module the kernel and modules -001-linux66-6.6.30-1-x86_64.ubm|base|UBLinux module the kernel and modules -002-linux-headers-5.17.6-2-x86_64.ubm|base|UBLinux module headers and scripts for building modules -002-linux515-headers-5.15.157-1-x86_64.ubm|base|UBLinux module headers and scripts for building modules -002-linux61-headers-6.1.92-1-x86_64.ubm|base|UBLinux module headers and scripts for building modules -002-linux66-headers-6.6.30-1-x86_64.ubm|base|UBLinux module headers and scripts for building modules -003-linux-docs-5.17.6-2-x86_64.ubm|base|UBLinux module documentation for the UBLinux kernel -003-linux515-docs-5.15.157-1-x86_64.ubm|base|UBLinux module documentation for the UBLinux kernel -003-linux61-docs-6.1.92-1-x86_64.ubm|base|UBLinux module documentation for the UBLinux kernel -003-linux66-docs-6.6.30-1-x86_64.ubm|base|UBLinux module documentation for the UBLinux kernel -004-linux-firmware-2204-4-x86_64.ubm|base|UBLinux module firmwares -010-core-2204-2-x86_64.ubm|base|UBLinux module includes the core components -010-core-devel-2204-1-x86_64.ubm|base|UBLinux module includes the core developer components -020-xorg-base-2204-2-x86_64.ubm|base|UBLinux module includes basic components Xorg -021-xorg-fonts-2204-2-x86_64.ubm|base|UBLinux module includes basic fonts -025-xorg-gl-2204-1-x86_64.ubm|base|UBLinux module includes graphics accelerators -030-xorg-gtk-2204-2-x86_64.ubm|base|UBLinux module includes GTK libs -035-xorg-qt5-2204-2-x86_64.ubm|base|UBLinux module includes QT5 libs -036-xorg-qt6-2204-1-x86_64.ubm|base|UBLinux module includes QT6 libs -040-xorg-xfce-2204-2-x86_64.ubm|base|UBLinux module includes Xfce applications -041-xorg-plasma-2204-2-x86_64.ubm|base|UBLinux module includes KDE Plasma applications -042-xorg-gnome-2204-1-x86_64.ubm|base|UBLinux module includes GNOME next generation desktop shell -043-xorg-mate-2204-2-x86_64.ubm|base|UBLinux module includes MATE desktop shell -045-xorg-pantheon-2204-1-x86_64.ubm|base|UBLinux module includes Pantheon desktop shell -049-xorg-liquidshell-2204-1-x86_64.ubm|base|UBLinux module includes Liquidshell basic desktop shell using QtWidgets -050-xorg-gtk-app-2204-4-x86_64.ubm|base|UBLinux module includes GTK applications -055-xorg-qt-app-2204-2-x86_64.ubm|base|UBLinux module includes QT applications -060-xorg-theme-2204-1-x86_64.ubm|base|UBLinux module includes GTK and icons themes -070-dm-lightdm-2204-1-x86_64.ubm|base|UBLinux module includes Lightdm display manager -080-multimedia-2204-1-x86_64.ubm|base|UBLinux module includes multimedia applications -100-ublinux-2204-113-x86_64.ubm|base|UBLinux module include system utilites -amdgpu-pro-23.40-1-x86_64.ubm|extra|UBLinux module includes AMDGRU PRO driver and utilities -backgrounds-1.0-1-x86_64.ubm|extra|UBLinux module include desktop backgrounds -chromium-2204-1-x86_64.ubm|extra|UBLinux module includes Chromium and some plugins -chromium-gost-122.0.6261.58-1-x86_64.ubm|extra|UBLinux module includes Chromium and some plugins -database-2204-1-x86_64.ubm|extra|UBLinux module includes postgresql, mariadb database and utilities -drv-brother-2204-1-x86_64.ubm|extra|UBLinux module include Brother printer drivers -drv-canon-capt-2204-1-x86_64.ubm|extra|UBLinux module include Canon CAPT Printer Driver -drv-canon-ufrii-2204-2-x86_64.ubm|extra|UBLinux module include Canon UFR II LIPSLX CARPS2 printer driver -drv-epson-2204-1-x86_64.ubm|extra|UBLinux module include Epson printer drivers -drv-kyocera-2204-1-x86_64.ubm|extra|UBLinux module include Kyocera printer drivers -drv-lexmark-2204-1-x86_64.ubm|extra|UBLinux module include Lexmark drivers -drv-pantum-2204-1-x86_64.ubm|extra|UBLinux module include Pantum printer drivers -drv-printer-2204-1-x86_64.ubm|extra|UBLinux module include hplip, gutenprint, foomatic -drv-ricoh-2204-1-x86_64.ubm|extra|UBLinux module include Ricoh drivers -drv-samsung-2204-1-x86_64.ubm|extra|UBLinux module include Samsung drivers -drv-xerox-2204-2-x86_64.ubm|extra|UBLinux module include Xerox drivers -firefox-2204-1-x86_64.ubm|extra|UBLinux module includes Firefox and some plugins -game-hedgewars-1.0.0-298-x86_64.ubm|extra|UBLinux module include Hedgewars game similiar to Worms -game-warfork-2.14-1-x86_64.ubm|extra|UBLinux module include Hedgewars game similiar to Worms -gitea-1.18.1-1-x86_64.ubm|extra|UBLinux module includes Gitea and MemCached -gitlab-15.0.2-1-x86_64.ubm|extra|UBLinux module include GitLab and GitLab CI runner -gitlab-cli-2204-1-x86_64.ubm|extra|UBLinux module include Gitlab CLI tools -java11-openjfx-2204-1-x86_64.ubm|extra|UBLinux module include Java OpenJFX 11 client application platform -java17-openjfx-2204-1-x86_64.ubm|extra|UBLinux module include Java OpenJFX 17 client application platform -jdk11-2204-1-x86_64.ubm|extra|UBLinux module includes OpenJDK Java 11 development kit -jdk17-2204-1-x86_64.ubm|extra|UBLinux module includes OpenJDK Java 17 development kit -jdk8-2204-1-x86_64.ubm|extra|UBLinux module includes OpenJDK Java 8 development kit -lazarus-gtk2-2204-1-x86_64.ubm|extra|UBLinux module include Free Pascal and Lazarus GTK2 -lazarus-qt5-2204-1-x86_64.ubm|extra|UBLinux module include Free Pascal and Lazarus QT5 -lib32-2204-1-x86_64.ubm|extra|UBLinux module includes some library 32-bit -libreoffice-7.3.2-1-x86_64.ubm|extra|UBLinux module include LibreOffice -linux-dkms-5.17.6-7-x86_64.ubm|extra|UBLinux module includes dkms additionals modules -linux515-dkms-5.15.157-1-x86_64.ubm|extra|UBLinux module includes dkms additionals modules -linux61-dkms-6.1.92-1-x86_64.ubm|extra|UBLinux module includes dkms additionals modules -nvidia-340-5.17.6-2-x86_64.ubm|extra|UBLinux module includes NVIDIA 340xx driver and utilities -nvidia-390-5.17.6-2-x86_64.ubm|extra|UBLinux module includes NVIDIA 390xx driver and utilities -nvidia-470-5.17.6-2-x86_64.ubm|extra|UBLinux module includes NVIDIA 470xx driver and utilities -nvidia-510-5.17.6-2-x86_64.ubm|extra|UBLinux module includes NVIDIA 510xx driver and utilities -nvidia-515-5.17.6-2-x86_64.ubm|extra|UBLinux module includes NVIDIA 515xx driver and utilities -linux61-nvidia-390xx-390.157-90-x86_64.ubm|extra|UBLinux module includes NVIDIA 390xx driver and utilities -linux61-nvidia-470xx-470.239.06-10-x86_64.ubm|extra|UBLinux module includes NVIDIA 470xx driver and utilities -linux61-nvidia-550.78-3-x86_64.ubm|extra|UBLinux module includes NVIDIA 550xx driver and utilities -linux66-dkms-6.6.30-1-x86_64.ubm|extra|UBLinux module includes dkms additionals modules -nvidia-optimus-2204-1-x86_64.ubm|extra|UBLinux module includes NVIDIA Optimus -lsi-megaraid-2204-1-x86_64.ubm|extra|UBLinux module includes LSI MegaRaid SM, StorCLI, MegaCLI and utils -onlyoffice-7.3.3-1-x86_64.ubm|extra|UBLinux module includes OnlyOffice suite -onlyoffice-documentserver-7.3.3-1-x86_64.ubm|extra|UBLinux module includes OnlyOffice DocumentServer suite -opera-2204-1-x86_64.ubm|extra|UBLinux module includes Opera and some plugins -patch-2204-21-x86_64.ubm|extra|UBLinux module include apps patch -podman-2204-1-x86_64.ubm|extra|UBLinux module includes podman and webmanager and utils -qemu-2204-2-x86_64.ubm|extra|UBLinux module includes QEMU, manager and utils -qemu-headless-2204-1-x86_64.ubm|extra|UBLinux module includes QEMU headless and utils -qt4-2204-1-x86_64.ubm|extra|UBLinux module include QT4 -realvnc-2204-2-x86_64.ubm|extra|UBLinux module includes realvnc viewer and server -rustdesk-1.2.3-1-x86_64.ubm|extra|UBLinux module includes rustdesk -rustdesk-server-1.1.9-1-x86_64.ubm|extra|UBLinux module include rustdesk-server -skype-2204-1-x86_64.ubm|extra|UBLinux module include Skype -telegram-2204-2-x86_64.ubm|extra|UBLinux module includes Telegram -tor-2204-1-x86_64.ubm|extra|UBLinux module include Tor utils and browser -ubpile-2.15.10-1-x86_64.ubm|extra|Simple management of corporate network nodes using the WEB interface with the executor Node.js -virtual-guest-2204-2-x86_64.ubm|extra|UBLinux module includes agents for Linux guest -virtual-guest-nox-2204-2-x86_64.ubm|extra|UBLinux module includes agents for Linux guest without X support -virtualbox-host-2204-1-x86_64.ubm|extra|UBLinux module includes VirtualBox and extension packs -virtualbox-host-headless-2204-1-x86_64.ubm|extra|UBLinux module includes VirtualBox headless and extension packs -virtualbox-web-2204-1-x86_64.ubm|extra|UBLinux module includes phpvirtualbox for VirtualBox -vivaldi-2204-1-x86_64.ubm|extra|UBLinux module include Vivaldi browser -web-2204-1-x86_64.ubm|extra|UBLinux module includes HTTP server and utilities -webmin-1.994-1-x86_64.ubm|extra|UBLinux module includes Webmin and Usermin -wiki-js-2.5.294-1-x86_64.ubm|extra|UBLinux module include Wiki.js -winbox-2204-1-x86_64.ubm|extra|UBLinux module include Winbox -wine-2204-2-x86_64.ubm|extra|UBLinux module includes wine and utilities -wps-office-11.1.0.11698-1-x86_64.ubm|extra|UBLinux module include Kingsoft Office (WPS Office) - an office productivity suite -xremote-2204-1-x86_64.ubm|extra|UBLinux module include X11 remote utils -yay-2204-1-x86_64.ubm|extra|Yet another yogurt. Pacman wrapper and AUR helper written in go. -zoom-5.14.0-1-x86_64.ubm|extra|UBLinux module include Zoom \ No newline at end of file diff --git a/source/CMakeLists.txt b/source/CMakeLists.txt index 7f7a397..5117240 100644 --- a/source/CMakeLists.txt +++ b/source/CMakeLists.txt @@ -70,7 +70,6 @@ set(DEPENDFILES ../ubinstall-gtk-package-info.glade ../gresource.xml ../ubinstall-gtk.css - ../modules.csv ../kernel-list.csv ../kernel-list-addon.csv ../services-list.csv diff --git a/source/ubinstall-gtk-components.c b/source/ubinstall-gtk-components.c index ddcde4b..55139de 100644 --- a/source/ubinstall-gtk-components.c +++ b/source/ubinstall-gtk-components.c @@ -270,7 +270,6 @@ gboolean yon_software_insert(struct row_data *row_input){ } void yon_software_init(main_window *widgets){ - GList *list = gtk_container_get_children(GTK_CONTAINER(widgets->AdditionalComponentsList)); GList *iter; for (iter=list;iter;iter=iter->next){ @@ -278,22 +277,35 @@ void yon_software_init(main_window *widgets){ free(row); gtk_widget_destroy(GTK_WIDGET(iter->data)); } - int base_size; - config_str base = yon_config_load(get_available_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_software_insert,row); + // } + GList *languages = yon_packages_search_all("ubm-.*"); + for (iter=languages;iter;iter=iter->next){ + char *name = (char*)iter->data; + yon_packages_info *info_struct = yon_packages_get_info_struct(YON_PACKAGES_ALL,name); struct row_data *row = malloc(sizeof(struct row_data)); - row->version = parsed[1]; - row->name = parsed[0]; - row->tags = yon_char_replace(parsed[2]," ",", "); - row->description = parsed[3]; + row->version = info_struct->version; + row->name = info_struct->package_name; + row->tags = info_struct->groups; + row->description = info_struct->description; row->widgets=widgets; g_idle_add((GSourceFunc)yon_software_insert,row); + yon_packages_info_struct_free(info_struct); } g_idle_add((GSourceFunc)yon_spinner_switch_off,widgets->OSSpinner); - yon_char_parsed_free(base,base_size); + // yon_char_parsed_free(base,base_size); return ; } diff --git a/source/ubinstall-gtk-installation.c b/source/ubinstall-gtk-installation.c index 645db17..10d519b 100644 --- a/source/ubinstall-gtk-installation.c +++ b/source/ubinstall-gtk-installation.c @@ -68,9 +68,31 @@ int yon_install_separate_save(main_window *widgets){ yon_ubl_status_highlight_incorrect(gtk_widget_get_parent(widgets->CommonInstallationDevicesTree)); return 0; } + + char *part; + glong size,free_space; + gtk_tree_model_get(model,&iter,0,&part,5,&size,6,&free_space,-1); + yon_config_register(AUTOINSTALL_TYPE_INSTALL,AUTOINSTALL_TYPE_INSTALL_command,"next"); + yon_config_register(AUTOINSTALL_DEVICE,AUTOINSTALL_DEVICE_command,device); + yon_config_register(part_parameter,part_parameter_command,part); if (gtk_switch_get_active(GTK_SWITCH(widgets->NextInstallationFormatSwitch))){ yon_config_register(part_format_parameter,part_format_parameter_command,"yes"); double part_size = gtk_spin_button_get_value(GTK_SPIN_BUTTON(widgets->NextInstallationSizeSpin)); + int mod = yon_get_size_get_from_letter(gtk_combo_box_get_active_id(GTK_COMBO_BOX(widgets->NextInstallationSizeTypeSpin))[0]); + // if (yon_size_to_bytes(part_size,mod+1)>free_space){ + // yon_ubl_status_box_spawn(GTK_CONTAINER(widgets->StatusBox),NOT_ENOUGH_SPACE_LABEL,5,BACKGROUND_IMAGE_FAIL_TYPE); + // yon_ubl_status_highlight_incorrect(gtk_widget_get_parent(widgets->NextInstallationSizeSpin)); + // return 0; + // } + if (yon_size_to_bytes(part_size,mod+1)>size){ + yon_ubl_status_box_spawn(GTK_CONTAINER(widgets->StatusBox),NOT_ENOUGH_SPACE_LABEL,5,BACKGROUND_IMAGE_FAIL_TYPE); + yon_ubl_status_highlight_incorrect(gtk_widget_get_parent(widgets->NextInstallationSizeSpin)); + return 0; + } else if (yon_size_to_bytes(part_size,mod+1)>free_space){ + yon_ubl_status_box_spawn(GTK_CONTAINER(widgets->StatusBox),NOT_ENOUGH_FREE_SPACE_LABEL,5,BACKGROUND_IMAGE_FAIL_TYPE); + yon_ubl_status_highlight_incorrect(gtk_widget_get_parent(widgets->NextInstallationSizeSpin)); + return 0; + } if (part_size){ char *size_letter = (char*)gtk_combo_box_get_active_id(GTK_COMBO_BOX(widgets->NextInstallationSizeTypeSpin)); char *size_final = yon_char_append(yon_char_from_long((long)part_size),size_letter); @@ -103,12 +125,7 @@ int yon_install_separate_save(main_window *widgets){ yon_config_remove_by_key(part_fs_type_parameter); yon_config_remove_by_key(part_format_parameter); } - - char *part; - gtk_tree_model_get(model,&iter,0,&part,-1); - yon_config_register(AUTOINSTALL_TYPE_INSTALL,AUTOINSTALL_TYPE_INSTALL_command,"next"); - yon_config_register(AUTOINSTALL_DEVICE,AUTOINSTALL_DEVICE_command,device); - yon_config_register(part_parameter,part_parameter_command,part); + if (!main_config.configure_mode){ int size; config_str parameters = yon_config_get_save_parameters_by_key(&size,part_format_parameter,part_label_parameter,part_fs_type_parameter,AUTOINSTALL_DEVICE,part_parameter,NULL); @@ -237,75 +254,143 @@ int yon_advanced_sections_save(dictionary *dict){ return 1; } -void on_partition_size_changed(GtkWidget *self, main_window *widgets){ - GtkAdjustment *adj = NULL; +void yon_size_changed(GtkSpinButton *self, main_window *widgets){ + int cur_page = gtk_notebook_get_current_page(GTK_NOTEBOOK(widgets->Notebook)); GtkWidget *tree = NULL; - if (self == widgets->OSFormatSizeCombo){ - adj = gtk_spin_button_get_adjustment(GTK_SPIN_BUTTON(widgets->OSFormatSizeSpin)); - tree = widgets->OSDevicesTree; - } else if (self == widgets->UserdataFormatSizeCombo){ - adj = gtk_spin_button_get_adjustment(GTK_SPIN_BUTTON(widgets->UserdataFormatSizeSpin)); - tree = widgets->UserdataDevicesTree; - } else if (self == widgets->NextInstallationSizeTypeSpin){ - adj = gtk_spin_button_get_adjustment(GTK_SPIN_BUTTON(widgets->NextInstallationSizeSpin)); - tree = widgets->NextInstallationSysSectionTree; + switch(cur_page){ + case YON_PAGE_INSTALL_SEPARATE: + tree = widgets->NextInstallationSysSectionTree; + break; + case YON_PAGE_RECOVERY_OS_ONLY: + tree = widgets->OSSysSectionTree; + break; + case YON_PAGE_RECOVERY_USRDATA_ONLY: + tree = widgets->UserdataSysSectionTree; + break; } - GtkTreeModel *model; - GtkTreeIter iter; - if (!gtk_tree_selection_get_selected(gtk_tree_view_get_selection(GTK_TREE_VIEW(tree)),&model,&iter)) return; - long selected_size =0; + if (!tree) return; - gtk_tree_model_get(model,&iter,6,&selected_size,-1); - if (!selected_size){ - gtk_tree_model_get(model,&iter,5,&selected_size,-1); - } - const char *sizemod = gtk_combo_box_get_active_id(GTK_COMBO_BOX(self)); - double new_size = yon_size_long_convert_to_mod(selected_size,sizemod[0]); - gtk_adjustment_set_upper(adj,new_size); - -} - -void yon_set_max_size_from_partition(GtkTreeView *table, GtkSpinButton *spin_button, GtkComboBox *spin_combo){ GtkTreeModel *model; GtkTreeIter iter; - long selected_size; - if (gtk_tree_selection_get_selected(gtk_tree_view_get_selection(table),&model,&iter)){ - gtk_tree_model_get(model,&iter,6,&selected_size,-1); - if (!selected_size){ - gtk_tree_model_get(model,&iter,5,&selected_size,-1); - } - if (selected_size){ - GtkAdjustment *adj = gtk_spin_button_get_adjustment(spin_button); - const char *sizemod = gtk_combo_box_get_active_id(spin_combo); - double new_size = yon_size_long_convert_to_mod(selected_size,sizemod[0]); - gtk_adjustment_set_upper(adj,new_size); - char *command = yon_config_parameter_prepare_command(part_size_parameter_command,"default",NULL,NULL); - int size=0; - config_str parsed = yon_config_load(command,&size); - if (size&&strcmp(parsed[0],"(null)\n")){ - yon_char_remove_last_symbol(parsed[0],'\n'); - free(yon_char_divide_search(parsed[0],"=",-1)); - yon_char_remove_brackets(parsed[0]); - char *parameter = parsed[0]; - if (!yon_char_is_empty(parameter)){ - gtk_spin_button_set_value(GTK_SPIN_BUTTON(spin_button),atol(parameter)); - gtk_combo_box_set_active(GTK_COMBO_BOX(spin_combo),yon_get_size_get_from_letter(parameter[strlen(parameter)-1])-1); - } else { - gtk_spin_button_set_value(GTK_SPIN_BUTTON(spin_button),3); - gtk_combo_box_set_active(GTK_COMBO_BOX(spin_combo),2); - } - } - + if (gtk_tree_selection_get_selected(gtk_tree_view_get_selection(GTK_TREE_VIEW(tree)),&model, &iter)){ + long size; + long free_space; + gtk_tree_model_get(model,&iter,5,&size,6,&free_space,-1); + double chosen_size = gtk_spin_button_get_value(self); + int mod = yon_get_size_get_from_letter(gtk_combo_box_get_active_id(GTK_COMBO_BOX(widgets->NextInstallationSizeTypeSpin))[0]); + chosen_size = yon_size_to_bytes(chosen_size,mod+1); + if (chosen_size>free_space&&size>chosen_size){ + yon_ubl_status_box_spawn(GTK_CONTAINER(widgets->StatusBox),NOT_ENOUGH_FREE_SPACE_LABEL,5,BACKGROUND_IMAGE_INFO_TYPE); + // yon_ubl_status_highlight_incorrect(gtk_widget_get_parent(widgets->CommonInstallationDevicesTree)); + return; + } else if (chosen_size>free_space&&chosen_size>size){ + yon_ubl_status_box_spawn(GTK_CONTAINER(widgets->StatusBox),NOT_ENOUGH_SPACE_LABEL,5,BACKGROUND_IMAGE_FAIL_TYPE); + // yon_ubl_status_highlight_incorrect(gtk_widget_get_parent(widgets->CommonInstallationDevicesTree)); + return; } } } -void on_partition_changed(GtkWidget *self, main_window *widgets){ - if (self==widgets->NextInstallationSysSectionTree||self == widgets->NextInstallationSizeTypeSpin){ - yon_set_max_size_from_partition(GTK_TREE_VIEW(widgets->NextInstallationSysSectionTree),GTK_SPIN_BUTTON(widgets->NextInstallationSizeSpin),GTK_COMBO_BOX(widgets->NextInstallationSizeTypeSpin)); - } - -} +// void on_partition_size_changed(GtkWidget *self, main_window *widgets){ +// GtkAdjustment *adj = NULL; +// GtkWidget *tree = NULL; +// if (self == widgets->OSFormatSizeCombo){ +// adj = gtk_spin_button_get_adjustment(GTK_SPIN_BUTTON(widgets->OSFormatSizeSpin)); +// tree = widgets->OSDevicesTree; +// } else if (self == widgets->UserdataFormatSizeCombo){ +// adj = gtk_spin_button_get_adjustment(GTK_SPIN_BUTTON(widgets->UserdataFormatSizeSpin)); +// tree = widgets->UserdataDevicesTree; +// } else if (self == widgets->NextInstallationSizeTypeSpin){ +// adj = gtk_spin_button_get_adjustment(GTK_SPIN_BUTTON(widgets->NextInstallationSizeSpin)); +// tree = widgets->NextInstallationSysSectionTree; +// } +// GtkTreeModel *model; +// GtkTreeIter iter; +// if (!gtk_tree_selection_get_selected(gtk_tree_view_get_selection(GTK_TREE_VIEW(tree)),&model,&iter)) return; +// long selected_size = 0; + +// gtk_tree_model_get(model,&iter,6,&selected_size,-1); +// if (!selected_size){ +// gtk_tree_model_get(model,&iter,5,&selected_size,-1); +// } +// const char *sizemod = gtk_combo_box_get_active_id(GTK_COMBO_BOX(self)); +// double old_size = gtk_adjustment_get_value(adj); +// double new_size = yon_size_long_convert_to_mod(selected_size,sizemod[0]); +// gtk_adjustment_set_upper(adj,new_size); +// if (new_sizeNextInstallationSysSectionTree||self == widgets->NextInstallationSizeTypeSpin){ +// yon_partition_default_size_set(self,widgets); +// } + +// } void *yon_partitions_list_load(main_window *){ main_config.partitions = yon_config_load(yon_debug_output("%s\n",get_parts_for_device_command),&main_config.part_size); @@ -333,12 +418,13 @@ void on_device_selection_changed(GtkWidget *self, main_window *widgets){ char *capacity = NULL; long capacity_long = 0; char *free_space = NULL; - long free_space_long = 0; + // long free_space_long = 0; char *fs_type = NULL; char *label = NULL; char *fs_label = NULL; char *mount_point = NULL; char *flags = NULL; + long used_cap=0; if (parsed_size>2){ char sizemod='\0'; @@ -364,7 +450,7 @@ void on_device_selection_changed(GtkWidget *self, main_window *widgets){ label = parsed[5]; } if (parsed_size>8&&!yon_char_is_empty(parsed[8])){ - long used_cap = capacity_long-atol(parsed[8]); + used_cap = capacity_long-atol(parsed[8]); long capacity_persent = ((double)used_cap/(double)capacity_long)*100; char sizemod='\0'; char *temp = yon_char_from_double(yon_size_long_convert_automatic(used_cap,&sizemod)); @@ -383,13 +469,13 @@ void on_device_selection_changed(GtkWidget *self, main_window *widgets){ } 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,9,mount_point,10,fs_label,11,flags,-1); + gtk_list_store_set(widgets->PartitionsList,&iter,0,name,1,capacity,2,free_space,3,fs_type,4,label,5,capacity_long,6,used_cap,9,disk_path,9,mount_point,10,fs_label,11,flags,-1); } yon_char_parsed_free(parsed,parsed_size); } } // gtk_spin_button_set_value(GTK_SPIN_BUTTON(widgets->NextInstallationSizeSpin),0.0); - gtk_adjustment_set_upper(gtk_spin_button_get_adjustment(GTK_SPIN_BUTTON(widgets->NextInstallationSizeSpin)),0.0); + // gtk_adjustment_set_upper(gtk_spin_button_get_adjustment(GTK_SPIN_BUTTON(widgets->NextInstallationSizeSpin)),0.0); } } diff --git a/source/ubinstall-gtk.c b/source/ubinstall-gtk.c index 4ab91f0..2ef53ed 100644 --- a/source/ubinstall-gtk.c +++ b/source/ubinstall-gtk.c @@ -806,11 +806,15 @@ void yon_main_window_create(main_window *widgets){ g_signal_connect(G_OBJECT(widgets->UserdataDevicesTree),"cursor-changed",G_CALLBACK(on_device_selection_changed),widgets); - g_signal_connect(G_OBJECT(widgets->SamePlacePartTree),"cursor-changed",G_CALLBACK(on_partition_changed),widgets); - g_signal_connect(G_OBJECT(widgets->NextInstallationSysSectionTree),"cursor-changed",G_CALLBACK(on_partition_changed),widgets); - g_signal_connect(G_OBJECT(widgets->NextInstallationSizeTypeSpin),"changed",G_CALLBACK(on_partition_size_changed),widgets); - g_signal_connect(G_OBJECT(widgets->OSFormatSizeCombo),"changed",G_CALLBACK(on_partition_size_changed),widgets); - g_signal_connect(G_OBJECT(widgets->UserdataFormatSizeCombo),"changed",G_CALLBACK(on_partition_size_changed),widgets); + // g_signal_connect(G_OBJECT(gtk_spin_button_get_adjustment(GTK_SPIN_BUTTON(widgets->NextInstallationSizeSpin))),"value-changed",G_CALLBACK(yon_size_changed),widgets); + g_signal_connect(G_OBJECT(widgets->NextInstallationSizeSpin),"value-changed",G_CALLBACK(yon_size_changed),widgets); + g_signal_connect(G_OBJECT(widgets->UserdataFormatSizeSpin),"value-changed",G_CALLBACK(yon_size_changed),widgets); + g_signal_connect(G_OBJECT(widgets->OSFormatSizeSpin),"value-changed",G_CALLBACK(yon_size_changed),widgets); + // g_signal_connect(G_OBJECT(widgets->SamePlacePartTree),"cursor-changed",G_CALLBACK(on_partition_changed),widgets); + // g_signal_connect(G_OBJECT(widgets->NextInstallationSysSectionTree),"cursor-changed",G_CALLBACK(on_partition_changed),widgets); + // g_signal_connect(G_OBJECT(widgets->NextInstallationSizeTypeSpin),"changed",G_CALLBACK(on_partition_size_changed),widgets); + // g_signal_connect(G_OBJECT(widgets->OSFormatSizeCombo),"changed",G_CALLBACK(on_partition_size_changed),widgets); + // g_signal_connect(G_OBJECT(widgets->UserdataFormatSizeCombo),"changed",G_CALLBACK(on_partition_size_changed),widgets); g_signal_connect(G_OBJECT(widgets->UserRootPasswordCombo),"changed",G_CALLBACK(yon_gtk_widget_set_sensitive_from_combo_box),widgets->UserRootPasswordEntry); g_signal_connect(G_OBJECT(widgets->UserRootPasswordCombo),"changed",G_CALLBACK(yon_gtk_widget_set_sensitive_from_combo_box),widgets->UserRootPasswordButton); @@ -1008,6 +1012,17 @@ void yon_main_window_create(main_window *widgets){ exit (1); } } + { + char *command = yon_config_parameter_prepare_command(part_size_parameter_command,"default",NULL,NULL); + int size; + config_str default_part_size = yon_config_load(command,&size); + if (size&&strcmp(default_part_size[0],"(null)\n")){ + free(yon_char_divide_search(default_part_size[0],"=",-1)); + yon_char_remove_last_symbol(default_part_size[0],'\n'); + yon_char_remove_brackets(default_part_size[0]); + main_config.part_size_default = default_part_size[0]; + } + } } gboolean yon_maximize_start(main_window *widgets){ diff --git a/source/ubinstall-gtk.h b/source/ubinstall-gtk.h index 72f43f8..63e8fdc 100755 --- a/source/ubinstall-gtk.h +++ b/source/ubinstall-gtk.h @@ -466,6 +466,8 @@ typedef struct config_str partitions; int part_size; + + char *part_size_default; } config; extern config main_config; @@ -1509,4 +1511,5 @@ gboolean on_time_zone_status_hover_end(GtkWidget *, GdkEvent *, main_window *wid void yon_map_update(main_window *widgets, const char *timezone); void on_partition_size_changed(GtkWidget *self, main_window *widgets); void *yon_partitions_list_load(main_window *widgets); -void *yon_modules_list_load(main_window *widgets); \ No newline at end of file +void *yon_modules_list_load(main_window *widgets); +void yon_size_changed(GtkSpinButton *self, main_window *widgets); \ No newline at end of file diff --git a/source/ubl-strings.h b/source/ubl-strings.h index 64c2b99..e6c40ed 100644 --- a/source/ubl-strings.h +++ b/source/ubl-strings.h @@ -291,6 +291,8 @@ NULL) #define FINISH_ACTION_LABEL _("After successful installation:") #define MAP_TITLE_LABEL(utc) yon_char_unite(_("UTC"),utc,NULL) #define MAP_INFO_LABEL(tz_location) yon_char_unite(_("Geasfa"),tz_location,NULL) +#define NOT_ENOUGH_FREE_SPACE_LABEL _("The size of the new partition exceeds the free space of the selected partition") //Размер нового раздела превышает свободное место выбранного раздела +#define NOT_ENOUGH_SPACE_LABEL _("The size of the new disk partition is larger than the size of the selected partition") //Размер нового раздела диска превышает размер выбранного раздела // #define _LABEL _("Select your language:") // #define _LABEL _("Selecting additional system kernel components") diff --git a/ubinstall-gtk.glade b/ubinstall-gtk.glade index 391d423..c564068 100644 --- a/ubinstall-gtk.glade +++ b/ubinstall-gtk.glade @@ -238,7 +238,7 @@ - 999999 + 999999999999 10 1 10 -- 2.35.1 From f726f6a68ec62d2048d37e1abed5c9978705af7a Mon Sep 17 00:00:00 2001 From: Ivan Dmitrievich Yartsev Date: Mon, 16 Feb 2026 16:53:15 +0600 Subject: [PATCH 06/17] Removed comments --- source/ubinstall-gtk-installation.c | 119 ---------------------------- 1 file changed, 119 deletions(-) diff --git a/source/ubinstall-gtk-installation.c b/source/ubinstall-gtk-installation.c index 10d519b..f0a07cd 100644 --- a/source/ubinstall-gtk-installation.c +++ b/source/ubinstall-gtk-installation.c @@ -79,11 +79,6 @@ int yon_install_separate_save(main_window *widgets){ yon_config_register(part_format_parameter,part_format_parameter_command,"yes"); double part_size = gtk_spin_button_get_value(GTK_SPIN_BUTTON(widgets->NextInstallationSizeSpin)); int mod = yon_get_size_get_from_letter(gtk_combo_box_get_active_id(GTK_COMBO_BOX(widgets->NextInstallationSizeTypeSpin))[0]); - // if (yon_size_to_bytes(part_size,mod+1)>free_space){ - // yon_ubl_status_box_spawn(GTK_CONTAINER(widgets->StatusBox),NOT_ENOUGH_SPACE_LABEL,5,BACKGROUND_IMAGE_FAIL_TYPE); - // yon_ubl_status_highlight_incorrect(gtk_widget_get_parent(widgets->NextInstallationSizeSpin)); - // return 0; - // } if (yon_size_to_bytes(part_size,mod+1)>size){ yon_ubl_status_box_spawn(GTK_CONTAINER(widgets->StatusBox),NOT_ENOUGH_SPACE_LABEL,5,BACKGROUND_IMAGE_FAIL_TYPE); yon_ubl_status_highlight_incorrect(gtk_widget_get_parent(widgets->NextInstallationSizeSpin)); @@ -281,117 +276,14 @@ void yon_size_changed(GtkSpinButton *self, main_window *widgets){ chosen_size = yon_size_to_bytes(chosen_size,mod+1); if (chosen_size>free_space&&size>chosen_size){ yon_ubl_status_box_spawn(GTK_CONTAINER(widgets->StatusBox),NOT_ENOUGH_FREE_SPACE_LABEL,5,BACKGROUND_IMAGE_INFO_TYPE); - // yon_ubl_status_highlight_incorrect(gtk_widget_get_parent(widgets->CommonInstallationDevicesTree)); return; } else if (chosen_size>free_space&&chosen_size>size){ yon_ubl_status_box_spawn(GTK_CONTAINER(widgets->StatusBox),NOT_ENOUGH_SPACE_LABEL,5,BACKGROUND_IMAGE_FAIL_TYPE); - // yon_ubl_status_highlight_incorrect(gtk_widget_get_parent(widgets->CommonInstallationDevicesTree)); return; } } } -// void on_partition_size_changed(GtkWidget *self, main_window *widgets){ -// GtkAdjustment *adj = NULL; -// GtkWidget *tree = NULL; -// if (self == widgets->OSFormatSizeCombo){ -// adj = gtk_spin_button_get_adjustment(GTK_SPIN_BUTTON(widgets->OSFormatSizeSpin)); -// tree = widgets->OSDevicesTree; -// } else if (self == widgets->UserdataFormatSizeCombo){ -// adj = gtk_spin_button_get_adjustment(GTK_SPIN_BUTTON(widgets->UserdataFormatSizeSpin)); -// tree = widgets->UserdataDevicesTree; -// } else if (self == widgets->NextInstallationSizeTypeSpin){ -// adj = gtk_spin_button_get_adjustment(GTK_SPIN_BUTTON(widgets->NextInstallationSizeSpin)); -// tree = widgets->NextInstallationSysSectionTree; -// } -// GtkTreeModel *model; -// GtkTreeIter iter; -// if (!gtk_tree_selection_get_selected(gtk_tree_view_get_selection(GTK_TREE_VIEW(tree)),&model,&iter)) return; -// long selected_size = 0; - -// gtk_tree_model_get(model,&iter,6,&selected_size,-1); -// if (!selected_size){ -// gtk_tree_model_get(model,&iter,5,&selected_size,-1); -// } -// const char *sizemod = gtk_combo_box_get_active_id(GTK_COMBO_BOX(self)); -// double old_size = gtk_adjustment_get_value(adj); -// double new_size = yon_size_long_convert_to_mod(selected_size,sizemod[0]); -// gtk_adjustment_set_upper(adj,new_size); -// if (new_sizeNextInstallationSysSectionTree||self == widgets->NextInstallationSizeTypeSpin){ -// yon_partition_default_size_set(self,widgets); -// } - -// } - void *yon_partitions_list_load(main_window *){ main_config.partitions = yon_config_load(yon_debug_output("%s\n",get_parts_for_device_command),&main_config.part_size); g_thread_exit(NULL); @@ -435,14 +327,6 @@ void on_device_selection_changed(GtkWidget *self, main_window *widgets){ capacity = yon_char_unite(temp," ", size_str,NULL); free(temp); } - // 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]; } @@ -474,8 +358,6 @@ void on_device_selection_changed(GtkWidget *self, main_window *widgets){ yon_char_parsed_free(parsed,parsed_size); } } - // gtk_spin_button_set_value(GTK_SPIN_BUTTON(widgets->NextInstallationSizeSpin),0.0); - // gtk_adjustment_set_upper(gtk_spin_button_get_adjustment(GTK_SPIN_BUTTON(widgets->NextInstallationSizeSpin)),0.0); } } @@ -501,7 +383,6 @@ void yon_devices_setup(main_window *widgets){ 3,yon_char_return_if_exist(size_string,""), 4,yon_char_return_if_exist(parsed[3],""), 6,1,-1); - // gtk_list_store_set(widgets->DevicesList,&iter,,1,json_object_get_string(model),2,json_object_get_string(serial),3,size_final_string,4,json_object_get_string(vendor),6,1,-1); yon_char_parsed_free(parsed,parsed_size); -- 2.35.1 From f31b84381b6f50161f4b40adef5b8f42e4dc54c9 Mon Sep 17 00:00:00 2001 From: Ivan Dmitrievich Yartsev Date: Mon, 16 Feb 2026 18:38:00 +0600 Subject: [PATCH 07/17] Fixes --- source/ubinstall-gtk-components.c | 70 ++++++++++++++++--------------- source/ubinstall-gtk-config-hub.c | 2 +- source/ubinstall-gtk-kernel.c | 4 +- source/ubinstall-gtk-packages.c | 8 ++-- source/ubinstall-gtk-saving.c | 4 +- source/ubinstall-gtk.c | 32 -------------- source/ubinstall-gtk.h | 3 -- 7 files changed, 46 insertions(+), 77 deletions(-) diff --git a/source/ubinstall-gtk-components.c b/source/ubinstall-gtk-components.c index 55139de..71db915 100644 --- a/source/ubinstall-gtk-components.c +++ b/source/ubinstall-gtk-components.c @@ -3,8 +3,8 @@ int yon_kernel_save(main_window *widgets){ GList *list = gtk_container_get_children(GTK_CONTAINER(widgets->KernelListBox)); - char *config_val = config(modules_extra_parameter); - if (yon_char_is_empty(config_val)) yon_config_register(modules_extra_parameter,modules_extra_parameter_command,""); + char *config_val = config(packages_parameter); + if (yon_char_is_empty(config_val)) yon_config_register(packages_parameter,packages_parameter_command,""); char *enabled_module = NULL; int overall_size = 0; int active_size = 0; @@ -12,7 +12,7 @@ int yon_kernel_save(main_window *widgets){ overall_size++; kernel_row *row = g_object_get_data(G_OBJECT(iter->data),"kernel_row"); if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(row->InstallCheck))){ - yon_config_append_element(modules_extra_parameter,row->package,","); + yon_config_append_element(packages_parameter,row->package,","); active_size++; if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(row->EnableRadio))){ enabled_module = row->package; @@ -30,7 +30,7 @@ int yon_kernel_save(main_window *widgets){ } int yon_kernel_addon_save(main_window *widgets){ - char *parameter = config(modules_extra_parameter); + char *parameter = config(packages_parameter); GList *list = gtk_container_get_children(GTK_CONTAINER(widgets->KernelAddonListBox)); char *install_modules = yon_char_new(parameter); for(GList *iter = list;iter;iter = iter->next){ @@ -43,7 +43,7 @@ int yon_kernel_addon_save(main_window *widgets){ } if (!yon_char_is_empty(install_modules)){ - yon_config_register(modules_extra_parameter,modules_extra_parameter_command,install_modules); + yon_config_register(packages_parameter,packages_parameter_command,install_modules); free(install_modules); } return 1; @@ -234,9 +234,9 @@ void yon_os_components_init(main_window *widgets){ int yon_software_save(main_window *widgets){ GList *list = gtk_container_get_children(GTK_CONTAINER(widgets->AdditionalComponentsList)); GList *iter; - char *config_val = config(modules_extra_parameter); + char *config_val = config(packages_parameter); if (yon_char_is_empty(config_val)){ - yon_config_register(modules_extra_parameter,modules_extra_parameter_command,""); + yon_config_register(packages_parameter,packages_parameter_command,""); } for(iter = list;iter;iter=iter->next){ os_row *row = g_object_get_data(iter->data,"kernel_row"); @@ -244,7 +244,7 @@ int yon_software_save(main_window *widgets){ int status = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(row->InstallCheck)); if (status){ if (!yon_char_check_element(config_val,target,",")){ - yon_config_append_element(modules_extra_parameter,target,","); + yon_config_append_element(packages_parameter,target,","); } } } @@ -257,9 +257,9 @@ gboolean yon_software_insert(struct row_data *row_input){ main_window *widgets = row_input->widgets; gtk_list_box_insert(GTK_LIST_BOX(widgets->AdditionalComponentsList),row->row,-1); - yon_os_row_setup(row,row_input->name,row_input->version,row_input->tags,_(row_input->description),NULL,NULL); + yon_os_row_setup(row,row_input->name,row_input->version,row_input->tags,_(row_input->description),NULL,row_input->size); - char *modules = config(modules_extra_parameter); + char *modules = config(packages_parameter); if (yon_char_check_element(modules,row_input->name,",")){ gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(row->InstallCheck),1); } else { @@ -277,35 +277,39 @@ void yon_software_init(main_window *widgets){ free(row); gtk_widget_destroy(GTK_WIDGET(iter->data)); } - // int base_size; + int base_size; // config_str base = yon_config_load(get_available_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_software_insert,row); - // } - GList *languages = yon_packages_search_all("ubm-.*"); - for (iter=languages;iter;iter=iter->next){ - char *name = (char*)iter->data; - yon_packages_info *info_struct = yon_packages_get_info_struct(YON_PACKAGES_ALL,name); + config_str base = yon_packages_find(YON_PACKAGES_ALL,"ubm-",(gsize*)&base_size); + for (int i=0;iversion = info_struct->version; - row->name = info_struct->package_name; - row->tags = info_struct->groups; - row->description = info_struct->description; + row->version = yon_packages_get_version(YON_PACKAGES_ALL,base[i]); + row->name = yon_char_new(base[i]); + row->tags = yon_packages_get_groups(YON_PACKAGES_ALL,base[i]); + row->description = yon_packages_get_description(YON_PACKAGES_ALL,base[i]); + long size = yon_packages_get_size(YON_PACKAGES_ALL,base[i]); + char mod = '\0'; + double size_converted = yon_size_long_convert_automatic(size,&mod); + + char *size_str = yon_char_unite(yon_char_from_double(size_converted)," ", yon_size_get_name_from_letter(mod),NULL); + row->size = size_str; row->widgets=widgets; g_idle_add((GSourceFunc)yon_software_insert,row); - yon_packages_info_struct_free(info_struct); } + // GList *languages = yon_packages_search_all("ubm-.*"); + // for (iter=languages;iter;iter=iter->next){ + // char *name = (char*)iter->data; + // yon_packages_info *info_struct = yon_package(YON_PACKAGES_ALL,name); + // struct row_data *row = malloc(sizeof(struct row_data)); + // row->version = info_struct->version; + // row->name = info_struct->package_name; + // row->tags = info_struct->groups; + // row->description = info_struct->description; + // row->widgets=widgets; + // g_idle_add((GSourceFunc)yon_software_insert,row); + // yon_packages_info_struct_free(info_struct); + // } g_idle_add((GSourceFunc)yon_spinner_switch_off,widgets->OSSpinner); - // yon_char_parsed_free(base,base_size); + yon_char_parsed_free(base,base_size); return ; } diff --git a/source/ubinstall-gtk-config-hub.c b/source/ubinstall-gtk-config-hub.c index 3034269..b19d9c0 100644 --- a/source/ubinstall-gtk-config-hub.c +++ b/source/ubinstall-gtk-config-hub.c @@ -10,7 +10,7 @@ int yon_configuration_hub_save(main_window *widgets){ if (!main_config.configure_mode){ int size; config_str parameters = yon_config_get_save_parameters_by_key(&size,modules_parameter, - modules_extra_parameter, + packages_parameter, root_password_parameter, autologin_parameter, xkbmodel_parameter, diff --git a/source/ubinstall-gtk-kernel.c b/source/ubinstall-gtk-kernel.c index 8b7a3c2..1e06331 100644 --- a/source/ubinstall-gtk-kernel.c +++ b/source/ubinstall-gtk-kernel.c @@ -187,7 +187,7 @@ void yon_kernel_setup(main_window *widgets){ } g_list_free(list); - char *modules = config(modules_extra_parameter); + char *modules = config(packages_parameter); char *enabled = config(KERNEL_BOOT_parameter); int modules_size; @@ -388,7 +388,7 @@ void yon_kernel_addon_setup(main_window *widgets){ } g_list_free(list); - char *modules = config(modules_extra_parameter); + char *modules = config(packages_parameter); int modules_size; config_str modules_parsed = NULL; diff --git a/source/ubinstall-gtk-packages.c b/source/ubinstall-gtk-packages.c index 48d30c5..ef3d1b9 100644 --- a/source/ubinstall-gtk-packages.c +++ b/source/ubinstall-gtk-packages.c @@ -2,8 +2,8 @@ int yon_packages_tab_save(main_window *widgets){ GtkTreeIter parentiter, subiter,packiter; - if (yon_char_is_empty(config(modules_extra_parameter))){ - yon_config_register(modules_extra_parameter,modules_extra_parameter_command,NULL); + if (yon_char_is_empty(config(packages_parameter))){ + yon_config_register(packages_parameter,packages_parameter_command,NULL); } for_iter(widgets->PackagesList,&parentiter){ for (int valid2 = gtk_tree_model_iter_children(GTK_TREE_MODEL(widgets->PackagesList),&subiter,&parentiter);valid2;valid2 = gtk_tree_model_iter_next(GTK_TREE_MODEL(widgets->PackagesList),&subiter)){ @@ -11,11 +11,11 @@ int yon_packages_tab_save(main_window *widgets){ char *package; gtk_tree_model_get(GTK_TREE_MODEL(widgets->PackagesList),&subiter,0,&status,1,&package,3,&selectable,-1); if (selectable&&status){ - yon_config_append_element(modules_extra_parameter,package,","); + yon_config_append_element(packages_parameter,package,","); } else { for (int valid3 = gtk_tree_model_iter_children(GTK_TREE_MODEL(widgets->PackagesList),&packiter,&subiter);valid3;valid3 = gtk_tree_model_iter_next(GTK_TREE_MODEL(widgets->PackagesList),&packiter)){ gtk_tree_model_get(GTK_TREE_MODEL(widgets->PackagesList),&packiter,0,&status,1,&package,3,&selectable,-1); - yon_config_append_element(modules_extra_parameter,package,","); + yon_config_append_element(packages_parameter,package,","); } } } diff --git a/source/ubinstall-gtk-saving.c b/source/ubinstall-gtk-saving.c index 39d3a03..d581a6c 100644 --- a/source/ubinstall-gtk-saving.c +++ b/source/ubinstall-gtk-saving.c @@ -232,7 +232,7 @@ void *on_setup_system_configuration(void * data){ DOMAIN_parameter, DOMAIN_admanger_parameter, NTPSERVERS_parameter, - modules_extra_parameter, + packages_parameter, KERNEL_BOOT_parameter, packages_parameter, NULL); @@ -364,7 +364,7 @@ int yon_config_save(main_window *widgets){ DOMAIN_parameter, DOMAIN_admanger_parameter, NTPSERVERS_parameter, - modules_extra_parameter, + packages_parameter, KERNEL_BOOT_parameter, packages_parameter, NULL); diff --git a/source/ubinstall-gtk.c b/source/ubinstall-gtk.c index 2ef53ed..f3cd3bb 100644 --- a/source/ubinstall-gtk.c +++ b/source/ubinstall-gtk.c @@ -237,38 +237,6 @@ void on_toggle_button_switch_on(GtkWidget *, GtkToggleButton *toggle){ gtk_toggle_button_set_active(toggle,1); } -double yon_size_long_convert_to_mod(double size, char mod){ - int sizemod = yon_get_size_get_from_letter(mod); - double final_size = size; - for (int i=-1;i1024;repeats++){ - byte_float=byte_float/1024; - } - if (repeats==-1) { - repeats=0; - byte_float=byte_float/1024; - } - switch(repeats){ - case 0: (*size)='K'; - break; - case 1: (*size)='M'; - break; - case 2: (*size)='G'; - break; - case 3: (*size)='T'; - break; - } - return byte_float; -} - // // standard functions // /**config_init() // * [EN] diff --git a/source/ubinstall-gtk.h b/source/ubinstall-gtk.h index 63e8fdc..53c7274 100755 --- a/source/ubinstall-gtk.h +++ b/source/ubinstall-gtk.h @@ -171,9 +171,6 @@ layout && /description:/ {\ #define modules_parameter "AUTOINSTALL[modules]" #define modules_parameter_command "ubconfig --source global get [autoinstall] AUTOINSTALL[modules]" -#define modules_extra_parameter "AUTOINSTALL[modules_extra]" -#define modules_extra_parameter_command "ubconfig --source global get [autoinstall] AUTOINSTALL[modules_extra]" - /*------------------------------------------------------------*/ #define root_password_parameter "AUTOINSTALL[ubconfig set [users] DEFAULTROOTPASSWD]" #define root_password_parameter_command "ubconfig --source global --conarg get [autoinstall] AUTOINSTALL['ubconfig set [users] DEFAULTROOTPASSWD']" -- 2.35.1 From 3e6c713f884f892a21cb61de6ee9d9ba8a71ab58 Mon Sep 17 00:00:00 2001 From: Ivan Dmitrievich Yartsev Date: Tue, 17 Feb 2026 10:20:12 +0600 Subject: [PATCH 08/17] Replaced ubisntall2 to ubinstall --- source/ubinstall-gtk.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/source/ubinstall-gtk.h b/source/ubinstall-gtk.h index 53c7274..7fd036d 100755 --- a/source/ubinstall-gtk.h +++ b/source/ubinstall-gtk.h @@ -143,7 +143,7 @@ layout && /description:/ {\ }\ \" | sort -u\ " -#define ubinstall_dry_run_command "ubinstall2 --dry-run" +#define ubinstall_dry_run_command "ubinstall --dry-run" #define os_name_get_command "sed -En 's/^PRETTY_NAME=[\"]*([^\"]+)[\"]*/\\1/p' /etc/os-release" #define get_keyboard_layout_change_command "grep \"grp:\" /usr/share/X11/xkb/rules/base.lst | awk '{$1=$1; sub(/^!.*$/, \"\"); if ($1 ~ /^grp:/) {opt=$1; $1=\"\"; print opt \"|\" substr($0,2)}}'" @@ -265,9 +265,9 @@ layout && /description:/ {\ #define get_localisation_command "ubconfig -ea --source global get [autoinstall] AUTOINSTALL[installer_locale] -- get [autoinstall] AUTOINSTALL['ubconfig set [locale] LANG'] -- get [locale] LANG" -#define save_config_command(parameters) yon_char_unite("ubconfig --target system set [autoinstall] AUTOINSTALL[log]=yes ", parameters, "; nice ubinstall2 --debug autoinstall", NULL) +#define save_config_command(parameters) yon_char_unite("ubconfig --target system set [autoinstall] AUTOINSTALL[log]=yes ", parameters, "; nice ubinstall --debug autoinstall", NULL) -#define set_user_config_command(parameters) yon_char_unite("ubconfig --target system set [autoinstall] ", parameters, ";nice ubinstall2 autoconfig", NULL) +#define set_user_config_command(parameters) yon_char_unite("ubconfig --target system set [autoinstall] ", parameters, ";nice ubinstall autoconfig", NULL) #define save_additional_config_command(parameters) yon_char_unite("ubconfig --target system set [autoinstall] ", parameters, NULL) #define get_default_password_command "ubconfig --raw --conarg --source default get [users] NOSECUREROOTPASSWD" @@ -276,7 +276,7 @@ layout && /description:/ {\ #define PASSWORD_DEFAULT "ublinux" -#define start_fast_install_command "ubinstall2 --autoinstall" +#define start_fast_install_command "ubinstall --autoinstall" #define progress_path "/var/log/ubinstall_progress.log" -- 2.35.1 From b42bc3f439ecc00aee918aaba8be83d233b91794 Mon Sep 17 00:00:00 2001 From: Ivan Dmitrievich Yartsev Date: Tue, 17 Feb 2026 15:02:09 +0600 Subject: [PATCH 09/17] Fixed Source saving; Fixed packages saving --- source/ubinstall-gtk-components.c | 102 +++++++++- source/ubinstall-gtk-source.c | 2 +- source/ubinstall-gtk.c | 72 ------- ubinstall-gtk-os-row.glade | 322 ++++++++++++++++-------------- ubinstall-gtk.glade | 32 ++- 5 files changed, 304 insertions(+), 226 deletions(-) diff --git a/source/ubinstall-gtk-components.c b/source/ubinstall-gtk-components.c index 71db915..43f8528 100644 --- a/source/ubinstall-gtk-components.c +++ b/source/ubinstall-gtk-components.c @@ -4,7 +4,7 @@ int yon_kernel_save(main_window *widgets){ GList *list = gtk_container_get_children(GTK_CONTAINER(widgets->KernelListBox)); char *config_val = config(packages_parameter); - if (yon_char_is_empty(config_val)) yon_config_register(packages_parameter,packages_parameter_command,""); + if (yon_char_is_empty(config_val)) yon_config_register(packages_parameter,packages_parameter_command,NULL); char *enabled_module = NULL; int overall_size = 0; int active_size = 0; @@ -91,8 +91,7 @@ os_row *yon_os_row_new(){ row->modules=NULL; row->version=NULL; - row->row = gtk_list_box_row_new(); - gtk_container_add(GTK_CONTAINER(row->row),row->RowBox); + row->row = yon_gtk_builder_get_widget(builder,"MainRow"); gtk_widget_show(row->row); g_object_set_data(G_OBJECT(row->InstallCheck),"kernel_row",row); @@ -236,7 +235,7 @@ int yon_software_save(main_window *widgets){ GList *iter; char *config_val = config(packages_parameter); if (yon_char_is_empty(config_val)){ - yon_config_register(packages_parameter,packages_parameter_command,""); + yon_config_register(packages_parameter,packages_parameter_command,NULL); } for(iter = list;iter;iter=iter->next){ os_row *row = g_object_get_data(iter->data,"kernel_row"); @@ -285,6 +284,18 @@ void yon_software_init(main_window *widgets){ row->version = yon_packages_get_version(YON_PACKAGES_ALL,base[i]); row->name = yon_char_new(base[i]); row->tags = yon_packages_get_groups(YON_PACKAGES_ALL,base[i]); + int parsed_size; + config_str tags_parsed = yon_char_parse(row->tags,&parsed_size," "); + if (parsed_size){ + int ubmodule_pos = yon_char_parsed_check_exist(tags_parsed,parsed_size,"ubmodule"); + if (ubmodule_pos>-1){ + free(tags_parsed[ubmodule_pos]); + tags_parsed[ubmodule_pos] = NULL; + row->tags = yon_char_parsed_to_string(tags_parsed,parsed_size," "); + + } + yon_char_parsed_free(tags_parsed,parsed_size); + } row->description = yon_packages_get_description(YON_PACKAGES_ALL,base[i]); long size = yon_packages_get_size(YON_PACKAGES_ALL,base[i]); char mod = '\0'; @@ -342,9 +353,90 @@ void yon_pacman_init(main_window *widgets){ for (int i=0;iPacmanSoftwareChosenList,&iter); - gtk_list_store_set(widgets->PacmanSoftwareChosenList,&iter,0,1,1,parsed[i],2,version,3,_(description),-1); + gtk_list_store_set(widgets->PacmanSoftwareChosenList,&iter,0,1,1,parsed[i],2,version,3,_(description),4,size_str,-1); + free(size_str); } yon_char_parsed_free(parsed,size); +} + +void on_pacman_software_all_toggled(GtkWidget *, char *path, main_window *widgets){ + GtkTreeIter iter; + char *name, *type, *description, *size_str; + gtk_tree_model_get_iter_from_string(GTK_TREE_MODEL(widgets->PacmanSoftwareAllList),&iter,path); + gtk_tree_model_get(GTK_TREE_MODEL(widgets->PacmanSoftwareAllList),&iter,1,&name,2,&type,3,&description,4,&size_str,-1); + gtk_list_store_remove(widgets->PacmanSoftwareAllList,&iter); + gtk_list_store_append(widgets->PacmanSoftwareChosenList,&iter); + gtk_list_store_set(widgets->PacmanSoftwareChosenList,&iter,0,1,1,name,2,type,3,description,4,size_str,-1); + g_hash_table_add(widgets->pacmanchosen,yon_char_new(name)); + +} + +void on_pacman_software_chosen_toggled(GtkWidget *, char *path, main_window *widgets){ + GtkTreeIter iter; + char *name, *type, *description, *size_str; + gtk_tree_model_get_iter_from_string(GTK_TREE_MODEL(widgets->PacmanSoftwareChosenList),&iter,path); + gtk_tree_model_get(GTK_TREE_MODEL(widgets->PacmanSoftwareChosenList),&iter,1,&name,2,&type,3,&description,4,&size_str,-1); + gtk_list_store_remove(widgets->PacmanSoftwareChosenList,&iter); + gtk_list_store_append(widgets->PacmanSoftwareAllList,&iter); + gtk_list_store_set(widgets->PacmanSoftwareAllList,&iter,0,0,1,name,2,type,3,description,4,size_str,-1); + g_hash_table_remove(widgets->pacmanchosen,name); +} + +gboolean yon_pacman_fill(struct pacman_struct *pacman){ + main_window *widgets = pacman->widgets; + config_str loaded = pacman->packages; + int size = pacman->packages_size; + + + for (int i=0;ipacmanchosen,loaded[i])) continue; + char *version = yon_packages_get_version(YON_PACKAGES_SYNC,loaded[i]); + char *description = yon_packages_get_description(YON_PACKAGES_SYNC,loaded[i]); + GtkTreeIter iter; + long pkgsize = yon_packages_get_installed_size(YON_PACKAGES_SYNC,loaded[i]); + char mod = '\n'; + double size_converted = yon_size_long_convert_automatic(pkgsize,&mod); + char *size_str = yon_char_unite(yon_char_from_double(size_converted)," ", yon_size_get_name_from_letter(mod),NULL); + gtk_list_store_append(widgets->PacmanSoftwareAllList,&iter); + gtk_list_store_set(widgets->PacmanSoftwareAllList,&iter,0,0,1,loaded[i],2,version,3,description,4,size_str,-1); + if (!yon_char_is_empty(version))free(version); + if (!yon_char_is_empty(description)) free(description); + } + yon_char_parsed_free(loaded,size); + gtk_widget_set_sensitive(widgets->PacmanSoftwareSearchEntry,1); + gtk_widget_set_sensitive(widgets->PacmanSoftwareChosenPackagesTree,1); + gtk_widget_set_sensitive(widgets->PacmanSoftwareStatusButton,1); + g_object_ref(G_OBJECT(widgets->MainSpinner)); + gtk_container_remove(GTK_CONTAINER(widgets->PacmanLoadingOverlay),widgets->MainSpinner); + return G_SOURCE_REMOVE; +} + +void *yon_pacman_load(struct pacman_struct *pacman){ + const char *find_package = pacman->find_package; + // char *command = get_local_module_info_command(find_package); + pacman->packages = yon_packages_find(YON_PACKAGES_SYNC,find_package,&pacman->packages_size); + g_idle_add((GSourceFunc)yon_pacman_fill,pacman); + return NULL; +} + +void on_pacman_icon_press(GtkEntry *self,GtkEntryIconPosition icon_pos,GdkEvent* ,main_window *widgets){ + if(icon_pos != GTK_ENTRY_ICON_SECONDARY) return; + + gtk_list_store_clear(widgets->PacmanSoftwareAllList); + + const char *find_package = gtk_entry_get_text(self); + struct pacman_struct *pacman = new (struct pacman_struct); + pacman->widgets=widgets; + pacman->find_package=find_package; + gtk_widget_set_sensitive(widgets->PacmanSoftwareSearchEntry,0); + gtk_widget_set_sensitive(widgets->PacmanSoftwareChosenPackagesTree,0); + gtk_widget_set_sensitive(widgets->PacmanSoftwareStatusButton,0); + gtk_overlay_add_overlay(GTK_OVERLAY(widgets->PacmanLoadingOverlay),widgets->MainSpinner); + g_thread_new("pacman_modules_get_thread",(GThreadFunc)yon_pacman_load,pacman); } \ No newline at end of file diff --git a/source/ubinstall-gtk-source.c b/source/ubinstall-gtk-source.c index 1179c12..793e480 100644 --- a/source/ubinstall-gtk-source.c +++ b/source/ubinstall-gtk-source.c @@ -223,7 +223,7 @@ void on_source_accept(GtkWidget *,source_window *window){ } if (!main_config.configure_mode){ int size; - config_str parameters = yon_config_get_save_parameters_by_key(&size,locale_parameter,lang_parameter,zone_parameter,NULL); + config_str parameters = yon_config_get_save_parameters_by_key(&size,source_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); diff --git a/source/ubinstall-gtk.c b/source/ubinstall-gtk.c index f3cd3bb..1359eb3 100644 --- a/source/ubinstall-gtk.c +++ b/source/ubinstall-gtk.c @@ -161,78 +161,6 @@ void on_vnc_toggled(GtkWidget *self, main_window *){ g_list_free(children); } -void on_pacman_software_all_toggled(GtkWidget *, char *path, main_window *widgets){ - GtkTreeIter iter; - char *name, *type, *description; - gtk_tree_model_get_iter_from_string(GTK_TREE_MODEL(widgets->PacmanSoftwareAllList),&iter,path); - gtk_tree_model_get(GTK_TREE_MODEL(widgets->PacmanSoftwareAllList),&iter,1,&name,2,&type,3,&description,-1); - gtk_list_store_remove(widgets->PacmanSoftwareAllList,&iter); - gtk_list_store_append(widgets->PacmanSoftwareChosenList,&iter); - gtk_list_store_set(widgets->PacmanSoftwareChosenList,&iter,0,1,1,name,2,type,3,description,-1); - g_hash_table_add(widgets->pacmanchosen,yon_char_new(name)); - -} - -void on_pacman_software_chosen_toggled(GtkWidget *, char *path, main_window *widgets){ - GtkTreeIter iter; - char *name, *type, *description; - gtk_tree_model_get_iter_from_string(GTK_TREE_MODEL(widgets->PacmanSoftwareChosenList),&iter,path); - gtk_tree_model_get(GTK_TREE_MODEL(widgets->PacmanSoftwareChosenList),&iter,1,&name,2,&type,3,&description,-1); - gtk_list_store_remove(widgets->PacmanSoftwareChosenList,&iter); - gtk_list_store_append(widgets->PacmanSoftwareAllList,&iter); - gtk_list_store_set(widgets->PacmanSoftwareAllList,&iter,0,0,1,name,2,type,3,description,-1); - g_hash_table_remove(widgets->pacmanchosen,name); -} - -gboolean yon_pacman_fill(struct pacman_struct *pacman){ - main_window *widgets = pacman->widgets; - config_str loaded = pacman->packages; - int size = pacman->packages_size; - - - for (int i=0;ipacmanchosen,loaded[i])) continue; - char *version = yon_packages_get_version(YON_PACKAGES_SYNC,loaded[i]); - char *description = yon_packages_get_description(YON_PACKAGES_SYNC,loaded[i]); - GtkTreeIter iter; - gtk_list_store_append(widgets->PacmanSoftwareAllList,&iter); - gtk_list_store_set(widgets->PacmanSoftwareAllList,&iter,0,0,1,loaded[i],2,version,3,description,-1); - if (!yon_char_is_empty(version))free(version); - if (!yon_char_is_empty(description)) free(description); - } - yon_char_parsed_free(loaded,size); - gtk_widget_set_sensitive(widgets->PacmanSoftwareSearchEntry,1); - gtk_widget_set_sensitive(widgets->PacmanSoftwareChosenPackagesTree,1); - gtk_widget_set_sensitive(widgets->PacmanSoftwareStatusButton,1); - g_object_ref(G_OBJECT(widgets->MainSpinner)); - gtk_container_remove(GTK_CONTAINER(widgets->PacmanLoadingOverlay),widgets->MainSpinner); - return G_SOURCE_REMOVE; -} - -void *yon_pacman_load(struct pacman_struct *pacman){ - const char *find_package = pacman->find_package; - // char *command = get_local_module_info_command(find_package); - pacman->packages = yon_packages_find(YON_PACKAGES_SYNC,find_package,&pacman->packages_size); - g_idle_add((GSourceFunc)yon_pacman_fill,pacman); - return NULL; -} - -void on_pacman_icon_press(GtkEntry *self,GtkEntryIconPosition icon_pos,GdkEvent* ,main_window *widgets){ - if(icon_pos != GTK_ENTRY_ICON_SECONDARY) return; - - gtk_list_store_clear(widgets->PacmanSoftwareAllList); - - const char *find_package = gtk_entry_get_text(self); - struct pacman_struct *pacman = new (struct pacman_struct); - pacman->widgets=widgets; - pacman->find_package=find_package; - gtk_widget_set_sensitive(widgets->PacmanSoftwareSearchEntry,0); - gtk_widget_set_sensitive(widgets->PacmanSoftwareChosenPackagesTree,0); - gtk_widget_set_sensitive(widgets->PacmanSoftwareStatusButton,0); - gtk_overlay_add_overlay(GTK_OVERLAY(widgets->PacmanLoadingOverlay),widgets->MainSpinner); - g_thread_new("pacman_modules_get_thread",(GThreadFunc)yon_pacman_load,pacman); -} - void on_toggle_button_switch_on(GtkWidget *, GtkToggleButton *toggle){ gtk_toggle_button_set_active(toggle,1); } diff --git a/ubinstall-gtk-os-row.glade b/ubinstall-gtk-os-row.glade index 9590bb8..1fd90f5 100644 --- a/ubinstall-gtk-os-row.glade +++ b/ubinstall-gtk-os-row.glade @@ -3,47 +3,84 @@ - + True - False - 5 + True + False + False - + True - True - False - True + False + 5 - + True - False - 5 - 5 - 5 - 5 + True + False + 5 + True True False - 1 - vertical + 5 + 5 + 5 5 True False - 7 + 1 + vertical + 5 - + True False - Name - 0 - False - 0 - - - + 7 + + + True + False + Name + 0 + False + 0 + + + + + + False + True + 0 + + + + + True + False + center + start + 3 + 5 + 2 + + + + + + False + True + end + 2 + + + False @@ -52,68 +89,57 @@ - + True False - center - start - 3 - 5 - 2 - - - False True - end - 2 + 1 - - - - False - True - 0 - - - - - True - False - - - False - True - 1 - - - - - True - False - 5 True False - vertical 5 True False + vertical 5 - + True False - Source: - 0 + 5 + + + True + False + Source: + 0 + + + True + True + 0 + + + + + True + False + 0 + + + False + True + 1 + + False @@ -122,17 +148,83 @@ - + True False - 0 + 5 + + + True + False + Version: + 0 + + + True + True + 0 + + + + + True + False + True + 15 + False + 0 + + + False + True + 1 + + - False + True True 1 + + + True + False + 5 + + + True + False + Description + True + 0 + 0 + + + True + True + 0 + + + + + True + False + + + False + True + 1 + + + + + True + True + 2 + + False @@ -144,12 +236,14 @@ True False + start 5 True False - Version: + start + Size: 0 @@ -159,12 +253,9 @@ - + True False - True - 15 - False 0 @@ -177,62 +268,7 @@ False True - 1 - - - - - True - False - 2 - Description - True - 0 - 0 - - - True - True end - 2 - - - - - False - True - 0 - - - - - True - False - start - 5 - - - True - False - start - Size: - 0 - - - False - True - 0 - - - - - True - False - 0 - - - False - True 1 @@ -240,36 +276,30 @@ False True - end - 1 + 2 - False + True True - 2 + 0 - - True - True - 0 - + + True + True + 0 + + - - True - True - 0 - - diff --git a/ubinstall-gtk.glade b/ubinstall-gtk.glade index c564068..5b04e9d 100644 --- a/ubinstall-gtk.glade +++ b/ubinstall-gtk.glade @@ -223,6 +223,8 @@ + + @@ -235,6 +237,10 @@ + + + + @@ -3489,7 +3495,18 @@ agreement - Type + Size + + + + 4 + + + + + + + Version @@ -3592,7 +3609,18 @@ agreement - Type + Size + + + + 4 + + + + + + + Version -- 2.35.1 From 7618fb56498a3543cf3fb0f1934fde40d7a60881 Mon Sep 17 00:00:00 2001 From: Ivan Dmitrievich Yartsev Date: Tue, 17 Feb 2026 16:20:25 +0600 Subject: [PATCH 10/17] Added Overall size label for packages installation page --- locale/ubinstall-gtk.pot | 4 +++ locale/ubinstall-gtk_ru.po | 4 +++ source/ubinstall-gtk-components.c | 27 +++++++++++++++++++ source/ubinstall-gtk-region.c | 14 ---------- source/ubinstall-gtk.c | 1 + source/ubinstall-gtk.h | 4 ++- source/ubl-strings.h | 1 + ubinstall-gtk.glade | 45 +++++++++++++++++++++++++++++-- 8 files changed, 83 insertions(+), 17 deletions(-) diff --git a/locale/ubinstall-gtk.pot b/locale/ubinstall-gtk.pot index 7c1778a..7d1e8f7 100644 --- a/locale/ubinstall-gtk.pot +++ b/locale/ubinstall-gtk.pot @@ -1005,6 +1005,10 @@ msgstr "" msgid "Group" msgstr "" +#: source/ubl-strings.h:292 +msgid "Overall size:" +msgstr "" + #: source/ubl-strings.h:292 msgid "Select your language:" msgstr "" diff --git a/locale/ubinstall-gtk_ru.po b/locale/ubinstall-gtk_ru.po index 202c5a0..94c36fa 100644 --- a/locale/ubinstall-gtk_ru.po +++ b/locale/ubinstall-gtk_ru.po @@ -1025,6 +1025,10 @@ msgstr "Приложение" msgid "Group" msgstr "Группа" +#: source/ubl-strings.h:292 +msgid "Overall size:" +msgstr "Общий размер:" + #: source/ubl-strings.h:292 msgid "Select your language:" msgstr "Выберите язык:" diff --git a/source/ubinstall-gtk-components.c b/source/ubinstall-gtk-components.c index 43f8528..8ac6f66 100644 --- a/source/ubinstall-gtk-components.c +++ b/source/ubinstall-gtk-components.c @@ -362,6 +362,7 @@ void yon_pacman_init(main_window *widgets){ gtk_list_store_set(widgets->PacmanSoftwareChosenList,&iter,0,1,1,parsed[i],2,version,3,_(description),4,size_str,-1); free(size_str); } + yon_pacman_software_update_overall_size(widgets); yon_char_parsed_free(parsed,size); } @@ -374,9 +375,33 @@ void on_pacman_software_all_toggled(GtkWidget *, char *path, main_window *widget gtk_list_store_append(widgets->PacmanSoftwareChosenList,&iter); gtk_list_store_set(widgets->PacmanSoftwareChosenList,&iter,0,1,1,name,2,type,3,description,4,size_str,-1); g_hash_table_add(widgets->pacmanchosen,yon_char_new(name)); + yon_pacman_software_update_overall_size(widgets); } +void yon_pacman_software_update_overall_size(main_window *widgets){ + GtkTreeIter iter; + GtkTreeModel *model = GTK_TREE_MODEL(widgets->PacmanSoftwareChosenList); + long overall_size = 0; + for_iter(model, &iter){ + char *name; + gtk_tree_model_get(model,&iter,1,&name,-1); + long size = yon_packages_get_installed_size(YON_PACKAGES_ALL,name); + overall_size+=size; + } + char *overall_str = NULL; + if (overall_size){ + char mod = '\0'; + double size_converted = yon_size_long_convert_automatic(overall_size,&mod); + char *size_str = yon_char_from_double(size_converted); + overall_str = yon_char_unite(size_str," ", yon_size_get_name_from_letter(mod),NULL); + free(size_str); + } else { + overall_str = yon_char_unite("0 ",yon_size_get_name_from_letter('K'),NULL); + } + gtk_label_set_text(GTK_LABEL(widgets->PacmanOverallSizeLabel),overall_str); +} + void on_pacman_software_chosen_toggled(GtkWidget *, char *path, main_window *widgets){ GtkTreeIter iter; char *name, *type, *description, *size_str; @@ -386,6 +411,7 @@ void on_pacman_software_chosen_toggled(GtkWidget *, char *path, main_window *wid gtk_list_store_append(widgets->PacmanSoftwareAllList,&iter); gtk_list_store_set(widgets->PacmanSoftwareAllList,&iter,0,0,1,name,2,type,3,description,4,size_str,-1); g_hash_table_remove(widgets->pacmanchosen,name); + yon_pacman_software_update_overall_size(widgets); } gboolean yon_pacman_fill(struct pacman_struct *pacman){ @@ -408,6 +434,7 @@ gboolean yon_pacman_fill(struct pacman_struct *pacman){ if (!yon_char_is_empty(version))free(version); if (!yon_char_is_empty(description)) free(description); } + yon_pacman_software_update_overall_size(widgets); yon_char_parsed_free(loaded,size); gtk_widget_set_sensitive(widgets->PacmanSoftwareSearchEntry,1); gtk_widget_set_sensitive(widgets->PacmanSoftwareChosenPackagesTree,1); diff --git a/source/ubinstall-gtk-region.c b/source/ubinstall-gtk-region.c index a2ac57a..87787cb 100644 --- a/source/ubinstall-gtk-region.c +++ b/source/ubinstall-gtk-region.c @@ -1,9 +1,7 @@ #include "ubinstall-gtk.h" // #define TIMEZONEMAP_INCLUDE -#ifdef TIMEZONEMAP_INCLUDE #include "timezonemap/cc-timezone-map.h" #include "timezonemap/tz.h" -#endif int yon_region_save(main_window *widgets){ if (gtk_combo_box_get_active(GTK_COMBO_BOX(widgets->RegionCombo))==-1){ @@ -37,7 +35,6 @@ void on_region_changed(GtkComboBox *self, main_window *widgets){ } } - #ifdef TIMEZONEMAP_INCLUDE gboolean on_time_zone_status_hover(GtkWidget *, GdkEvent *, main_window *widgets){ gtk_style_context_add_class(gtk_widget_get_style_context(widgets->TimeZoneMapOverlayBox),"timezoneoverlay_hover"); @@ -145,13 +142,9 @@ void on_map_selection_changed(GtkWidget *,CcTimezoneLocation *location,main_wind g_signal_handlers_unblock_by_func(G_OBJECT(widgets->RegionEntry),G_CALLBACK(on_region_entry_changed),widgets); } -#endif - void yon_map_update(main_window *widgets, const char *timezone){ - #ifdef TIMEZONEMAP_INCLUDE g_signal_handlers_block_by_func(G_OBJECT(widgets->RegionMapTarget),G_CALLBACK(on_map_selection_changed),widgets); g_signal_handlers_block_by_func(G_OBJECT(widgets->ZoneCombo),G_CALLBACK(on_zone_changed),widgets); - #endif g_signal_handlers_block_by_func(G_OBJECT(widgets->RegionEntry),G_CALLBACK(on_region_entry_changed),widgets); textdomain(timezone_locale_name); char *region = yon_timezone_get_zone(timezone); @@ -163,14 +156,10 @@ void yon_map_update(main_window *widgets, const char *timezone){ gtk_combo_box_set_active_id(GTK_COMBO_BOX(widgets->RegionCombo),region); gtk_combo_box_set_active_id(GTK_COMBO_BOX(widgets->ZoneCombo),city); - #ifdef TIMEZONEMAP_INCLUDE cc_timezone_map_set_timezone(CC_TIMEZONE_MAP(widgets->RegionMapTarget),timezone); - #endif g_signal_handlers_unblock_by_func(G_OBJECT(widgets->RegionEntry),G_CALLBACK(on_region_entry_changed),widgets); - #ifdef TIMEZONEMAP_INCLUDE g_signal_handlers_unblock_by_func(G_OBJECT(widgets->ZoneCombo),G_CALLBACK(on_zone_changed),widgets); g_signal_handlers_unblock_by_func(G_OBJECT(widgets->RegionMapTarget),G_CALLBACK(on_map_selection_changed),widgets); - #endif textdomain(LocaleName); } @@ -197,7 +186,6 @@ void yon_region_init(main_window *widgets){ yon_timezone_init(); gtk_combo_box_text_remove_all(GTK_COMBO_BOX_TEXT(widgets->RegionCombo)); gtk_combo_box_text_remove_all(GTK_COMBO_BOX_TEXT(widgets->KeyboardNumLockCombo)); - #ifdef TIMEZONEMAP_INCLUDE // insert timezonemap's interactive map GList *list = gtk_container_get_children(GTK_CONTAINER(widgets->RegionMapBox)); if (list){ GList *iter; @@ -214,9 +202,7 @@ void yon_region_init(main_window *widgets){ if (!yon_char_is_empty(config_param)){ cc_timezone_map_set_timezone(CC_TIMEZONE_MAP(widgets->RegionMapTarget),config_param); } - #else // if timezonemap does not installed, static image inserts - #endif size_t size; GtkTreeIter iter; config_str parsed = yon_timezone_get_all(&size); diff --git a/source/ubinstall-gtk.c b/source/ubinstall-gtk.c index 1359eb3..ef3e819 100644 --- a/source/ubinstall-gtk.c +++ b/source/ubinstall-gtk.c @@ -558,6 +558,7 @@ void yon_main_window_create(main_window *widgets){ widgets->PacmanLoadingOverlay = yon_gtk_builder_get_widget(builder,"PacmanLoadingOverlay"); widgets->PacmanSoftwareAllPackagesTree = yon_gtk_builder_get_widget(builder,"PacmanSoftwareAllPackagesTree"); + widgets->PacmanOverallSizeLabel = yon_gtk_builder_get_widget(builder,"PacmanOverallSizeLabel"); widgets->PacmanSoftwareAllList = GTK_LIST_STORE(gtk_builder_get_object(builder,"PacmanSoftwareAllList")); widgets->PacmanSoftwareAllCell = GTK_CELL_RENDERER(gtk_builder_get_object(builder,"PacmanSoftwareAllCell")); diff --git a/source/ubinstall-gtk.h b/source/ubinstall-gtk.h index 7fd036d..3238b3f 100755 --- a/source/ubinstall-gtk.h +++ b/source/ubinstall-gtk.h @@ -699,6 +699,7 @@ typedef struct GtkWidget *PacmanSoftwareChosenPackagesTree; GtkListStore *PacmanSoftwareChosenList; GtkCellRenderer *PacmanSoftwareChosenCell; + GtkWidget *PacmanOverallSizeLabel; // GtkWidget *StartupImage; GtkWidget *StartupServicesTree; @@ -1509,4 +1510,5 @@ void yon_map_update(main_window *widgets, const char *timezone); void on_partition_size_changed(GtkWidget *self, main_window *widgets); void *yon_partitions_list_load(main_window *widgets); void *yon_modules_list_load(main_window *widgets); -void yon_size_changed(GtkSpinButton *self, main_window *widgets); \ No newline at end of file +void yon_size_changed(GtkSpinButton *self, main_window *widgets); +void yon_pacman_software_update_overall_size(main_window *widgets); \ No newline at end of file diff --git a/source/ubl-strings.h b/source/ubl-strings.h index e6c40ed..bb39b63 100644 --- a/source/ubl-strings.h +++ b/source/ubl-strings.h @@ -294,6 +294,7 @@ NULL) #define NOT_ENOUGH_FREE_SPACE_LABEL _("The size of the new partition exceeds the free space of the selected partition") //Размер нового раздела превышает свободное место выбранного раздела #define NOT_ENOUGH_SPACE_LABEL _("The size of the new disk partition is larger than the size of the selected partition") //Размер нового раздела диска превышает размер выбранного раздела +// #define _LABEL _("Overall size:") // #define _LABEL _("Select your language:") // #define _LABEL _("Selecting additional system kernel components") // #define _LABEL _("Package:") diff --git a/ubinstall-gtk.glade b/ubinstall-gtk.glade index 5b04e9d..01f7e2d 100644 --- a/ubinstall-gtk.glade +++ b/ubinstall-gtk.glade @@ -3337,7 +3337,7 @@ agreement False True - 1 + 0 @@ -3555,7 +3555,7 @@ agreement True True - 2 + 1 @@ -3657,6 +3657,47 @@ agreement True True + 2 + + + + + True + False + 5 + + + True + False + + + False + True + end + 0 + + + + + True + False + Overall size: + + + + + + False + True + end + 1 + + + + + False + True + end 3 -- 2.35.1 From b3ae703a28973b7c5a4387e3d0fea9d3c84638e2 Mon Sep 17 00:00:00 2001 From: Ivan Dmitrievich Yartsev Date: Tue, 17 Feb 2026 18:00:34 +0600 Subject: [PATCH 11/17] Added chosen and overall sizes at Installing Packages page --- locale/ubinstall-gtk.pot | 4 ++ locale/ubinstall-gtk_ru.po | 4 ++ source/ubinstall-gtk-components.c | 54 ++++++++++++------- source/ubinstall-gtk-installation.c | 10 ---- source/ubinstall-gtk.c | 1 + source/ubinstall-gtk.h | 1 + source/ubl-strings.h | 1 + ubinstall-gtk-os-row.glade | 10 ++-- ubinstall-gtk.glade | 82 +++++++++++++++++++++++++---- 9 files changed, 125 insertions(+), 42 deletions(-) diff --git a/locale/ubinstall-gtk.pot b/locale/ubinstall-gtk.pot index 7d1e8f7..8aa54a8 100644 --- a/locale/ubinstall-gtk.pot +++ b/locale/ubinstall-gtk.pot @@ -1005,6 +1005,10 @@ msgstr "" msgid "Group" msgstr "" +#: source/ubl-strings.h:292 +msgid "Chosen size:" +msgstr "" + #: source/ubl-strings.h:292 msgid "Overall size:" msgstr "" diff --git a/locale/ubinstall-gtk_ru.po b/locale/ubinstall-gtk_ru.po index 94c36fa..3337386 100644 --- a/locale/ubinstall-gtk_ru.po +++ b/locale/ubinstall-gtk_ru.po @@ -1025,6 +1025,10 @@ msgstr "Приложение" msgid "Group" msgstr "Группа" +#: source/ubl-strings.h:292 +msgid "Chosen size:" +msgstr "Размер выбора:" + #: source/ubl-strings.h:292 msgid "Overall size:" msgstr "Общий размер:" diff --git a/source/ubinstall-gtk-components.c b/source/ubinstall-gtk-components.c index 8ac6f66..748f0b9 100644 --- a/source/ubinstall-gtk-components.c +++ b/source/ubinstall-gtk-components.c @@ -380,26 +380,44 @@ void on_pacman_software_all_toggled(GtkWidget *, char *path, main_window *widget } void yon_pacman_software_update_overall_size(main_window *widgets){ - GtkTreeIter iter; - GtkTreeModel *model = GTK_TREE_MODEL(widgets->PacmanSoftwareChosenList); - long overall_size = 0; - for_iter(model, &iter){ - char *name; - gtk_tree_model_get(model,&iter,1,&name,-1); - long size = yon_packages_get_installed_size(YON_PACKAGES_ALL,name); - overall_size+=size; + long pacman_size = 0; + { + GtkTreeIter iter; + GtkTreeModel *model = GTK_TREE_MODEL(widgets->PacmanSoftwareChosenList); + for_iter(model, &iter){ + char *name; + gtk_tree_model_get(model,&iter,1,&name,-1); + long size = yon_packages_get_installed_size(YON_PACKAGES_ALL,name); + pacman_size+=size; + } + char *overall_str = NULL; + if (pacman_size){ + overall_str = yon_size_long_convert_automatic_to_string(pacman_size); + } else { + overall_str = yon_char_unite("0 ",yon_size_get_name_from_letter('K'),NULL); + } + gtk_label_set_text(GTK_LABEL(widgets->PacmanChosenLabel),overall_str); + if (!yon_char_is_empty(overall_str)) free(overall_str); } - char *overall_str = NULL; - if (overall_size){ - char mod = '\0'; - double size_converted = yon_size_long_convert_automatic(overall_size,&mod); - char *size_str = yon_char_from_double(size_converted); - overall_str = yon_char_unite(size_str," ", yon_size_get_name_from_letter(mod),NULL); - free(size_str); - } else { - overall_str = yon_char_unite("0 ",yon_size_get_name_from_letter('K'),NULL); + { + GList *list = gtk_container_get_children(GTK_CONTAINER(widgets->OSSoftwareListBox)); + GList *listiter; + for (listiter=list;listiter;listiter=listiter->next){ + os_row *row = g_object_get_data(G_OBJECT(listiter->data),"kernel_row"); + if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(row->InstallCheck))){ + long cur_size = yon_packages_get_installed_size(YON_PACKAGES_ALL,row->name); + pacman_size += cur_size; + } + } + char *final_modules_size = NULL; + if (pacman_size){ + final_modules_size = yon_size_long_convert_automatic_to_string(pacman_size); + } else { + final_modules_size = yon_char_unite("0 ",yon_size_get_name_from_letter('K'),NULL); + } + gtk_label_set_text(GTK_LABEL(widgets->PacmanOverallSizeLabel),final_modules_size); + if (!yon_char_is_empty(final_modules_size)) free(final_modules_size); } - gtk_label_set_text(GTK_LABEL(widgets->PacmanOverallSizeLabel),overall_str); } void on_pacman_software_chosen_toggled(GtkWidget *, char *path, main_window *widgets){ diff --git a/source/ubinstall-gtk-installation.c b/source/ubinstall-gtk-installation.c index f0a07cd..7b6e9f0 100644 --- a/source/ubinstall-gtk-installation.c +++ b/source/ubinstall-gtk-installation.c @@ -1,15 +1,5 @@ #include "ubinstall-gtk.h" -char *yon_size_get_name_from_letter(char letter){ - switch (letter){ - case 'K': return yon_char_new(KB_LABEL); break; - case 'M': return yon_char_new(MB_LABEL); break; - case 'G': return yon_char_new(GB_LABEL); break; - case 'T': return yon_char_new(TB_LABEL); break; - } - return NULL; -} - int yon_install_common_save(main_window *widgets){ GtkTreeModel *model; GtkTreeIter iter; diff --git a/source/ubinstall-gtk.c b/source/ubinstall-gtk.c index ef3e819..fcb0854 100644 --- a/source/ubinstall-gtk.c +++ b/source/ubinstall-gtk.c @@ -559,6 +559,7 @@ void yon_main_window_create(main_window *widgets){ widgets->PacmanLoadingOverlay = yon_gtk_builder_get_widget(builder,"PacmanLoadingOverlay"); widgets->PacmanSoftwareAllPackagesTree = yon_gtk_builder_get_widget(builder,"PacmanSoftwareAllPackagesTree"); widgets->PacmanOverallSizeLabel = yon_gtk_builder_get_widget(builder,"PacmanOverallSizeLabel"); + widgets->PacmanChosenLabel = yon_gtk_builder_get_widget(builder,"PacmanChosenLabel"); widgets->PacmanSoftwareAllList = GTK_LIST_STORE(gtk_builder_get_object(builder,"PacmanSoftwareAllList")); widgets->PacmanSoftwareAllCell = GTK_CELL_RENDERER(gtk_builder_get_object(builder,"PacmanSoftwareAllCell")); diff --git a/source/ubinstall-gtk.h b/source/ubinstall-gtk.h index 3238b3f..e4f2d91 100755 --- a/source/ubinstall-gtk.h +++ b/source/ubinstall-gtk.h @@ -700,6 +700,7 @@ typedef struct GtkListStore *PacmanSoftwareChosenList; GtkCellRenderer *PacmanSoftwareChosenCell; GtkWidget *PacmanOverallSizeLabel; + GtkWidget *PacmanChosenLabel; // GtkWidget *StartupImage; GtkWidget *StartupServicesTree; diff --git a/source/ubl-strings.h b/source/ubl-strings.h index bb39b63..3da8cd7 100644 --- a/source/ubl-strings.h +++ b/source/ubl-strings.h @@ -294,6 +294,7 @@ NULL) #define NOT_ENOUGH_FREE_SPACE_LABEL _("The size of the new partition exceeds the free space of the selected partition") //Размер нового раздела превышает свободное место выбранного раздела #define NOT_ENOUGH_SPACE_LABEL _("The size of the new disk partition is larger than the size of the selected partition") //Размер нового раздела диска превышает размер выбранного раздела +// #define _LABEL _("Chosen size:") // #define _LABEL _("Overall size:") // #define _LABEL _("Select your language:") // #define _LABEL _("Selecting additional system kernel components") diff --git a/ubinstall-gtk-os-row.glade b/ubinstall-gtk-os-row.glade index 1fd90f5..1d2390a 100644 --- a/ubinstall-gtk-os-row.glade +++ b/ubinstall-gtk-os-row.glade @@ -12,6 +12,8 @@ True False + 1 + 1 5 @@ -19,14 +21,15 @@ True False 5 + 10 + 5 + 5 True True False - 5 - 5 - 5 + 5 5 @@ -296,7 +299,6 @@ diff --git a/ubinstall-gtk.glade b/ubinstall-gtk.glade index 01f7e2d..2c028f3 100644 --- a/ubinstall-gtk.glade +++ b/ubinstall-gtk.glade @@ -3470,7 +3470,9 @@ agreement PacmanSoftwareAllList 0 - + + none + @@ -3584,7 +3586,9 @@ agreement PacmanSoftwareChosenList 0 - + + none + @@ -3664,27 +3668,80 @@ agreement True False + end + vertical 5 - + True False + 5 + + + True + False + Chosen size: + + + + + + False + True + 0 + + + + + True + False + + + False + True + 1 + + False True - end 0 - + True False - Overall size: - - - + 5 + + + True + False + + + False + True + end + 0 + + + + + True + False + Overall size: + + + + + + False + True + end + 1 + + False @@ -3697,7 +3754,6 @@ agreement False True - end 3 @@ -13990,6 +14046,12 @@ separately into the selected partition. + + + + + + -- 2.35.1 From edb0ba299d5071c36a0f3cc13dcc55eceab302d7 Mon Sep 17 00:00:00 2001 From: Ivan Dmitrievich Yartsev Date: Tue, 17 Feb 2026 18:39:27 +0600 Subject: [PATCH 12/17] WIP part/device size compare with installed modules and packages --- source/ubinstall-gtk-config-hub.c | 59 +++++++++++++++++++++++++++++ source/ubinstall-gtk-installation.c | 4 +- source/ubinstall-gtk.h | 3 +- ubinstall-gtk.glade | 2 + 4 files changed, 66 insertions(+), 2 deletions(-) diff --git a/source/ubinstall-gtk-config-hub.c b/source/ubinstall-gtk-config-hub.c index b19d9c0..1a2daea 100644 --- a/source/ubinstall-gtk-config-hub.c +++ b/source/ubinstall-gtk-config-hub.c @@ -1,6 +1,65 @@ #include "ubinstall-gtk.h" +int yon_installation_check_packages_size(main_window *widgets){ + char *packages = config(packages_parameter); + char *modules = config(modules_parameter); + char *install_mode = config(AUTOINSTALL_TYPE_INSTALL); + long part_size = 0; + + if (strcmp(install_mode,"fast")){ + char *part = config(part_parameter); + for (int i=0;i3&&!yon_char_is_empty(parsed[3])){ + part_size = atol(parsed[3]); + + yon_char_parsed_free(parsed,parsed_size); + break; + } + yon_char_parsed_free(parsed,parsed_size); + } + } else { + char *device = config(AUTOINSTALL_DEVICE); + GtkTreeIter iter; + for_iter(widgets->DevicesList,&iter){ + char *target; + long disk_size; + gtk_tree_model_get(GTK_TREE_MODEL(widgets->DevicesList),&iter,0,&target,7,&disk_size,-1); + if (!strcmp(device,target)){ + part_size = disk_size; + } + } + } + long packages_size = 0; + long modules_size = 0; + + if (!yon_char_is_empty(packages)){ + int parsed_size; + config_str parsed = yon_char_parse(packages,&parsed_size,","); + for (int i=0;ipart_size){ + yon_ubl_status_box_spawn(GTK_CONTAINER(widgets->StatusBox),NOT_ENOUGH_SPACE_LABEL,5,BACKGROUND_IMAGE_FAIL_TYPE); + return 0; + } + return 1; +} + int yon_configuration_hub_save(main_window *widgets){ + if (!yon_installation_check_packages_size(widgets)) return 0; char *finish_button = (char *)gtk_combo_box_get_active_id(GTK_COMBO_BOX(widgets->ConfigHubRebootCombo)); if (!yon_char_is_empty(finish_button)){ yon_config_register(finish_parameter,finish_parameter_command,finish_button); diff --git a/source/ubinstall-gtk-installation.c b/source/ubinstall-gtk-installation.c index 7b6e9f0..0734bd9 100644 --- a/source/ubinstall-gtk-installation.c +++ b/source/ubinstall-gtk-installation.c @@ -372,7 +372,9 @@ void yon_devices_setup(main_window *widgets){ 2,yon_char_return_if_exist(parsed[4],""), 3,yon_char_return_if_exist(size_string,""), 4,yon_char_return_if_exist(parsed[3],""), - 6,1,-1); + 6,1, + 7,atol(parsed[1]), + -1); yon_char_parsed_free(parsed,parsed_size); diff --git a/source/ubinstall-gtk.h b/source/ubinstall-gtk.h index e4f2d91..8e5c3aa 100755 --- a/source/ubinstall-gtk.h +++ b/source/ubinstall-gtk.h @@ -1512,4 +1512,5 @@ void on_partition_size_changed(GtkWidget *self, main_window *widgets); void *yon_partitions_list_load(main_window *widgets); void *yon_modules_list_load(main_window *widgets); void yon_size_changed(GtkSpinButton *self, main_window *widgets); -void yon_pacman_software_update_overall_size(main_window *widgets); \ No newline at end of file +void yon_pacman_software_update_overall_size(main_window *widgets); +int yon_installation_check_packages_size(main_window *widgets); \ No newline at end of file diff --git a/ubinstall-gtk.glade b/ubinstall-gtk.glade index 2c028f3..b55591a 100644 --- a/ubinstall-gtk.glade +++ b/ubinstall-gtk.glade @@ -3681,6 +3681,7 @@ agreement True False Chosen size: + 1 @@ -3731,6 +3732,7 @@ agreement True False Overall size: + 1 -- 2.35.1 From b3c5ca709d3ed8958156bcdc79cabb22f4ebcd97 Mon Sep 17 00:00:00 2001 From: Ivan Dmitrievich Yartsev Date: Wed, 18 Feb 2026 15:21:54 +0600 Subject: [PATCH 13/17] Test size checking --- locale/ubinstall-gtk_ru.po | 2 +- source/ubinstall-gtk-components.c | 38 ++++++++++++++++++ source/ubinstall-gtk-config-hub.c | 25 ++++++++++-- source/ubinstall-gtk-install-start.c | 1 + source/ubinstall-gtk-installation.c | 13 +++--- source/ubinstall-gtk.c | 2 + source/ubinstall-gtk.h | 8 +++- source/ubl-strings.h | 2 + ubinstall-gtk-os-row.glade | 1 + ubinstall-gtk.glade | 60 +++++++++++++++++++++++++++- 10 files changed, 138 insertions(+), 14 deletions(-) diff --git a/locale/ubinstall-gtk_ru.po b/locale/ubinstall-gtk_ru.po index 3337386..07a08ca 100644 --- a/locale/ubinstall-gtk_ru.po +++ b/locale/ubinstall-gtk_ru.po @@ -1027,7 +1027,7 @@ msgstr "Группа" #: source/ubl-strings.h:292 msgid "Chosen size:" -msgstr "Размер выбора:" +msgstr "Выбрано:" #: source/ubl-strings.h:292 msgid "Overall size:" diff --git a/source/ubinstall-gtk-components.c b/source/ubinstall-gtk-components.c index 748f0b9..3c521f6 100644 --- a/source/ubinstall-gtk-components.c +++ b/source/ubinstall-gtk-components.c @@ -49,7 +49,44 @@ int yon_kernel_addon_save(main_window *widgets){ return 1; } +int yon_os_components_check_packages_size(GtkWidget *, main_window *widgets){ + long pacman_size = 0; + { + GList *list = gtk_container_get_children(GTK_CONTAINER(widgets->OSSoftwareListBox)); + GList *listiter; + for (listiter=list;listiter;listiter=listiter->next){ + os_row *row = g_object_get_data(G_OBJECT(listiter->data),"kernel_row"); + if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(row->InstallCheck))){ + long cur_size = yon_packages_get_installed_size(YON_PACKAGES_ALL,row->name); + pacman_size += cur_size; + } + } + } + { + GtkTreeIter iter; + GtkTreeModel *model = GTK_TREE_MODEL(widgets->PacmanSoftwareChosenList); + for_iter(model, &iter){ + char *name; + gtk_tree_model_get(model,&iter,1,&name,-1); + long size = yon_packages_get_installed_size(YON_PACKAGES_ALL,name); + pacman_size+=size; + } + char *overall_str = NULL; + if (pacman_size){ + overall_str = yon_size_long_convert_automatic_to_string(pacman_size); + } else { + overall_str = yon_char_unite("0 ",yon_size_get_name_from_letter('K'),NULL); + } + gtk_label_set_text(GTK_LABEL(widgets->OSComponentsOverallSizeLabel),overall_str); + if (!yon_char_is_empty(overall_str)) free(overall_str); + } + + return 1; +} + int yon_os_components_save(main_window *widgets){ + if (!yon_installation_check_packages_size(widgets)) return 0; + GList *list = gtk_container_get_children(GTK_CONTAINER(widgets->OSSoftwareListBox)); GList *iter; int size=0; @@ -151,6 +188,7 @@ gboolean yon_os_component_insert(struct row_data *row_input){ os_row *row = yon_os_row_new(); main_window *widgets = row_input->widgets; + g_signal_connect(G_OBJECT(row->InstallCheck),"toggled",G_CALLBACK(yon_os_components_check_packages_size),widgets); gtk_list_box_insert(GTK_LIST_BOX(widgets->OSSoftwareListBox),row->row,-1); yon_os_row_setup(row,row_input->name,row_input->version,row_input->tags,_(row_input->description), row_input->source, row_input->size); char *modules = config(modules_parameter); diff --git a/source/ubinstall-gtk-config-hub.c b/source/ubinstall-gtk-config-hub.c index 1a2daea..6843526 100644 --- a/source/ubinstall-gtk-config-hub.c +++ b/source/ubinstall-gtk-config-hub.c @@ -1,17 +1,36 @@ #include "ubinstall-gtk.h" +config_str yon_os_components_get_modules(int *size){ + (*size) = 0; + int modules_size = main_config.devices_size; + config_str modules_list = main_config.devices; + config_str module_names = NULL; + for (int i=1;i3&&!yon_char_is_empty(parsed[3])){ + if (!strcmp(parsed[2],part)&&parsed_size>3&&!yon_char_is_empty(parsed[3])){ part_size = atol(parsed[3]); yon_char_parsed_free(parsed,parsed_size); @@ -44,7 +63,7 @@ int yon_installation_check_packages_size(main_window *widgets){ } if (!yon_char_is_empty(modules)){ int parsed_size; - config_str parsed = yon_char_parse(packages,&parsed_size,","); + config_str parsed = yon_char_parse(modules,&parsed_size,","); for (int i=0;ipart_size){ - yon_ubl_status_box_spawn(GTK_CONTAINER(widgets->StatusBox),NOT_ENOUGH_SPACE_LABEL,5,BACKGROUND_IMAGE_FAIL_TYPE); + yon_ubl_status_box_spawn(GTK_CONTAINER(widgets->StatusBox),PACKAGE_NOT_ENOUGH_SPACE_LABEL,5,BACKGROUND_IMAGE_FAIL_TYPE); return 0; } return 1; diff --git a/source/ubinstall-gtk-install-start.c b/source/ubinstall-gtk-install-start.c index 67d6f6f..05a970a 100644 --- a/source/ubinstall-gtk-install-start.c +++ b/source/ubinstall-gtk-install-start.c @@ -6,6 +6,7 @@ int yon_installation_start(main_window *widgets){ } void yon_quick_install(GtkWidget *self, main_window *widgets){ + if (!yon_installation_check_packages_size(widgets)) return; main_config.save_configured=1; gtk_widget_hide(self); gtk_widget_show(gtk_widget_get_parent(widgets->InstallationProgress)); diff --git a/source/ubinstall-gtk-installation.c b/source/ubinstall-gtk-installation.c index 0734bd9..38db982 100644 --- a/source/ubinstall-gtk-installation.c +++ b/source/ubinstall-gtk-installation.c @@ -354,13 +354,13 @@ void on_device_selection_changed(GtkWidget *self, main_window *widgets){ void yon_devices_setup(main_window *widgets){ GtkTreeIter iter; gtk_list_store_clear(widgets->DevicesList); - int size; - config_str parameters = NULL; - parameters = yon_config_load(yon_debug_output("%s\n",get_devices_command),&size); - for (int i=1;iOSFormatEncryptionCombo = yon_gtk_builder_get_widget(builder,"OSFormatEncryptionCombo"); widgets->OSFormatEncryptionEntry = yon_gtk_builder_get_widget(builder,"OSFormatEncryptionEntry"); widgets->OSFormatEncryptionButton = yon_gtk_builder_get_widget(builder,"OSFormatEncryptionButton"); + widgets->OSComponentsOverallSizeLabel = yon_gtk_builder_get_widget(builder,"OSComponentsOverallSizeLabel"); widgets->UserdataDevicesTree = yon_gtk_builder_get_widget(builder,"UserdataDevicesTree"); widgets->UserdataSysSectionTree = yon_gtk_builder_get_widget(builder,"UserdataSysSectionTree"); diff --git a/source/ubinstall-gtk.h b/source/ubinstall-gtk.h index 8e5c3aa..65cc094 100755 --- a/source/ubinstall-gtk.h +++ b/source/ubinstall-gtk.h @@ -464,6 +464,9 @@ typedef struct config_str partitions; int part_size; + config_str devices; + int devices_size; + char *part_size_default; } config; @@ -643,6 +646,7 @@ typedef struct GtkWidget *OSFormatEncryptionButton; GtkWidget *OSSpinner; GtkWidget *OSOverlay; + GtkWidget *OSComponentsOverallSizeLabel; GtkWidget *UserdataGpartedButton; GtkWidget *UserdataUpdateGpartedButton; @@ -1513,4 +1517,6 @@ void *yon_partitions_list_load(main_window *widgets); void *yon_modules_list_load(main_window *widgets); void yon_size_changed(GtkSpinButton *self, main_window *widgets); void yon_pacman_software_update_overall_size(main_window *widgets); -int yon_installation_check_packages_size(main_window *widgets); \ No newline at end of file +int yon_installation_check_packages_size(main_window *widgets); +config_str yon_os_components_get_modules(int *size); +int yon_os_components_check_packages_size(GtkWidget *, main_window *widgets); \ No newline at end of file diff --git a/source/ubl-strings.h b/source/ubl-strings.h index 3da8cd7..cb86d7f 100644 --- a/source/ubl-strings.h +++ b/source/ubl-strings.h @@ -293,6 +293,8 @@ NULL) #define MAP_INFO_LABEL(tz_location) yon_char_unite(_("Geasfa"),tz_location,NULL) #define NOT_ENOUGH_FREE_SPACE_LABEL _("The size of the new partition exceeds the free space of the selected partition") //Размер нового раздела превышает свободное место выбранного раздела #define NOT_ENOUGH_SPACE_LABEL _("The size of the new disk partition is larger than the size of the selected partition") //Размер нового раздела диска превышает размер выбранного раздела +#define MODULE_NOT_ENOUGH_SPACE_LABEL _("There is not enough space to install modules") +#define PACKAGE_NOT_ENOUGH_SPACE_LABEL _("There is not enough space to install packages") // #define _LABEL _("Chosen size:") // #define _LABEL _("Overall size:") diff --git a/ubinstall-gtk-os-row.glade b/ubinstall-gtk-os-row.glade index 1d2390a..1a3da84 100644 --- a/ubinstall-gtk-os-row.glade +++ b/ubinstall-gtk-os-row.glade @@ -172,6 +172,7 @@ True False + start True 15 False diff --git a/ubinstall-gtk.glade b/ubinstall-gtk.glade index b55591a..b3fe2dd 100644 --- a/ubinstall-gtk.glade +++ b/ubinstall-gtk.glade @@ -41,6 +41,8 @@ + + @@ -2101,6 +2103,62 @@ agreement 1 + + + True + False + 5 + 5 + 5 + + + True + False + 5 + + + True + False + + + False + True + end + 0 + + + + + True + False + Overall size: + 1 + + + + + + False + True + end + 1 + + + + + False + True + end + 1 + + + + + False + True + 2 + + 3 @@ -3668,8 +3726,6 @@ agreement True False - end - vertical 5 -- 2.35.1 From 9aeb326f30d0c74129a3dfe5bc771a1441cf8322 Mon Sep 17 00:00:00 2001 From: Ivan Dmitrievich Yartsev Date: Thu, 19 Feb 2026 14:55:42 +0600 Subject: [PATCH 14/17] Test fix for crash --- source/ubinstall-gtk-log.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/source/ubinstall-gtk-log.c b/source/ubinstall-gtk-log.c index 81de549..798880d 100644 --- a/source/ubinstall-gtk-log.c +++ b/source/ubinstall-gtk-log.c @@ -129,9 +129,11 @@ gboolean yon_progress_bar_start(main_window *widgets){ widgets->install_info_monitor = g_file_monitor_file(file_desc,G_FILE_MONITOR_NONE,NULL,NULL); g_signal_connect(G_OBJECT(widgets->install_info_monitor),"changed",G_CALLBACK(yon_installation_progress_update),widgets); g_object_unref(file_desc); - FILE *file = fopen(progress_path,"w"); - if (file){ - fclose(file); + if (access(progress_path,F_OK)){ + FILE *file = fopen(progress_path,"w"); + if (file){ + fclose(file); + } } return G_SOURCE_REMOVE; } \ No newline at end of file -- 2.35.1 From a97df9026755dfdb8d5d0e4a2b721f73d74f5afb Mon Sep 17 00:00:00 2001 From: Ivan Dmitrievich Yartsev Date: Thu, 19 Feb 2026 16:07:12 +0600 Subject: [PATCH 15/17] Test log loading memory fixes; Test interface language changing environment setting error fix --- source/ubinstall-gtk-log.c | 3 +++ source/ubinstall-gtk-ui-lang.c | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/source/ubinstall-gtk-log.c b/source/ubinstall-gtk-log.c index 798880d..09e88e3 100644 --- a/source/ubinstall-gtk-log.c +++ b/source/ubinstall-gtk-log.c @@ -106,6 +106,7 @@ void yon_installation_progress_update(GFileMonitor *,GFile *,GFile *,GFileMonito gtk_progress_bar_set_fraction(GTK_PROGRESS_BAR(widgets->InstallationProgress), fraction / 100); gtk_progress_bar_set_fraction(GTK_PROGRESS_BAR(widgets->PackageInstallationProgress), 0); gtk_label_set_text(GTK_LABEL(widgets->PackageInstallationLabel), ""); + if (!yon_char_is_empty(current_copy)) free(current_copy); } else { gtk_widget_show(gtk_widget_get_parent(widgets->PackageInstallationProgress)); @@ -114,7 +115,9 @@ void yon_installation_progress_update(GFileMonitor *,GFile *,GFile *,GFileMonito double fraction = atof(parsed[2]) / 100; gtk_progress_bar_set_fraction(GTK_PROGRESS_BAR(widgets->PackageInstallationProgress), fraction); gtk_label_set_text(GTK_LABEL(widgets->PackageInstallationLabel), yon_char_parsed_to_string(parsed, size, " ")); + yon_char_parsed_free(parsed,size); } + if (!yon_char_is_empty(current_copy)) free(current_copy); } } diff --git a/source/ubinstall-gtk-ui-lang.c b/source/ubinstall-gtk-ui-lang.c index 9ae5ced..210e03a 100644 --- a/source/ubinstall-gtk-ui-lang.c +++ b/source/ubinstall-gtk-ui-lang.c @@ -89,7 +89,7 @@ void yon_startup_language_init(){ } void yon_main_window_update_locale(main_window *widgets){ - char *locale = config(installer_locale_parameter); + volatile char *locale = config(installer_locale_parameter); if (yon_char_is_empty(locale)){ char *sys_locale = config(lang_parameter); -- 2.35.1 From 24b9d35ebe6bdbb5791a71143b47f7f0b2e01867 Mon Sep 17 00:00:00 2001 From: Ivan Dmitrievich Yartsev Date: Thu, 19 Feb 2026 17:16:00 +0600 Subject: [PATCH 16/17] Build fix --- source/ubinstall-gtk-ui-lang.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/source/ubinstall-gtk-ui-lang.c b/source/ubinstall-gtk-ui-lang.c index 210e03a..59dc360 100644 --- a/source/ubinstall-gtk-ui-lang.c +++ b/source/ubinstall-gtk-ui-lang.c @@ -90,7 +90,7 @@ void yon_startup_language_init(){ void yon_main_window_update_locale(main_window *widgets){ volatile char *locale = config(installer_locale_parameter); - if (yon_char_is_empty(locale)){ + if (yon_char_is_empty((char *)locale)){ char *sys_locale = config(lang_parameter); if (!yon_char_is_empty(sys_locale)){ @@ -102,12 +102,12 @@ void yon_main_window_update_locale(main_window *widgets){ } } } - locale = setlocale(LC_ALL,locale); + locale = setlocale(LC_ALL,(char *)locale); yon_config_register(installer_locale_parameter,installer_locale_parameter_command,(char*)locale); // gtk_widget_destroy(widgets->MainWindow); textdomain(LocaleName); - g_setenv("LANGUAGE",locale,1); + g_setenv("LANGUAGE",(char *)locale,1); yon_update_translation(widgets); // yon_main_window_create(widgets); char *path = yon_char_unite(yon_ubl_user_get_home_directory(),"/.config/",LocaleName,"/",LocaleName,".conf",NULL); -- 2.35.1 From ccae174831d2af6aa3218ebb05aa0cd914f0ab80 Mon Sep 17 00:00:00 2001 From: Ivan Dmitrievich Yartsev Date: Fri, 20 Feb 2026 13:32:41 +0600 Subject: [PATCH 17/17] Icon padding --- ubinstall-gtk.glade | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ubinstall-gtk.glade b/ubinstall-gtk.glade index b3fe2dd..4ac0262 100644 --- a/ubinstall-gtk.glade +++ b/ubinstall-gtk.glade @@ -710,6 +710,7 @@ True False start + 5 112 com.ublinux.ubinstall-gtk 1 @@ -3439,7 +3440,9 @@ agreement True True - com.ublinux.libublsettingsui-gtk3.zoom-symbolic + True + False + Search False -- 2.35.1