You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ubinstall-gtk/source/ubl-settings-advanced.c

64 lines
1.3 KiB

#include "ubinstall-gtk.h"
typedef struct {
char *section;
int sys_section;
int user_section;
int format;
int size;
char size_letter;
char *part_label;
char *fs_type;
char *fs_label;
char *encryption;
char *encryption_password;
} advanced_section;
int sections_size=0;
advanced_section *sections[2] = {NULL};
advanced_section *yon_advanced_section_new(){
if (sections_size>=2) return NULL;
advanced_section *section = malloc(sizeof(advanced_section));
memset(section,0,sizeof(advanced_section));
sections[sections_size] = section;
sections_size++;
return section;
}
void yon_advanced_section_remove(int pos){
switch(pos){
case 0:
free(sections[0]);
if (sections[1]){
sections[0]=sections[1];
sections[1]=NULL;
} else {
sections[0]=NULL;
}
sections_size--;
break;
case 1:
if (sections[1]){
free(sections[1]);
sections[1]=NULL;
sections_size--;
}
break;
default: return;
}
}
// add section from tree view
void yon_advanced_add(main_window *widgets){
}
//new section from button
void yon_advanced_new(main_window *widgets){
}