|
|
|
|
@ -100,7 +100,9 @@ void on_about(){
|
|
|
|
|
|
|
|
|
|
void on_load(){
|
|
|
|
|
gsize size=0;
|
|
|
|
|
gsize sigsize=0;
|
|
|
|
|
config_str repos = yon_window_config_get_section("repos",&size);
|
|
|
|
|
config_str signatures = yon_window_config_get_section("signatures",&sigsize);
|
|
|
|
|
gtk_tree_store_clear(main_config.tree_store);
|
|
|
|
|
for (int i=0;i<size;i++){
|
|
|
|
|
char *name = yon_char_new(repos[i]);
|
|
|
|
|
@ -116,6 +118,8 @@ void on_load(){
|
|
|
|
|
config_str packs = yon_char_parse(parameter_string,&packsize," ");
|
|
|
|
|
GtkTreeIter packIter;
|
|
|
|
|
if (!packs){
|
|
|
|
|
char *pack_signed = NULL;
|
|
|
|
|
yon_window_config_get_parameter("signatures",parameter_string,&pack_signed,YON_TYPE_STRING);
|
|
|
|
|
FILE *file = popen(get_saved_package_info_command(path,parameter_string),"r");
|
|
|
|
|
char *cur_string=g_malloc0(sizeof(char)*4096);
|
|
|
|
|
char *packname=NULL, *packver=NULL, *packarch=NULL, *packdepends=NULL;
|
|
|
|
|
@ -128,11 +132,13 @@ void on_load(){
|
|
|
|
|
else if (strstr(p,"Depends On")) packdepends = yon_char_new(steer);
|
|
|
|
|
}
|
|
|
|
|
gtk_tree_store_append(main_config.tree_store,&packIter,&iter);
|
|
|
|
|
gtk_tree_store_set(main_config.tree_store,&packIter,0,document_no_edits,1,yon_char_unite(packname,"-",packver,"-",packarch,NULL),2,yon_char_unite(path,"/pool/overlay/",parameter_string,NULL),3,0,4,0,9,packname,10,packver,11,packarch,12,packdepends,-1);
|
|
|
|
|
gtk_tree_store_set(main_config.tree_store,&packIter,0,document_no_edits,1,yon_char_unite(packname,"-",packver,"-",packarch,NULL),2,yon_char_unite(path,"/pool/overlay/",parameter_string,NULL),3,0,4,0,9,packname,10,packver,11,packarch,12,packdepends,13,pack_signed,-1);
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
for (int j=0;j<packsize;j++){
|
|
|
|
|
char *command = get_saved_package_info_command(path,packs[j]);
|
|
|
|
|
char *command = get_saved_package_info_command(path,packs[j]);
|
|
|
|
|
char *pack_signed = NULL;
|
|
|
|
|
yon_window_config_get_parameter("signatures",packs[j],&pack_signed,YON_TYPE_STRING);
|
|
|
|
|
FILE *file = popen(command,"r");
|
|
|
|
|
char *cur_string=g_malloc0(sizeof(char)*4096);
|
|
|
|
|
char *packname=NULL, *packver=NULL, *packarch=NULL, *packdepends=NULL;
|
|
|
|
|
@ -145,7 +151,7 @@ void on_load(){
|
|
|
|
|
else if (strstr(p,"Depends On")) packdepends = yon_char_new(steer);
|
|
|
|
|
}
|
|
|
|
|
gtk_tree_store_append(main_config.tree_store,&packIter,&iter);
|
|
|
|
|
gtk_tree_store_set(main_config.tree_store,&packIter,0,document_no_edits,1,yon_char_unite(packname,"-",packver,"-",packarch,NULL),2,yon_char_unite(path,"/pool/overlay/",parameter_string,NULL),3,0,4,0,9,packname,10,packver,11,packarch,12,packdepends,-1);
|
|
|
|
|
gtk_tree_store_set(main_config.tree_store,&packIter,0,document_no_edits,1,yon_char_unite(packname,"-",packver,"-",packarch,NULL),2,yon_char_unite(path,"/pool/overlay/",parameter_string,NULL),3,0,4,0,9,packname,10,packver,11,packarch,12,packdepends,13,pack_signed,-1);
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
@ -220,6 +226,9 @@ void on_save(){
|
|
|
|
|
yon_char_divide(pack_sign_paths,yon_char_find_last(pack_sign_paths,'/'));
|
|
|
|
|
packnames = yon_char_unite(packnames ? yon_char_append(packnames," "):"",pack_sign_paths,NULL);
|
|
|
|
|
if (pack_sign&&pack_signed==1){
|
|
|
|
|
char *package_full_name = yon_char_new(pack_path);
|
|
|
|
|
yon_char_divide(package_full_name,yon_char_find_last(package_full_name,'/'));
|
|
|
|
|
yon_window_config_add_custom_parameter(package_full_name,"signatures",yon_char_new(pack_sign),YON_TYPE_STRING);
|
|
|
|
|
yon_char_divide_search(pack_sign,"<",-1);
|
|
|
|
|
pack_sign=yon_char_divide_search(pack_sign,">",-1);
|
|
|
|
|
if (!pack_groups||!(yon_dictionary_get(&pack_groups,pack_sign))){
|
|
|
|
|
@ -362,8 +371,8 @@ void on_tree_selection_changed(GtkWidget *self,main_window *widgets){
|
|
|
|
|
gtk_widget_set_visible(widgets->SignatureBox,1);
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
gtk_widget_set_sensitive(widgets->CreateButton,0);
|
|
|
|
|
gtk_widget_set_sensitive(widgets->LoadFromLocalButton,0);
|
|
|
|
|
gtk_widget_set_sensitive(widgets->CreateButton,1);
|
|
|
|
|
gtk_widget_set_sensitive(widgets->LoadFromLocalButton,1);
|
|
|
|
|
gtk_widget_set_sensitive(widgets->ConfigureButton,0);
|
|
|
|
|
gtk_widget_set_sensitive(widgets->DeleteButton,0);
|
|
|
|
|
gtk_widget_set_sensitive(widgets->AddPackageButton,0);
|
|
|
|
|
@ -571,7 +580,7 @@ GtkTreeIter *yon_repo_append(main_window *widgets, char *name, YON_REPO_LINE_TYP
|
|
|
|
|
}
|
|
|
|
|
else if (type==YON_REPO_LINE_REPO_TYPE){
|
|
|
|
|
gtk_tree_store_append(main_config.tree_store,&iter,NULL);
|
|
|
|
|
gtk_tree_store_set(main_config.tree_store,&iter,0, folder_no_edits, 1, name_short,2,name,3,1,4,fls,-1);
|
|
|
|
|
gtk_tree_store_set(main_config.tree_store,&iter,0, folder_no_edits, 1, name_short,2,name,3,1,4,fls,9,name_short,-1);
|
|
|
|
|
retIter = gtk_tree_iter_copy(&iter);
|
|
|
|
|
gtk_tree_selection_select_iter(gtk_tree_view_get_selection(GTK_TREE_VIEW(widgets->RepoTree)),&iter);
|
|
|
|
|
} else {
|
|
|
|
|
|