Test fix for web publication

pull/97/head
parent f3c66a9fd9
commit 366fe6446d

@ -452,6 +452,7 @@ void yon_interface_update(main_window *widgets){
gtk_list_store_append(widgets->WebPublicationList,&iter);
char *cur = yon_char_new(web_publish[i]);
char *key = yon_char_divide_search(cur,"=",-1);
char *full_key = yon_char_new(key);
free(yon_char_divide_search(key,"[",-1));
key[strlen(key)-1]='\0';
char *path = NULL;
@ -474,7 +475,6 @@ void yon_interface_update(main_window *widgets){
}
if (repos_size){
char *repos_paths = yon_char_parsed_to_string(repos,repos_size,",");
char *full_path = yon_char_unite(path,!yon_char_is_empty(repos_paths)?":":"",!yon_char_is_empty(repos_paths)?repos_paths:"",NULL);
if (!yon_char_is_empty(repos_paths)) free(repos_paths);
if (!repos_size){
int temp_size;
@ -491,9 +491,8 @@ void yon_interface_update(main_window *widgets){
}
repos_paths = yon_char_parsed_to_string(repos,repos_size,"\n");
gtk_list_store_set(widgets->WebPublicationList,&iter,2,repos_paths,8,full_path,-1);
gtk_list_store_set(widgets->WebPublicationList,&iter,2,repos_paths,8,full_key,-1);
free(repos_paths);
free(full_path);
}
gtk_list_store_set(widgets->WebPublicationList,&iter,1,path,-1);
@ -974,7 +973,7 @@ void on_web_publish_edit(GtkWidget *,main_window *widgets){
}
}
window->name = full;
char *parameter = config(REPOPUBLIC_WEB_full(full));
char *parameter = config(full);
int size;
config_str parsed = yon_char_parse(parameter,&size,":");
if (size){
@ -992,11 +991,13 @@ void on_web_publish_edit(GtkWidget *,main_window *widgets){
gtk_entry_set_text(GTK_ENTRY(window->UsernameEntry),parsed[3]);
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(window->UsernameCheck),1);
}
if (size>4&&!yon_char_is_empty(parsed[4])){
if (size>5&&!yon_char_is_empty(parsed[4])&&!yon_char_is_empty(parsed[5])){
gtk_combo_box_set_active(GTK_COMBO_BOX(window->UserPasswordCombo),1);
if (!strcmp(parsed[4],"sha256")||!strcmp(parsed[4],"sha512")){
gtk_combo_box_set_active_id(GTK_COMBO_BOX(window->UserPasswordCombo),parsed[4]);
gtk_entry_set_text(GTK_ENTRY(window->UserPasswordEntry),parsed[5]);
char *temp = yon_char_unite(parsed[4],"|",parsed[5],NULL);
gtk_entry_set_text(GTK_ENTRY(window->UserPasswordEntry),temp);
free(temp);
} else {
gtk_entry_set_text(GTK_ENTRY(window->UserPasswordEntry),parsed[4]);
@ -1413,7 +1414,9 @@ void on_password_accept(GtkWidget *,dictionary *dict){
int size;
config_str hash = yon_config_load(yon_debug_output("%s\n",!strcmp(encryption,"sha512")?sha512_encrypt_command(password):sha256_encrypt_command(password)),&size);
yon_char_remove_last_symbol(hash[0],'\n');
gtk_entry_set_text(GTK_ENTRY(target),hash[0]);
char *temp = yon_char_unite(encryption,"|",hash[0],NULL);
gtk_entry_set_text(GTK_ENTRY(target),temp);
yon_char_parsed_free(hash,size);
}
}

Loading…
Cancel
Save