|
|
|
@ -1036,7 +1036,7 @@ void on_repo_accept_clicked(GtkWidget *, dictionary *dict){
|
|
|
|
main_window *widgets = yon_dictionary_get_data(dict->first,main_window*);
|
|
|
|
main_window *widgets = yon_dictionary_get_data(dict->first,main_window*);
|
|
|
|
repo_add_window *window = yon_dictionary_get_data(dict->first->next,repo_add_window*);
|
|
|
|
repo_add_window *window = yon_dictionary_get_data(dict->first->next,repo_add_window*);
|
|
|
|
|
|
|
|
|
|
|
|
if (!window->sections) {
|
|
|
|
if (!window->sections&&yon_char_is_empty(gtk_entry_get_text(GTK_ENTRY(window->RepoSourceEntry)))) {
|
|
|
|
yon_ubl_status_box_spawn(GTK_CONTAINER(window->StatusBox),NOTHING_CHOSEN_LABEL,5,BACKGROUND_IMAGE_FAIL_TYPE);
|
|
|
|
yon_ubl_status_box_spawn(GTK_CONTAINER(window->StatusBox),NOTHING_CHOSEN_LABEL,5,BACKGROUND_IMAGE_FAIL_TYPE);
|
|
|
|
yon_ubl_status_highlight_incorrect(gtk_widget_get_parent(window->SourceListBox));
|
|
|
|
yon_ubl_status_highlight_incorrect(gtk_widget_get_parent(window->SourceListBox));
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
@ -1050,10 +1050,20 @@ void on_repo_accept_clicked(GtkWidget *, dictionary *dict){
|
|
|
|
int enabled = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(window->EnabledCheck));
|
|
|
|
int enabled = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(window->EnabledCheck));
|
|
|
|
char *sources = "";
|
|
|
|
char *sources = "";
|
|
|
|
dictionary *dact = NULL;
|
|
|
|
dictionary *dact = NULL;
|
|
|
|
for_dictionaries (dact, window->sections){
|
|
|
|
if (window->sections){
|
|
|
|
char *type = (char*)gtk_combo_box_get_active_id(GTK_COMBO_BOX(((path_section*)dact->data)->TypeCombo));
|
|
|
|
for_dictionaries (dact, window->sections){
|
|
|
|
char *cur = yon_char_unite(type?type:"",type?"@":"",(char*)gtk_entry_get_text(GTK_ENTRY(((path_section*)dact->data)->PathEntry)),NULL);
|
|
|
|
char *type = (char*)gtk_combo_box_get_active_id(GTK_COMBO_BOX(((path_section*)dact->data)->TypeCombo));
|
|
|
|
char *temp = yon_char_unite(sources,!yon_char_is_empty(sources)?",":"",cur,NULL);
|
|
|
|
char *cur = yon_char_unite(type?type:"",type?"@":"",(char*)gtk_entry_get_text(GTK_ENTRY(((path_section*)dact->data)->PathEntry)),NULL);
|
|
|
|
|
|
|
|
char *temp = yon_char_unite(sources,!yon_char_is_empty(sources)?",":"",cur,NULL);
|
|
|
|
|
|
|
|
if (!yon_char_is_empty(sources)) free(sources);
|
|
|
|
|
|
|
|
sources = temp;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
char *source_main = (char*)gtk_entry_get_text(GTK_ENTRY(window->RepoSourceEntry));
|
|
|
|
|
|
|
|
if (!yon_char_is_empty(source_main)) {
|
|
|
|
|
|
|
|
char *type = (char*)gtk_combo_box_get_active_id(GTK_COMBO_BOX(window->RepoSourceCombo));
|
|
|
|
|
|
|
|
source_main = yon_char_unite(type?type:"",type?"@":"",source_main,NULL);
|
|
|
|
|
|
|
|
char *temp = yon_char_unite(sources,!yon_char_is_empty(sources)?",":"",source_main,NULL);
|
|
|
|
if (!yon_char_is_empty(sources)) free(sources);
|
|
|
|
if (!yon_char_is_empty(sources)) free(sources);
|
|
|
|
sources = temp;
|
|
|
|
sources = temp;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@ -1200,18 +1210,27 @@ void on_web_publish_accept(GtkWidget *, dictionary *dict){
|
|
|
|
void on_mirror_accept(GtkWidget *,dictionary *dict){
|
|
|
|
void on_mirror_accept(GtkWidget *,dictionary *dict){
|
|
|
|
main_window *widgets = yon_dictionary_get_data(dict->first,main_window*);
|
|
|
|
main_window *widgets = yon_dictionary_get_data(dict->first,main_window*);
|
|
|
|
mirror_add_window *window = yon_dictionary_get_data(dict->first->next,mirror_add_window*);
|
|
|
|
mirror_add_window *window = yon_dictionary_get_data(dict->first->next,mirror_add_window*);
|
|
|
|
if (!window->sections) {
|
|
|
|
if (!window->sections&&yon_char_is_empty(gtk_entry_get_text(GTK_ENTRY(window->TypeEntry)))) {
|
|
|
|
yon_ubl_status_box_spawn(GTK_CONTAINER(window->StatusBox),NOTHING_CHOSEN_LABEL,5,BACKGROUND_IMAGE_FAIL_TYPE);
|
|
|
|
yon_ubl_status_box_spawn(GTK_CONTAINER(window->StatusBox),NOTHING_CHOSEN_LABEL,5,BACKGROUND_IMAGE_FAIL_TYPE);
|
|
|
|
yon_ubl_status_highlight_incorrect(gtk_widget_get_parent(gtk_widget_get_parent(gtk_widget_get_parent(gtk_widget_get_parent((window->PathBox))))));
|
|
|
|
yon_ubl_status_highlight_incorrect(gtk_widget_get_parent(gtk_widget_get_parent(gtk_widget_get_parent(gtk_widget_get_parent((window->PathBox))))));
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
char *name = (char*)gtk_entry_get_text(GTK_ENTRY(window->NameEntry));
|
|
|
|
char *name = (char*)gtk_entry_get_text(GTK_ENTRY(window->NameEntry));
|
|
|
|
char *paths = "";
|
|
|
|
char *paths = "";
|
|
|
|
dictionary *dact = NULL;
|
|
|
|
if (window->sections){
|
|
|
|
for_dictionaries (dact, window->sections){
|
|
|
|
dictionary *dact = NULL;
|
|
|
|
|
|
|
|
for_dictionaries (dact, window->sections){
|
|
|
|
char *cur = yon_char_unite(gtk_combo_box_get_active_id(GTK_COMBO_BOX(((path_section*)dact->data)->TypeCombo)),"@",(char*)gtk_entry_get_text(GTK_ENTRY(((path_section*)dact->data)->PathEntry)),NULL);
|
|
|
|
char *cur = yon_char_unite(gtk_combo_box_get_active_id(GTK_COMBO_BOX(((path_section*)dact->data)->TypeCombo)),"@",(char*)gtk_entry_get_text(GTK_ENTRY(((path_section*)dact->data)->PathEntry)),NULL);
|
|
|
|
char *temp = yon_char_unite(paths,!yon_char_is_empty(paths)?",":"",cur,NULL);
|
|
|
|
char *temp = yon_char_unite(paths,!yon_char_is_empty(paths)?",":"",cur,NULL);
|
|
|
|
|
|
|
|
if (!yon_char_is_empty(paths)) free(paths);
|
|
|
|
|
|
|
|
paths = temp;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
char *source_main = (char*)gtk_entry_get_text(GTK_ENTRY(window->TypeEntry));
|
|
|
|
|
|
|
|
if (!yon_char_is_empty(source_main)) {
|
|
|
|
|
|
|
|
char *type = (char*)gtk_combo_box_get_active_id(GTK_COMBO_BOX(window->TypeCombo));
|
|
|
|
|
|
|
|
source_main = yon_char_unite(type?type:"",type?"@":"",source_main,NULL);
|
|
|
|
|
|
|
|
char *temp = yon_char_unite(paths,!yon_char_is_empty(paths)?",":"",source_main,NULL);
|
|
|
|
if (!yon_char_is_empty(paths)) free(paths);
|
|
|
|
if (!yon_char_is_empty(paths)) free(paths);
|
|
|
|
paths = temp;
|
|
|
|
paths = temp;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|