Modules are removing package dependances as well

pull/48/head
parent 4ac5219530
commit c77202bb19

@ -612,6 +612,16 @@ void on_module_remove_accept(GtkWidget *, dictionary *dict){
char *package;
gtk_tree_model_get(GTK_TREE_MODEL(window->liststore1),&iter,0,&status,1,&package,-1);
if (status){
if (strstr(package,",")){
int parsed_size;
config_str parsed = yon_char_parse(package,&parsed_size,",");
package = "";
for (int i=0;i<parsed_size;i++){
char *temp = yon_char_unite(package," ",parsed[i],NULL);
if (!yon_char_is_empty(package)) free(package);
package = temp;
}
}
char *temp = yon_char_unite(modules_to_install," ", package, NULL);
if (strcmp(modules_to_install,module_formated)) free(modules_to_install);
modules_to_install = temp;
@ -843,10 +853,9 @@ void on_module_remove_clicked(GtkWidget *self,dictionary *dict){
int cur_size;
config_str parsed = yon_char_parse(additions[j],&cur_size,";");
if (!strcmp(parsed[1],tab->module_requirements[i]))
gtk_list_store_set(window->liststore1,&iter,2,parsed[3],-1);
gtk_list_store_set(window->liststore1,&iter,1,yon_char_unite(parsed[1],",",parsed[2],NULL),2,parsed[3],-1);
yon_char_parsed_free(parsed,cur_size);
}
gtk_list_store_set(window->liststore1,&iter,0,1,1,tab->module_requirements[i],-1);
}
}
yon_char_parsed_free(additions,size);

Loading…
Cancel
Save