diff --git a/source/ubl-settings-repomanager.c b/source/ubl-settings-repomanager.c index 8d564aa..a59c0a1 100644 --- a/source/ubl-settings-repomanager.c +++ b/source/ubl-settings-repomanager.c @@ -128,7 +128,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,parameter_string,2,path,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,path,3,0,4,0,9,packname,10,packver,11,packarch,12,packdepends,-1); } else for (int j=0;j",-1); if (!pack_groups||!(yon_dictionary_get(&pack_groups,pack_sign))){ dictionary *dict = yon_dictionary_new(); - dict->key = pack_path; + dict->key = pack_status == 1 ? pack_path : yon_char_unite("-f -d ",origin_flagged," -r ",name_flagged," --sign_pkg ", pack_sign," -p $(find ",origin_flagged,"/pool/overlay -name *", pack_code_name,".pkg.tar* -not -name *.sig)"); yon_dictionary_add_or_create_if_exists_with_data(pack_groups,yon_char_new(pack_sign),dict); } else { dictionary *dict = yon_dictionary_new(); - dict->key=pack_path; + dict->key=pack_code_name; yon_dictionary_add_or_create_if_exists_with_data(pack_groups->data,yon_char_new(pack_sign),dict); } } else if (pack_status==1){ - add_packages = yon_char_unite(add_packages ? yon_char_append(add_packages,",") : "",pack_path,NULL); + add_packages = yon_char_unite(add_packages ? yon_char_append(add_packages,",") : "",pack_code_name,NULL); } else if (pack_status==-1){ remove_packages = yon_char_unite(remove_packages ? yon_char_append(remove_packages,",") : "",pack_code_name,NULL); } @@ -418,7 +419,7 @@ void on_sign_save(GtkWidget *self, dictionary *dict){ repo_sign_window *window = yon_dictionary_get_data(dict->first->next,repo_sign_window*); GtkTreeModel *model = GTK_TREE_MODEL(main_config.tree_store); if (gtk_tree_selection_get_selected(gtk_tree_view_get_selection(GTK_TREE_VIEW(widgets->RepoTree)),&model,&iter)){ - gtk_tree_store_set(main_config.tree_store,&iter,0,gtk_tree_store_iter_depth(main_config.tree_store,&iter)==0 ? folder_added : document_added,3,1,13,(char*)gtk_combo_box_text_get_active_text(GTK_COMBO_BOX_TEXT(window->KeysCombo)),-1); + gtk_tree_store_set(main_config.tree_store,&iter,13,(char*)gtk_combo_box_text_get_active_text(GTK_COMBO_BOX_TEXT(window->KeysCombo)),14,1,-1); } on_tree_selection_changed(self,widgets); on_close_subwindow(self); @@ -623,10 +624,11 @@ void yon_add_file(main_window *widgets){ else if (strstr(p,"Version")) packver = yon_char_new(stringe); else if (strstr(p,"Architecture")) packarch = yon_char_new(stringe); else if (strstr(p,"Depends On")) packdepends = yon_char_new(stringe); + // else if (strstr(p,"Depends On")) packdepends = yon_char_new(stringe); } GtkTreeIter *iter = yon_repo_append(widgets,filename,YON_REPO_LINE_FILE_TYPE); gtk_tree_view_expand_to_path(GTK_TREE_VIEW(widgets->RepoTree),gtk_tree_model_get_path(GTK_TREE_MODEL(main_config.tree_store),iter)); - gtk_tree_store_set(main_config.tree_store,iter,0,document_added,9,packname,10,packver,11,packarch,12,packdepends,-1); + gtk_tree_store_set(main_config.tree_store,iter,0,document_added,1,yon_char_unite(packname,"-",packver,"-",packarch,NULL),9,packname,10,packver,11,packarch,12,packdepends,-1); } on_tree_selection_changed(NULL,widgets); @@ -781,6 +783,7 @@ int main(int argc, char *argv[]){ int option_index=0; int show_help=0; int debug_mode=0; + printf("init phase\n"); { struct option long_options[] = { {"help", 0, 0, 'h'}, @@ -849,29 +852,44 @@ int main(int argc, char *argv[]){ main_config.lock_save_local=1; main_config.lock_root=1; } + printf("init phase\n"); gtk_init(&argc,&argv); main_window *widgets = setup_window(); yon_ubl_header_setup_resource(widgets->HeadOverlay,widgets->HeadBox,widgets->HeadImage,banner_path); + printf("init phase\n"); yon_ubl_status_box_setup(widgets->StatusIcon,widgets->StatusBox,widgets->StatusLabel); + printf("init phase\n"); yon_ubl_status_box_render(TITLE_LABEL,BACKGROUND_IMAGE_SUCCESS_TYPE); + printf("init phase\n"); yon_ubl_setup_sockets(widgets->PlugBox,widgets->LeftBox,widgets->RightBox,main_config.socket_id,main_config.load_socket_id,main_config.save_socket_id); + printf("init phase\n"); yon_window_config_setup(GTK_WINDOW(widgets->Window)); + printf("init phase\n"); yon_window_config_load(config_path); + printf("init phase\n"); /*Check for null config parameter | Проверка на отсутствующий в конфигурации параметр */ GValue *val = g_malloc0(sizeof(GValue)); + printf("init phase\n"); g_object_get_property(G_OBJECT(widgets->MovePaned),"position",val); + printf("init phase\n"); int paned_size = g_value_get_int(val); + printf("init phase\n"); if (paned_size<100) gtk_paned_set_position(GTK_PANED(widgets->MovePaned),400); + printf("init phase\n"); on_load(); + printf("init phase\n"); GtkCssProvider *css=gtk_css_provider_new(); + printf("init phase\n"); gtk_css_provider_load_from_resource(css,CssPath); + printf("init phase\n"); gtk_style_context_add_provider_for_screen(gdk_screen_get_default(), GTK_STYLE_PROVIDER(css), -1); + printf("init phase\n"); gtk_main(); } \ No newline at end of file