diff --git a/locale/ubinstall-gtk.pot b/locale/ubinstall-gtk.pot index f371b98..8014d98 100644 --- a/locale/ubinstall-gtk.pot +++ b/locale/ubinstall-gtk.pot @@ -1882,6 +1882,22 @@ msgstr "" msgid "Invalid devices chosen. Needed:" msgstr "" +#: source/ubl-strings.h:543 +msgid "The size of the new partition exceeds the free space of the selected partition" +msgstr "" + +#: source/ubl-strings.h:543 +msgid "The size of the new disk partition is larger than the size of the selected partition" +msgstr "" + +#: source/ubl-strings.h:543 +msgid "There is not enough space to install modules" +msgstr "" + +#: source/ubl-strings.h:543 +msgid "There is not enough space to install packages" +msgstr "" + #: source/ubl-strings.h:543 msgid "Shudown" msgstr "" diff --git a/locale/ubinstall-gtk_ru.po b/locale/ubinstall-gtk_ru.po index 9734938..e6268b4 100644 --- a/locale/ubinstall-gtk_ru.po +++ b/locale/ubinstall-gtk_ru.po @@ -1873,6 +1873,22 @@ msgstr "Неверная проверка четности устройств. msgid "Invalid devices chosen. Needed:" msgstr "Выбраны недействительные устройства. Требуется:" +#: source/ubl-strings.h:543 +msgid "The size of the new partition exceeds the free space of the selected partition" +msgstr "Размер нового раздела превышает свободное место выбранного раздела" + +#: source/ubl-strings.h:543 +msgid "The size of the new disk partition is larger than the size of the selected partition" +msgstr "Размер нового раздела диска превышает размер выбранного раздела" + +#: source/ubl-strings.h:543 +msgid "There is not enough space to install modules" +msgstr "Недостаточно места для установки модулей" + +#: source/ubl-strings.h:543 +msgid "There is not enough space to install packages" +msgstr "Недостаточно места для установки пакетов" + #: source/ubl-strings.h:543 msgid "Shudown" msgstr "Выключить" diff --git a/source/ubinstall-gtk-advanced.c b/source/ubinstall-gtk-advanced.c index 7d71119..ee838ac 100644 --- a/source/ubinstall-gtk-advanced.c +++ b/source/ubinstall-gtk-advanced.c @@ -565,6 +565,14 @@ int yon_advanced_save(main_window *widgets){ } } } + + if (cur_section->format==2){ + format[0]="yes"; + } else if (cur_section->format == 1){ + format[0]="no"; + } else { + format[0]=NULL; + } if (!yon_char_is_empty(cur_section->partition)){ if (!yon_char_is_empty(cur_section->partition)){ parts[0]=cur_section->partition; @@ -585,58 +593,30 @@ int yon_advanced_save(main_window *widgets){ devices[1]=cur_section->device; } } - if (cur_section->size&&yon_size_long_convert_to_mod(cur_section->full_part_size,cur_section->size_letter)>cur_section->size){ - - char *size_str = yon_char_from_long(cur_section->size); - char *sz_str = yon_char_append_c(size_str,cur_section->size_letter); - part_size[0]=sz_str; - } else { - yon_ubl_status_box_spawn(GTK_CONTAINER(widgets->StatusBox),NOT_ENOUGH_SPACE_LABEL,5,BACKGROUND_IMAGE_FAIL_TYPE); - return 0; - } - if (!yon_char_is_empty(cur_section->part_label)){ - part_label[0]=cur_section->part_label; - } - if (!yon_char_is_empty(cur_section->fs_type)){ - fs_type[0]=cur_section->fs_type; - } - if (!yon_char_is_empty(cur_section->fs_label)){ - fs_label[0]=cur_section->fs_label; - } - if (cur_section->format==2){ - format[0]="yes"; - } else if (cur_section->format == 1){ - format[0]="no"; - } else { - format[0]=NULL; - } - if (!yon_char_is_empty(cur_section->encryption)){ - char *encrypt_str = yon_char_unite(cur_section->encryption,":",cur_section->encryption_password,NULL); - encryption[0]=encrypt_str; - } - if (sections_size>1){ - cur_section = sections[0]->sys_section?sections[1]:sections[0]; - devices[1]=cur_section->device; - if (!yon_char_is_empty(cur_section->partition)){ - parts[1]=cur_section->partition; - } else { - parts[1]=""; - } - if (cur_section->size){ + if (cur_section->format==2){ + if (cur_section->size&&yon_size_long_convert_to_mod(cur_section->full_part_size,cur_section->size_letter)>cur_section->size){ + char *size_str = yon_char_from_long(cur_section->size); char *sz_str = yon_char_append_c(size_str,cur_section->size_letter); - part_size[1]=sz_str; + part_size[0]=sz_str; + } else { + yon_ubl_status_box_spawn(GTK_CONTAINER(widgets->StatusBox),NOT_ENOUGH_SPACE_LABEL,5,BACKGROUND_IMAGE_FAIL_TYPE); + return 0; } if (!yon_char_is_empty(cur_section->part_label)){ - part_label[1]=cur_section->part_label; + part_label[0]=cur_section->part_label; } if (!yon_char_is_empty(cur_section->fs_type)){ - fs_type[1]=cur_section->fs_type; + fs_type[0]=cur_section->fs_type; } if (!yon_char_is_empty(cur_section->fs_label)){ - fs_label[1]=cur_section->fs_label; + fs_label[0]=cur_section->fs_label; } + } + if (sections_size>1){ + cur_section = sections[0]->sys_section?sections[1]:sections[0]; + if (cur_section->format==2){ format[1]="yes"; } else if (cur_section->format==1){ @@ -644,9 +624,33 @@ int yon_advanced_save(main_window *widgets){ } else { format[1] = NULL; } - if (!yon_char_is_empty(cur_section->encryption)){ - char *encrypt_str = yon_char_unite(cur_section->encryption,":",cur_section->encryption_password,NULL); - encryption[1]=encrypt_str; + + devices[1]=cur_section->device; + if (!yon_char_is_empty(cur_section->partition)){ + parts[1]=cur_section->partition; + } else { + parts[1]=""; + } + + if (cur_section->format==2){ + if (cur_section->size){ + char *size_str = yon_char_from_long(cur_section->size); + char *sz_str = yon_char_append_c(size_str,cur_section->size_letter); + part_size[1]=sz_str; + } + if (!yon_char_is_empty(cur_section->part_label)){ + part_label[1]=cur_section->part_label; + } + if (!yon_char_is_empty(cur_section->fs_type)){ + fs_type[1]=cur_section->fs_type; + } + if (!yon_char_is_empty(cur_section->fs_label)){ + fs_label[1]=cur_section->fs_label; + } + if (!yon_char_is_empty(cur_section->encryption)){ + char *encrypt_str = yon_char_unite(cur_section->encryption,":",cur_section->encryption_password,NULL); + encryption[1]=encrypt_str; + } } } diff --git a/source/ubinstall-gtk-config-hub.c b/source/ubinstall-gtk-config-hub.c index b9c32ac..9920f73 100644 --- a/source/ubinstall-gtk-config-hub.c +++ b/source/ubinstall-gtk-config-hub.c @@ -25,8 +25,23 @@ int yon_installation_check_packages_size(main_window *widgets){ modules = yon_char_parsed_to_string(module_names,modules_size,","); } - if (strcmp(install_mode,"fast")){ + if (!strcmp(install_mode,"fast")){ + 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; + } + } + } else if (!strcmp(install_mode,"advanced")) { char *part = config(part_parameter); + part = yon_char_new(part); + char *sys_part = yon_char_divide_search(part,",",-1); + free(part); + part = sys_part; for (int i=0;iDevicesList,&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; + 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); } } long packages_size = 0;