|
|
|
|
@ -22,6 +22,7 @@ void on_pacman_software_all_toggled(GtkWidget *, char *path, main_window *widget
|
|
|
|
|
gtk_list_store_remove(widgets->PacmanSoftwareAllList,&iter);
|
|
|
|
|
gtk_list_store_append(widgets->PacmanSoftwareChosenList,&iter);
|
|
|
|
|
gtk_list_store_set(widgets->PacmanSoftwareChosenList,&iter,0,1,1,name,2,type,3,description,-1);
|
|
|
|
|
g_hash_table_add(widgets->pacmanchosen,yon_char_new(name));
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@ -33,7 +34,7 @@ void on_pacman_software_chosen_toggled(GtkWidget *, char *path, main_window *wid
|
|
|
|
|
gtk_list_store_remove(widgets->PacmanSoftwareChosenList,&iter);
|
|
|
|
|
gtk_list_store_append(widgets->PacmanSoftwareAllList,&iter);
|
|
|
|
|
gtk_list_store_set(widgets->PacmanSoftwareAllList,&iter,0,0,1,name,2,type,3,description,-1);
|
|
|
|
|
|
|
|
|
|
g_hash_table_remove(widgets->pacmanchosen,name);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
gboolean yon_pacman_fill(struct pacman_struct *pacman){
|
|
|
|
|
@ -43,14 +44,14 @@ gboolean yon_pacman_fill(struct pacman_struct *pacman){
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
for (int i=0;i<size;i++){
|
|
|
|
|
yon_char_remove_last_symbol(loaded[i],'\n');
|
|
|
|
|
|
|
|
|
|
int parsed_size;
|
|
|
|
|
config_str parsed = yon_char_parse(loaded[i],&parsed_size,";");
|
|
|
|
|
if (g_hash_table_contains(widgets->pacmanchosen,loaded[i])) continue;
|
|
|
|
|
char *version = yon_packages_get_version(YON_PACKAGES_SYNC,loaded[i]);
|
|
|
|
|
char *description = yon_packages_get_description(YON_PACKAGES_SYNC,loaded[i]);
|
|
|
|
|
GtkTreeIter iter;
|
|
|
|
|
gtk_list_store_append(widgets->PacmanSoftwareAllList,&iter);
|
|
|
|
|
gtk_list_store_set(widgets->PacmanSoftwareAllList,&iter,0,0,1,parsed[0],2,parsed[1],3,parsed[2],-1);
|
|
|
|
|
yon_char_parsed_free(parsed,parsed_size);
|
|
|
|
|
gtk_list_store_set(widgets->PacmanSoftwareAllList,&iter,0,0,1,loaded[i],2,version,3,description,-1);
|
|
|
|
|
if (!yon_char_is_empty(version))free(version);
|
|
|
|
|
if (!yon_char_is_empty(description)) free(description);
|
|
|
|
|
}
|
|
|
|
|
yon_char_parsed_free(loaded,size);
|
|
|
|
|
gtk_widget_set_sensitive(widgets->PacmanSoftwareSearchEntry,1);
|
|
|
|
|
@ -63,8 +64,8 @@ gboolean yon_pacman_fill(struct pacman_struct *pacman){
|
|
|
|
|
|
|
|
|
|
void *yon_pacman_load(struct pacman_struct *pacman){
|
|
|
|
|
const char *find_package = pacman->find_package;
|
|
|
|
|
char *command = get_local_module_info_command(find_package);
|
|
|
|
|
pacman->packages = yon_config_load(yon_debug_output("%s\n",command),&pacman->packages_size);
|
|
|
|
|
// char *command = get_local_module_info_command(find_package);
|
|
|
|
|
pacman->packages = yon_packages_find(YON_PACKAGES_SYNC,find_package,&pacman->packages_size);
|
|
|
|
|
g_idle_add((GSourceFunc)yon_pacman_fill,pacman);
|
|
|
|
|
return NULL;
|
|
|
|
|
}
|
|
|
|
|
@ -150,6 +151,7 @@ void config_init(){
|
|
|
|
|
main_config.log_progress_buzy=0;
|
|
|
|
|
main_config.log_end=0;
|
|
|
|
|
main_config.exit_accepted=0;
|
|
|
|
|
yon_packages_init();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// void on_root_get_root(char *argline){
|
|
|
|
|
@ -507,6 +509,7 @@ main_window *yon_main_window_complete(){
|
|
|
|
|
widgets->HostnameSensitiveCheck = yon_gtk_builder_get_widget(builder,"HostnameSensitiveCheck");
|
|
|
|
|
widgets->AutoHostnameCheck=yon_gtk_builder_get_widget(builder,"AutoHostnameCheck");
|
|
|
|
|
widgets->network_connections = NULL;
|
|
|
|
|
widgets->pacmanchosen = g_hash_table_new_full(g_str_hash,g_str_equal,free,NULL);
|
|
|
|
|
|
|
|
|
|
main_config.status_box = widgets->StatusBox;
|
|
|
|
|
}
|
|
|
|
|
@ -747,16 +750,20 @@ main_window *yon_main_window_complete(){
|
|
|
|
|
int base_size;
|
|
|
|
|
config_str base = yon_file_ls(system_base_modules_path,&base_size);
|
|
|
|
|
for (int i=0;i<base_size;i++){
|
|
|
|
|
char *version = yon_packages_get_version(YON_PACKAGES_SYNC,base[i]);
|
|
|
|
|
char *description = yon_packages_get_description(YON_PACKAGES_SYNC,base[i]);
|
|
|
|
|
yon_char_remove_last_symbol(base[i],'\n');
|
|
|
|
|
gtk_list_store_append(widgets->OSSoftwareList,&iter);
|
|
|
|
|
gtk_list_store_set(widgets->OSSoftwareList,&iter,0,0,1,base[i],-1);
|
|
|
|
|
gtk_list_store_set(widgets->OSSoftwareList,&iter,0,0,1,base[i],2,version,3,description,-1);
|
|
|
|
|
}
|
|
|
|
|
int modules_size;
|
|
|
|
|
config_str modules = yon_file_ls(system_modules_path,&modules_size);
|
|
|
|
|
for (int i=0;i<modules_size;i++){
|
|
|
|
|
yon_char_remove_last_symbol(modules[i],'\n');
|
|
|
|
|
gtk_list_store_append(widgets->OSSoftwareList,&iter);
|
|
|
|
|
gtk_list_store_set(widgets->OSSoftwareList,&iter,0,0,1,modules[i],-1);
|
|
|
|
|
char *version = yon_packages_get_version(YON_PACKAGES_SYNC,base[i]);
|
|
|
|
|
char *description = yon_packages_get_description(YON_PACKAGES_SYNC,base[i]);
|
|
|
|
|
gtk_list_store_set(widgets->OSSoftwareList,&iter,0,0,1,modules[i],2,version,3,description,-1);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|