|
|
|
|
@ -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;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|