From c284c5432872472aa39d1b4456dda543377a5657 Mon Sep 17 00:00:00 2001 From: Ivan Yarcev Date: Thu, 19 Dec 2024 10:39:00 +0600 Subject: [PATCH] Web publication's repositories paths shown if every repository is chosen --- source/ubl-settings-update.c | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/source/ubl-settings-update.c b/source/ubl-settings-update.c index d733d57..c8dc232 100644 --- a/source/ubl-settings-update.c +++ b/source/ubl-settings-update.c @@ -395,6 +395,19 @@ void yon_interface_update(main_window *widgets){ } int repos_size; config_str repos = yon_char_parse(key,&repos_size,","); + if (!repos_size){ + int temp_size; + config_str contents = yon_dir_get_contents(path,&temp_size); + for (int k=0;kWebPublicationList,&iter,1,path,2,yon_char_parsed_to_string(repos,repos_size,"\n"),-1); int cur_size; @@ -1174,10 +1187,9 @@ void on_web_publish_accept(GtkWidget *, dictionary *dict){ char *final_name = yon_char_is_empty(full_name)||!disabled ? name : yon_char_unite(name,":",full_name,NULL); char *final = yon_char_unite(enabled?"enable":"disable",":",enable_browser?"listing":"",":",port_enabled?port:"",":",username_check?username:"",":",username_check?yon_char_is_empty(encryption)? user_password:encryption:"",":",username_check?!yon_char_is_empty(encryption)?user_password:"":"",NULL); if (!yon_char_is_empty(window->name)&&strcmp(final_name,window->name)){ - yon_config_remove_by_key(REPOPUBLIC_WEB_command(window->name)); - } else { - yon_config_register(REPOPUBLIC_WEB_full(final_name),REPOPUBLIC_WEB_command(final_name),final); + yon_config_remove_by_key(REPOPUBLIC_WEB_full(window->name)); } + yon_config_register(REPOPUBLIC_WEB_full(final_name),REPOPUBLIC_WEB_command(final_name),final); yon_interface_update(widgets); gtk_widget_destroy(window->Window); }