Added advanced installation fs type field

pull/238/head
parent 14e06a062c
commit 22e43b3017

@ -604,35 +604,49 @@ int yon_advanced_save(main_window *widgets){
if (!yon_char_is_empty(parts[0])||!yon_char_is_empty(parts[1])){ if (!yon_char_is_empty(parts[0])||!yon_char_is_empty(parts[1])){
char *parts_str = yon_char_parsed_to_string_full(parts,2,","); 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);
} else {
yon_config_remove_by_key(part_parameter);
} }
if (part_size[0]||part_size[1]){ if (part_size[0]||part_size[1]){
char *part_size_str = yon_char_parsed_to_string_full(part_size,2,","); 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);
} else {
yon_config_remove_by_key(part_size_parameter);
} }
if (part_label[0]||part_label[1]){ if (part_label[0]||part_label[1]){
char *part_label_str = yon_char_parsed_to_string_full(part_label,2,","); 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);
} else {
yon_config_remove_by_key(part_label_parameter);
} }
if (fs_type[0]||fs_type[1]){ if (fs_type[0]||fs_type[1]){
char *fs_type_str = yon_char_parsed_to_string_full(fs_type,2,","); 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);
} else {
yon_config_remove_by_key(part_fs_type_parameter);
} }
if (fs_label[0]||fs_label[1]){ if (fs_label[0]||fs_label[1]){
char *fs_label_str = yon_char_parsed_to_string_full(fs_label,2,","); 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);
} else {
yon_config_remove_by_key(part_fs_label_parameter);
} }
if (encryption[0]||encryption[1]){ if (encryption[0]||encryption[1]){
char *encryption_str = yon_char_parsed_to_string_full(encryption,2,","); 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);
} else {
yon_config_remove_by_key(part_crypt_parameter);
} }
if (format[0]||format[1]){ if (format[0]||format[1]){
char *format_str = yon_char_parsed_to_string_full(format,2,","); 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);
} else {
yon_config_remove_by_key(part_format_parameter);
} }
if (gtk_switch_get_active(GTK_SWITCH(widgets->AdvancedLoadTypeSwitch))){ if (gtk_switch_get_active(GTK_SWITCH(widgets->AdvancedLoadTypeSwitch))){
char *boot = NULL; char *boot = NULL;
@ -686,7 +700,13 @@ void yon_advanced_part_parameter_changed(GtkWidget *self, advanced_partition *pa
} else if (self == part->PartLabelEntry){ } else if (self == part->PartLabelEntry){
section->part_label = yon_char_new(gtk_entry_get_text(GTK_ENTRY(part->PartLabelEntry))); section->part_label = yon_char_new(gtk_entry_get_text(GTK_ENTRY(part->PartLabelEntry)));
} else if (self == part->FileSystemTypeCombo){ } else if (self == part->FileSystemTypeCombo){
section->fs_type = yon_char_new(gtk_combo_box_get_active_id(GTK_COMBO_BOX(part->FileSystemTypeCombo))); if (!gtk_combo_box_get_active(GTK_COMBO_BOX(part->FileSystemTypeCombo))){
section->fs_type = NULL;
} else {
GList *list = gtk_container_get_children(GTK_CONTAINER(part->FileSystemTypeCombo));
section->fs_type = yon_char_new(gtk_entry_get_text(GTK_ENTRY(list->data)));
g_list_free(list);
}
} else if (self == part->FileSystemLabelEntry){ } else if (self == part->FileSystemLabelEntry){
section->fs_label = yon_char_new(gtk_entry_get_text(GTK_ENTRY(part->FileSystemLabelEntry))); section->fs_label = yon_char_new(gtk_entry_get_text(GTK_ENTRY(part->FileSystemLabelEntry)));
} else if (self == part->EncryptionCombo||self == part->EncryptionEntry){ } else if (self == part->EncryptionCombo||self == part->EncryptionEntry){

@ -398,6 +398,7 @@
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">False</property> <property name="can-focus">False</property>
<property name="active">0</property> <property name="active">0</property>
<property name="has-entry">True</property>
<items> <items>
<item translatable="yes">Default</item> <item translatable="yes">Default</item>
</items> </items>
@ -466,13 +467,6 @@
<widget name="FileSystemLabelEntry"/> <widget name="FileSystemLabelEntry"/>
</widgets> </widgets>
</object> </object>
<object class="GtkSizeGroup">
<widgets>
<widget name="box1"/>
<widget name="EncryptionCombo"/>
<widget name="FileSystemTypeCombo"/>
</widgets>
</object>
<object class="GtkSizeGroup"> <object class="GtkSizeGroup">
<widgets> <widgets>
<widget name="label1"/> <widget name="label1"/>

Loading…
Cancel
Save