From bd419ac8ffad4448178be48608c825d63a0fb161 Mon Sep 17 00:00:00 2001 From: Ivan Yarcev Date: Mon, 7 Apr 2025 14:19:49 +0600 Subject: [PATCH] Fixes --- source/ubl-settings-update.c | 16 +++++++++------- source/ubl-strings.h | 2 +- ubl-settings-update.glade | 8 ++++---- ubl-settings-update.pot | 2 +- ubl-settings-update_ru.po | 4 ++-- 5 files changed, 17 insertions(+), 15 deletions(-) diff --git a/source/ubl-settings-update.c b/source/ubl-settings-update.c index 2c4dd8c..1659e3d 100644 --- a/source/ubl-settings-update.c +++ b/source/ubl-settings-update.c @@ -500,14 +500,16 @@ void yon_interface_update(main_window *widgets){ gtk_list_store_set(widgets->WebPublicationList,&iter,5,parsed[3],-1); } if (cur_size>4&&!yon_char_is_empty(parsed[4])){ - char *hash = yon_char_divide_search(parsed[4],"|",-1); - if (!strcmp(hash,"sha256")||!strcmp(hash,"sha512")){ + if (!strcmp(parsed[5],"sha256")||!strcmp(parsed[5],"sha512")){ gtk_list_store_set(widgets->WebPublicationList,&iter,7,"******",-1); - gtk_list_store_set(widgets->WebPublicationList,&iter,6,hash,-1); + gtk_list_store_set(widgets->WebPublicationList,&iter,6,parsed[5],-1); } else { - gtk_list_store_set(widgets->WebPublicationList,&iter,6,"******",-1); + if (strlen(parsed[4])==128||strlen(parsed[4])==64) + gtk_list_store_set(widgets->WebPublicationList,&iter,7,parsed[4],-1); + else + gtk_list_store_set(widgets->WebPublicationList,&iter,7,"******",-1); if (cur_size>5&&!yon_char_is_empty(parsed[5])){ - gtk_list_store_set(widgets->WebPublicationList,&iter,7,parsed[5],-1); + gtk_list_store_set(widgets->WebPublicationList,&iter,6,parsed[5],-1); } } } @@ -1260,8 +1262,8 @@ void on_web_publish_accept(GtkWidget *, dictionary *dict){ 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:"":"", + username_check?!yon_char_is_empty(user_password)?user_password:"":"", + username_check?yon_char_is_empty(encryption)?"":encryption:"",":", NULL); if (!yon_char_is_empty(window->name)&&strcmp(final_name,window->name)){ yon_config_remove_by_key(REPOPUBLIC_WEB_full(window->name)); diff --git a/source/ubl-strings.h b/source/ubl-strings.h index a911688..b326cce 100644 --- a/source/ubl-strings.h +++ b/source/ubl-strings.h @@ -106,7 +106,7 @@ mirrorlist - mirrors file, make sure server URL is NOT included in this file! Si #define _LABEL _("Reviewer") #define _LABEL _("Port") #define _LABEL _("Name") - #define _LABEL _("Password/Hash type") + #define _LABEL _("Hash type") #define _LABEL _("Password hash") #define _LABEL _("Setting up publication of a lazy mirror of connected repositories as a local WEB resource") #define _LABEL _("Publish lazy mirror") diff --git a/ubl-settings-update.glade b/ubl-settings-update.glade index 4a9e7bd..adc0e41 100644 --- a/ubl-settings-update.glade +++ b/ubl-settings-update.glade @@ -1360,26 +1360,26 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. True fixed - Password/Hash type + Password hash end - 6 + 7 - Password hash + Hash type end - 7 + 6 diff --git a/ubl-settings-update.pot b/ubl-settings-update.pot index f22ee3f..ee43852 100644 --- a/ubl-settings-update.pot +++ b/ubl-settings-update.pot @@ -385,7 +385,7 @@ msgid "Name" msgstr "" #: source/ubl-strings.h:107 -msgid "Password/Hash type" +msgid "Hash type" msgstr "" #: source/ubl-strings.h:108 diff --git a/ubl-settings-update_ru.po b/ubl-settings-update_ru.po index 6a4ca75..74c64d8 100644 --- a/ubl-settings-update_ru.po +++ b/ubl-settings-update_ru.po @@ -408,8 +408,8 @@ msgid "Name" msgstr "Имя пользователя" #: source/ubl-strings.h:107 -msgid "Password/Hash type" -msgstr "Пароль/Тип хэша" +msgid "Hash type" +msgstr "Тип хэша" #: source/ubl-strings.h:108 msgid "Password hash"