|
|
|
|
@ -117,13 +117,22 @@ void yon_advanced_partition_set_from_section(advanced_partition *part, advanced_
|
|
|
|
|
else part->part_type = ADVANCED_PART_EXISTING;
|
|
|
|
|
if (section->format){
|
|
|
|
|
gtk_switch_set_active(GTK_SWITCH(part->FormatSwitch),1);
|
|
|
|
|
gtk_spin_button_set_value(GTK_SPIN_BUTTON(part->SizeSpin),section->size);
|
|
|
|
|
gtk_combo_box_set_active(GTK_COMBO_BOX(part->SizeCombo),yon_get_size_get_from_letter(section->size_letter));
|
|
|
|
|
gtk_entry_set_text(GTK_ENTRY(part->PartLabelEntry),section->part_label);
|
|
|
|
|
gtk_entry_set_text(GTK_ENTRY(part->FileSystemLabelEntry),section->fs_label);
|
|
|
|
|
gtk_combo_box_set_active_id(GTK_COMBO_BOX(part->FileSystemTypeCombo),section->fs_type);
|
|
|
|
|
gtk_combo_box_set_active_id(GTK_COMBO_BOX(part->EncryptionCombo),section->encryption);
|
|
|
|
|
gtk_entry_set_text(GTK_ENTRY(part->EncryptionEntry),section->encryption_password);
|
|
|
|
|
if (section->size){
|
|
|
|
|
gtk_spin_button_set_value(GTK_SPIN_BUTTON(part->SizeSpin),section->size);
|
|
|
|
|
gtk_combo_box_set_active(GTK_COMBO_BOX(part->SizeCombo),yon_get_size_get_from_letter(section->size_letter));
|
|
|
|
|
}
|
|
|
|
|
if (section->part_label){
|
|
|
|
|
gtk_entry_set_text(GTK_ENTRY(part->PartLabelEntry),section->part_label);
|
|
|
|
|
}
|
|
|
|
|
if (section->fs_label)
|
|
|
|
|
gtk_entry_set_text(GTK_ENTRY(part->FileSystemLabelEntry),section->fs_label);
|
|
|
|
|
if (!yon_char_is_empty(section->fs_type)){
|
|
|
|
|
gtk_combo_box_set_active_id(GTK_COMBO_BOX(part->FileSystemTypeCombo),section->fs_type);
|
|
|
|
|
}
|
|
|
|
|
if (!yon_char_is_empty(section->encryption)){
|
|
|
|
|
gtk_combo_box_set_active_id(GTK_COMBO_BOX(part->EncryptionCombo),section->encryption);
|
|
|
|
|
gtk_entry_set_text(GTK_ENTRY(part->EncryptionEntry),section->encryption_password);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
@ -499,14 +508,25 @@ int yon_advanced_save(main_window *widgets){
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
advanced_section *cur_section = sections[0]->sys_section?sections[0]:sections[1];
|
|
|
|
|
devices[0]=cur_section->device;
|
|
|
|
|
if (cur_section->user_section){
|
|
|
|
|
devices[1]=cur_section->device;
|
|
|
|
|
}
|
|
|
|
|
if (!yon_char_is_empty(cur_section->partition)){
|
|
|
|
|
parts[0]=cur_section->partition;
|
|
|
|
|
if (!yon_char_is_empty(cur_section->partition)){
|
|
|
|
|
parts[0]=cur_section->partition;
|
|
|
|
|
} else {
|
|
|
|
|
parts[0]="";
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
parts[0]="";
|
|
|
|
|
devices[0]=cur_section->device;
|
|
|
|
|
}
|
|
|
|
|
if (cur_section->user_section){
|
|
|
|
|
if (!yon_char_is_empty(cur_section->device)){
|
|
|
|
|
if (!yon_char_is_empty(cur_section->partition)){
|
|
|
|
|
parts[1]=cur_section->partition;
|
|
|
|
|
} else {
|
|
|
|
|
parts[1]="";
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
devices[1]=cur_section->device;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if (cur_section->size){
|
|
|
|
|
char *size_str = yon_char_from_long(cur_section->size);
|
|
|
|
|
@ -567,41 +587,39 @@ int yon_advanced_save(main_window *widgets){
|
|
|
|
|
|
|
|
|
|
if (devices[0]||devices[1]){
|
|
|
|
|
char *devices_str = yon_char_parsed_to_string_full(devices,2,",");
|
|
|
|
|
yon_config_register(AUTOINSTALL_DEVICE,AUTOINSTALL_DEVICE_command,devices_str);
|
|
|
|
|
yon_config_register(AUTOINSTALL_DEVICE,AUTOINSTALL_DEVICE_command,devices_str);
|
|
|
|
|
}
|
|
|
|
|
if (!yon_char_is_empty(parts[0])||!yon_char_is_empty(parts[1])){
|
|
|
|
|
char *parts_str = yon_char_parsed_to_string_full(parts,2,",");
|
|
|
|
|
yon_config_register(part_parameter,part_parameter_command,parts_str);
|
|
|
|
|
|
|
|
|
|
yon_config_register(part_parameter,part_parameter_command,parts_str);
|
|
|
|
|
}
|
|
|
|
|
if (part_size[0]||part_size[1]){
|
|
|
|
|
char *part_size_str = yon_char_parsed_to_string_full(part_size,2,",");
|
|
|
|
|
yon_config_register(part_size_parameter,part_size_parameter_command,part_size_str);
|
|
|
|
|
|
|
|
|
|
yon_config_register(part_size_parameter,part_size_parameter_command,part_size_str);
|
|
|
|
|
}
|
|
|
|
|
if (part_label[0]||part_label[1]){
|
|
|
|
|
char *part_label_str = yon_char_parsed_to_string_full(part_label,2,",");
|
|
|
|
|
yon_config_register(part_label_parameter,part_label_parameter_command,part_label_str);
|
|
|
|
|
yon_config_register(part_label_parameter,part_label_parameter_command,part_label_str);
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
if (fs_type[0]||fs_type[1]){
|
|
|
|
|
char *fs_type_str = yon_char_parsed_to_string_full(fs_type,2,",");
|
|
|
|
|
yon_config_register(part_fs_type_parameter,part_fs_type_parameter_command,fs_type_str);
|
|
|
|
|
yon_config_register(part_fs_type_parameter,part_fs_type_parameter_command,fs_type_str);
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
if (fs_label[0]||fs_label[1]){
|
|
|
|
|
char *fs_label_str = yon_char_parsed_to_string_full(fs_label,2,",");
|
|
|
|
|
yon_config_register(part_fs_label_parameter,part_fs_label_parameter_command,fs_label_str);
|
|
|
|
|
yon_config_register(part_fs_label_parameter,part_fs_label_parameter_command,fs_label_str);
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
if (encryption[0]||encryption[1]){
|
|
|
|
|
char *encryption_str = yon_char_parsed_to_string_full(encryption,2,",");
|
|
|
|
|
yon_config_register(part_crypt_parameter,part_crypt_parameter_command,encryption_str);
|
|
|
|
|
yon_config_register(part_crypt_parameter,part_crypt_parameter_command,encryption_str);
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
if (format[0]||format[1]){
|
|
|
|
|
char *format_str = yon_char_parsed_to_string_full(format,2,",");
|
|
|
|
|
yon_config_register(part_format_parameter,part_format_parameter_command,format_str);
|
|
|
|
|
yon_config_register(part_format_parameter,part_format_parameter_command,format_str);
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
if (gtk_switch_get_active(GTK_SWITCH(widgets->AdvancedLoadTypeSwitch))){
|
|
|
|
|
@ -651,7 +669,8 @@ void yon_advanced_part_parameter_changed(GtkWidget *self, advanced_partition *pa
|
|
|
|
|
advanced_section *section = sections[yon_advanced_section_get_by_part(part)];
|
|
|
|
|
if (self == part->SizeCombo||self == part->SizeSpin){
|
|
|
|
|
section->size = gtk_spin_button_get_value(GTK_SPIN_BUTTON(part->SizeSpin));
|
|
|
|
|
section->size_letter = *yon_size_get_mod(gtk_combo_box_get_active(GTK_COMBO_BOX(part->SizeCombo)));
|
|
|
|
|
int size_id = gtk_combo_box_get_active(GTK_COMBO_BOX(part->SizeCombo));
|
|
|
|
|
section->size_letter = *yon_size_get_mod(size_id>-1?size_id:0);
|
|
|
|
|
} else if (self == part->PartLabelEntry){
|
|
|
|
|
section->part_label = yon_char_new(gtk_entry_get_text(GTK_ENTRY(part->PartLabelEntry)));
|
|
|
|
|
} else if (self == part->FileSystemTypeCombo){
|
|
|
|
|
|