Advanced installation page format fix

pull/239/head
parent 8209489895
commit 9dcbc8fdb9

@ -116,7 +116,7 @@ void yon_advanced_partition_set_from_section(advanced_partition *part, advanced_
if (!yon_char_is_empty(part->part)) part->part_type = ADVANCED_PART_NEW;
else part->part_type = ADVANCED_PART_EXISTING;
if (section->format){
gtk_switch_set_active(GTK_SWITCH(part->FormatCombo),1);
gtk_combo_box_set_active(GTK_COMBO_BOX(part->FormatCombo),section->format);
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)-1);
@ -157,7 +157,7 @@ void yon_advanced_update(main_window *widgets){
gtk_image_set_from_icon_name(GTK_IMAGE(UserImage),toggled_icon_name,GTK_ICON_SIZE_BUTTON);
}
yon_advanced_partition_set_from_section(part,sections[i]);
yon_advanced_set_max_size_from_partition(part,widgets);
// yon_advanced_set_max_size_from_partition(part,widgets);
gtk_box_pack_start(GTK_BOX(widgets->AdvancedPartitionAddBox),part->MainBox,0,0,0);
g_signal_handlers_block_by_func(G_OBJECT(widgets->AdvancedVirtualDeviceCombo),G_CALLBACK(on_advanced_virtual_device_changed),widgets);
if (!virtual_found&&gtk_combo_box_set_active_id(GTK_COMBO_BOX(widgets->AdvancedVirtualDeviceCombo),sections[i]->part_source==PART_SOURCE_PART?sections[i]->partition:sections[i]->device)){
@ -389,9 +389,9 @@ void yon_advanced_set_max_size_from_partition(advanced_partition *part, main_win
}
}
void on_advanced_size_changed(GtkWidget *self,main_window *widgets){
advanced_partition *part = g_object_get_data(G_OBJECT(self),"advanced_partition");
yon_advanced_set_max_size_from_partition(part,widgets);
void on_advanced_size_changed(GtkWidget *,main_window *){
// advanced_partition *part = g_object_get_data(G_OBJECT(self),"advanced_partition");
// yon_advanced_set_max_size_from_partition(part,widgets);
}
void on_install_advanced_device_chosen(GtkCellRenderer *, gchar *path, main_window *widgets){
@ -600,10 +600,12 @@ int yon_advanced_save(main_window *widgets){
if (!yon_char_is_empty(cur_section->fs_label)){
fs_label[0]=cur_section->fs_label;
}
if (cur_section->format){
if (cur_section->format==2){
format[0]="yes";
} else {
} 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);
@ -632,10 +634,12 @@ int yon_advanced_save(main_window *widgets){
if (!yon_char_is_empty(cur_section->fs_label)){
fs_label[1]=cur_section->fs_label;
}
if (cur_section->format){
if (cur_section->format==2){
format[1]="yes";
} else {
} else if (cur_section->format==1){
format[1]="no";
} 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);

@ -1096,7 +1096,7 @@ typedef struct
char *device;
int sys_section;
int user_section;
gboolean format;
int format;
gulong full_part_size;
unsigned long size;
char size_letter;

Loading…
Cancel
Save