|
|
|
@ -147,7 +147,7 @@ void yon_advanced_update(main_window *widgets){
|
|
|
|
g_signal_connect(G_OBJECT(part->RemoveButton),"clicked",G_CALLBACK(on_advanced_part_remove),widgets);
|
|
|
|
g_signal_connect(G_OBJECT(part->RemoveButton),"clicked",G_CALLBACK(on_advanced_part_remove),widgets);
|
|
|
|
g_signal_connect(G_OBJECT(part->SystemSectionToggle),"clicked",G_CALLBACK(on_advanced_section_toggled),widgets);
|
|
|
|
g_signal_connect(G_OBJECT(part->SystemSectionToggle),"clicked",G_CALLBACK(on_advanced_section_toggled),widgets);
|
|
|
|
g_signal_connect(G_OBJECT(part->UserDataSectionToggle),"clicked",G_CALLBACK(on_advanced_section_toggled),widgets);
|
|
|
|
g_signal_connect(G_OBJECT(part->UserDataSectionToggle),"clicked",G_CALLBACK(on_advanced_section_toggled),widgets);
|
|
|
|
g_signal_connect(G_OBJECT(part->SizeCombo),"changed",G_CALLBACK(on_advanced_size_changed),widgets);
|
|
|
|
// g_signal_connect(G_OBJECT(part->SizeCombo),"changed",G_CALLBACK(on_advanced_size_changed),widgets);
|
|
|
|
if (i==0){
|
|
|
|
if (i==0){
|
|
|
|
gtk_widget_set_sensitive(part->SystemSectionToggle,0);
|
|
|
|
gtk_widget_set_sensitive(part->SystemSectionToggle,0);
|
|
|
|
gtk_widget_set_sensitive(part->UserDataSectionToggle,0);
|
|
|
|
gtk_widget_set_sensitive(part->UserDataSectionToggle,0);
|
|
|
|
@ -277,22 +277,24 @@ void on_install_advanced_partition_chosen(GtkCellRenderer*, gchar *path, main_wi
|
|
|
|
gtk_tree_model_get_iter_from_string(model,&iter,path);
|
|
|
|
gtk_tree_model_get_iter_from_string(model,&iter,path);
|
|
|
|
int status;
|
|
|
|
int status;
|
|
|
|
char *target_part, *device;
|
|
|
|
char *target_part, *device;
|
|
|
|
gtk_tree_model_get(model,&iter,0,&target_part,7,&status,9,&device,-1);
|
|
|
|
gulong part_size;
|
|
|
|
|
|
|
|
gtk_tree_model_get(model,&iter,0,&target_part,5,&part_size,7,&status,9,&device,-1);
|
|
|
|
|
|
|
|
|
|
|
|
if (!status){
|
|
|
|
if (!status){
|
|
|
|
if (chosen<2){
|
|
|
|
if (chosen<2){
|
|
|
|
gtk_list_store_set(widgets->PartitionsList,&iter,7,!status,-1);
|
|
|
|
gtk_list_store_set(widgets->PartitionsList,&iter,7,1,-1);
|
|
|
|
chosen++;
|
|
|
|
chosen++;
|
|
|
|
advanced_section *section = yon_advanced_section_new();
|
|
|
|
advanced_section *section = yon_advanced_section_new();
|
|
|
|
section->part_source = PART_SOURCE_PART;
|
|
|
|
section->part_source = PART_SOURCE_PART;
|
|
|
|
section->partition = target_part;
|
|
|
|
section->partition = target_part;
|
|
|
|
section->device = NULL;
|
|
|
|
section->device = NULL;
|
|
|
|
|
|
|
|
section->full_part_size = part_size;
|
|
|
|
sections[sections_size]=section;
|
|
|
|
sections[sections_size]=section;
|
|
|
|
sections_size++;
|
|
|
|
sections_size++;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
gtk_list_store_set(widgets->PartitionsList,&iter,7,!status,-1);
|
|
|
|
|
|
|
|
yon_advanced_section_remove_by_name(target_part);
|
|
|
|
yon_advanced_section_remove_by_name(target_part);
|
|
|
|
|
|
|
|
gtk_list_store_set(widgets->PartitionsList,&iter,7,0,-1);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
yon_advanced_update(widgets);
|
|
|
|
yon_advanced_update(widgets);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@ -580,10 +582,14 @@ int yon_advanced_save(main_window *widgets){
|
|
|
|
devices[1]=cur_section->device;
|
|
|
|
devices[1]=cur_section->device;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (cur_section->size){
|
|
|
|
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 *size_str = yon_char_from_long(cur_section->size);
|
|
|
|
char *sz_str = yon_char_append_c(size_str,cur_section->size_letter);
|
|
|
|
char *sz_str = yon_char_append_c(size_str,cur_section->size_letter);
|
|
|
|
part_size[0]=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)){
|
|
|
|
if (!yon_char_is_empty(cur_section->part_label)){
|
|
|
|
part_label[0]=cur_section->part_label;
|
|
|
|
part_label[0]=cur_section->part_label;
|
|
|
|
|