|
|
|
@ -94,7 +94,7 @@ int yon_os_components_save(main_window *widgets){
|
|
|
|
config_str modules = NULL;
|
|
|
|
config_str modules = NULL;
|
|
|
|
for(iter = list;iter;iter=iter->next){
|
|
|
|
for(iter = list;iter;iter=iter->next){
|
|
|
|
os_row *row = g_object_get_data(iter->data,"kernel_row");
|
|
|
|
os_row *row = g_object_get_data(iter->data,"kernel_row");
|
|
|
|
char *target = row->name;
|
|
|
|
char *target = row->source;
|
|
|
|
int status = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(row->InstallCheck));
|
|
|
|
int status = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(row->InstallCheck));
|
|
|
|
if (status){
|
|
|
|
if (status){
|
|
|
|
yon_char_parsed_add_or_create_if_exists(modules,&size,target);
|
|
|
|
yon_char_parsed_add_or_create_if_exists(modules,&size,target);
|
|
|
|
@ -177,6 +177,7 @@ void *yon_modules_list_load(main_window *widgets){
|
|
|
|
|
|
|
|
|
|
|
|
void yon_os_row_setup(os_row *row, char *name, char *version,char *tags, char *description,char *source, char *size){
|
|
|
|
void yon_os_row_setup(os_row *row, char *name, char *version,char *tags, char *description,char *source, char *size){
|
|
|
|
row->name = yon_char_new(name);
|
|
|
|
row->name = yon_char_new(name);
|
|
|
|
|
|
|
|
row->source = yon_char_new(source);
|
|
|
|
|
|
|
|
|
|
|
|
char *description_full = yon_char_new(description);
|
|
|
|
char *description_full = yon_char_new(description);
|
|
|
|
if (yon_char_is_empty(source)||yon_char_check_begins_with(source,"(local)/")){
|
|
|
|
if (yon_char_is_empty(source)||yon_char_check_begins_with(source,"(local)/")){
|
|
|
|
@ -219,29 +220,6 @@ void yon_modules_missed_func(main_window *widgets){
|
|
|
|
yon_ubl_status_box_spawn(GTK_CONTAINER(widgets->StatusBox),MAIN_COMPONENTS_NOT_FOUND_LABEL,5,BACKGROUND_IMAGE_FAIL_TYPE);
|
|
|
|
yon_ubl_status_box_spawn(GTK_CONTAINER(widgets->StatusBox),MAIN_COMPONENTS_NOT_FOUND_LABEL,5,BACKGROUND_IMAGE_FAIL_TYPE);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void *yon_os_components_setup(main_window *widgets){
|
|
|
|
|
|
|
|
int base_size;
|
|
|
|
|
|
|
|
config_str base = yon_config_load(get_modules_command,&base_size);
|
|
|
|
|
|
|
|
for (int i=0;i<base_size;i++){
|
|
|
|
|
|
|
|
yon_char_remove_last_symbol(base[i],'\n');
|
|
|
|
|
|
|
|
int parsed_size;
|
|
|
|
|
|
|
|
config_str parsed = yon_char_parse(base[i],&parsed_size,";");
|
|
|
|
|
|
|
|
struct row_data *row = malloc(sizeof(struct row_data));
|
|
|
|
|
|
|
|
row->version = parsed[1];
|
|
|
|
|
|
|
|
row->name = parsed[0];
|
|
|
|
|
|
|
|
row->tags = yon_char_replace(parsed[2]," ",", ");
|
|
|
|
|
|
|
|
row->description = parsed[3];
|
|
|
|
|
|
|
|
row->widgets=widgets;
|
|
|
|
|
|
|
|
g_idle_add((GSourceFunc)yon_os_component_insert,row);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
g_idle_add((GSourceFunc)yon_spinner_switch_off,widgets->OSSpinner);
|
|
|
|
|
|
|
|
if (!base_size){
|
|
|
|
|
|
|
|
g_idle_add_once((GSourceOnceFunc)yon_modules_missed_func,widgets);
|
|
|
|
|
|
|
|
return NULL;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
yon_char_parsed_free(base,base_size);
|
|
|
|
|
|
|
|
return NULL;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void yon_os_components_init(main_window *widgets){
|
|
|
|
void yon_os_components_init(main_window *widgets){
|
|
|
|
int size = 0;
|
|
|
|
int size = 0;
|
|
|
|
|