Advanced format combo fixes

pull/227/head
parent df6212a01a
commit dd47c48d54

@ -693,14 +693,7 @@ void yon_advanced_part_parameter_changed(GtkWidget *self, advanced_partition *pa
section->encryption = yon_char_new(gtk_combo_box_get_active_id(GTK_COMBO_BOX(part->EncryptionCombo)));
section->encryption_password = yon_char_new(gtk_entry_get_text(GTK_ENTRY(part->EncryptionEntry)));
} else if (self == part->FormatCombo){
int format_active = gtk_combo_box_get_active(GTK_COMBO_BOX(part->FormatCombo));
if (format_active == 2){
section->format=2;
} else if (format_active == 1){
section->format=1;
} else {
section->format=0;
}
section->format = gtk_combo_box_get_active(GTK_COMBO_BOX(part->FormatCombo));
}
}
@ -743,8 +736,8 @@ advanced_partition *yon_advanced_partition_new(){
gtk_combo_box_text_append(GTK_COMBO_BOX_TEXT(part->SizeCombo),"T",_("Tb"));
gtk_combo_box_set_active(GTK_COMBO_BOX(part->SizeCombo),0);
gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(part->FormatCombo),DEFAULT_LABEL);
gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(part->FormatCombo),DO_NOT_FORMAT_LABEL);
gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(part->FormatCombo),AUTOMATIC_FORMAT_LABEL);
gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(part->FormatCombo),FORMAT_LABEL);
gtk_combo_box_set_active(GTK_COMBO_BOX(part->FormatCombo),0);

@ -194,8 +194,10 @@ int yon_advanced_sections_save(dictionary *dict){
char *part = yon_char_unite(part_first,last_section?",":NULL,part_last,NULL);
yon_config_register(part_parameter,part_parameter_command,part);
char * format_first = gtk_switch_get_active(GTK_SWITCH(first_section->FormatCombo))?"yes":"no";
char * format_last = last_section?gtk_switch_get_active(GTK_SWITCH(last_section->FormatCombo))?"yes":"no":NULL;
int format_first_active = gtk_switch_get_active(GTK_SWITCH(first_section->FormatCombo));
int format_last_active = gtk_switch_get_active(GTK_SWITCH(last_section->FormatCombo));
char * format_first = format_first_active==1?"yes":format_first_active==2?"no":NULL;
char * format_last = format_last_active==1?"yes":format_last_active==2?"no":NULL;
char *format = yon_char_unite(format_first,part_last?",":NULL,format_last,NULL);
yon_config_register(part_format_parameter,part_format_parameter_command,format);

@ -3840,6 +3840,7 @@ agreement</property>
<child>
<object class="GtkEntry" id="RegionEntry">
<property name="visible">True</property>
<property name="sensitive">False</property>
<property name="can-focus">True</property>
<property name="completion">entrycompletion1</property>
</object>

Loading…
Cancel
Save