|
|
|
@ -408,6 +408,7 @@ void on_repo_add_new(GtkWidget *self, dictionary *dict){
|
|
|
|
name = window->path;
|
|
|
|
name = window->path;
|
|
|
|
if (!name||strcmp(name,"")!=0){
|
|
|
|
if (!name||strcmp(name,"")!=0){
|
|
|
|
GtkTreeIter *iter = yon_repo_append(widgets, name, YON_REPO_LINE_REPO_TYPE);
|
|
|
|
GtkTreeIter *iter = yon_repo_append(widgets, name, YON_REPO_LINE_REPO_TYPE);
|
|
|
|
|
|
|
|
if (iter){
|
|
|
|
struct dirent *de;
|
|
|
|
struct dirent *de;
|
|
|
|
GtkTreeIter child;
|
|
|
|
GtkTreeIter child;
|
|
|
|
char *reponame = yon_char_new(name);
|
|
|
|
char *reponame = yon_char_new(name);
|
|
|
|
@ -443,9 +444,7 @@ void on_repo_add_new(GtkWidget *self, dictionary *dict){
|
|
|
|
gtk_tree_store_set(main_config.tree_store,iter,0,folder_added,2,window->path,3,1,9,reponame,-1);
|
|
|
|
gtk_tree_store_set(main_config.tree_store,iter,0,folder_added,2,window->path,3,1,9,reponame,-1);
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
yon_ubl_status_box_render(OPERATION_DONE_LABEL,BACKGROUND_IMAGE_SUCCESS_TYPE);
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
|
|
|
|
yon_ubl_status_box_render(EMPTY_NAME_LABEL,BACKGROUND_IMAGE_FAIL_TYPE);
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@ -468,7 +467,6 @@ void on_repo_new (GtkWidget *self, main_window *widgets){
|
|
|
|
dictionary *dict = yon_dictionary_new_with_data("",widgets);
|
|
|
|
dictionary *dict = yon_dictionary_new_with_data("",widgets);
|
|
|
|
dict = yon_dictionary_append_with_data(dict,"",window);
|
|
|
|
dict = yon_dictionary_append_with_data(dict,"",window);
|
|
|
|
on_repo_add_new(self,dict);
|
|
|
|
on_repo_add_new(self,dict);
|
|
|
|
yon_ubl_status_box_render(OPERATION_DONE_LABEL,BACKGROUND_IMAGE_SUCCESS_TYPE);
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void on_repo_add_file(GtkWidget *self, main_window *widgets){
|
|
|
|
void on_repo_add_file(GtkWidget *self, main_window *widgets){
|
|
|
|
@ -600,6 +598,16 @@ GtkTreeIter *yon_repo_append(main_window *widgets, char *name, YON_REPO_LINE_TYP
|
|
|
|
GtkTreeModel *model = GTK_TREE_MODEL(main_config.tree_store);
|
|
|
|
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,&parentIter)){
|
|
|
|
if (gtk_tree_selection_get_selected(gtk_tree_view_get_selection(GTK_TREE_VIEW(widgets->RepoTree)),&model,&parentIter)){
|
|
|
|
if (type==YON_REPO_LINE_REPO_TYPE){
|
|
|
|
if (type==YON_REPO_LINE_REPO_TYPE){
|
|
|
|
|
|
|
|
GtkTreeIter ater;
|
|
|
|
|
|
|
|
char *repo_path;
|
|
|
|
|
|
|
|
int valid = gtk_tree_model_get_iter_first(model,&ater);
|
|
|
|
|
|
|
|
for (;valid;valid=gtk_tree_model_iter_next(model,&ater)){
|
|
|
|
|
|
|
|
gtk_tree_model_get(model,&ater,2,&repo_path,-1);
|
|
|
|
|
|
|
|
if (!strcmp(repo_path,name)){
|
|
|
|
|
|
|
|
yon_ubl_status_box_render(REPO_ALREADY_EXISTS_LABEL,BACKGROUND_IMAGE_FAIL_TYPE);
|
|
|
|
|
|
|
|
return NULL;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
gtk_tree_store_append(main_config.tree_store,&iter,NULL);
|
|
|
|
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,-1);
|
|
|
|
retIter = gtk_tree_iter_copy(&iter);
|
|
|
|
retIter = gtk_tree_iter_copy(&iter);
|
|
|
|
|