From 82af8e76ce4a41c14fe81a5059d94f4cc8dcfce7 Mon Sep 17 00:00:00 2001 From: Ivan Yarcev Date: Mon, 8 Sep 2025 09:21:43 +0600 Subject: [PATCH 1/2] Localisation fix --- locale/ubl-settings-repomanager_ru.po | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/locale/ubl-settings-repomanager_ru.po b/locale/ubl-settings-repomanager_ru.po index 25d4b90..f4d5cb0 100644 --- a/locale/ubl-settings-repomanager_ru.po +++ b/locale/ubl-settings-repomanager_ru.po @@ -490,7 +490,13 @@ msgid "Close" msgstr "Закрыть" #: source/ubl-strings.h:143 -msgid "Are you sure want to disable?" +msgid "" +"Attention! You want to disconnect the repository from the management of the " +"repository manager. This will stop managing the repository itself and " +"nested repositories!\n" +"\n" +"Note: in the future, you can reconnect the repository and manage " +"it." msgstr "" "Внимание! Вы хотите отключить хранилище от управления менеджером " "репозиториев. При этом будет прекращено управление самим хранилищем и " @@ -500,9 +506,11 @@ msgstr "" "им." #: source/ubl-strings.h:145 -msgid "Are you sure want to remove?" +msgid "" +"Attention! You are about to delete a repository. This will permanently delete the repository and its nested " +"repositories!" msgstr "" -"Внимание! Вы ходите удалить хранилище При этом хранилище и вложенные " +"Внимание! Вы хотите удалить хранилище. При этом хранилище и вложенные " "репозитории будут безвозвратно удалены!" #: source/ubl-strings.h:147 -- 2.35.1 From b26a145e2d40ec54c2f05ae06f201459d2287c15 Mon Sep 17 00:00:00 2001 From: Ivan Yarcev Date: Tue, 9 Sep 2025 14:59:56 +0600 Subject: [PATCH 2/2] Added storage disable and remove confirmation windows --- locale/ubl-settings-repomanager.pot | 12 ++++++++++-- source/ubl-settings-repomanager-storage-window.c | 12 ++++++++++++ source/ubl-strings.h | 4 ++-- 3 files changed, 24 insertions(+), 4 deletions(-) diff --git a/locale/ubl-settings-repomanager.pot b/locale/ubl-settings-repomanager.pot index 253c831..b458f12 100644 --- a/locale/ubl-settings-repomanager.pot +++ b/locale/ubl-settings-repomanager.pot @@ -484,11 +484,19 @@ msgid "Close" msgstr "" #: source/ubl-strings.h:143 -msgid "Are you sure want to disable?" +msgid "" +"Attention! You want to disconnect the repository from the management of the " +"repository manager. This will stop managing the repository itself and " +"nested repositories!\n" +"\n" +"Note: in the future, you can reconnect the repository and manage " +"it." msgstr "" #: source/ubl-strings.h:145 -msgid "Are you sure want to remove?" +msgid "" +"Attention! You are about to delete a repository. This will permanently delete the repository and its nested " +"repositories!" msgstr "" #: source/ubl-strings.h:147 diff --git a/source/ubl-settings-repomanager-storage-window.c b/source/ubl-settings-repomanager-storage-window.c index 394400c..81e753e 100644 --- a/source/ubl-settings-repomanager-storage-window.c +++ b/source/ubl-settings-repomanager-storage-window.c @@ -112,6 +112,12 @@ void on_storage_create(GtkWidget *self, storage_config_window *window){ } void on_storage_disable(GtkWidget *self, storage_config_window *window){ + dialog_confirmation_data *data = yon_confirmation_dialog_data_new(); + data->title = DISABLE_TOOLTIP_LABEL; + data->action_text = DISABLE_CONFIRMATION_LABEL; + if (yon_confirmation_dialog_call(self,data)!=GTK_RESPONSE_ACCEPT){ + return; + } const char *storage_target = gtk_combo_box_get_active_id(GTK_COMBO_BOX(window->StoragePathCombo)); if (yon_char_is_empty(storage_target)) return; storage_struct *storage = g_hash_table_lookup(window->storages_copy,storage_target); @@ -129,6 +135,12 @@ void on_storage_disable(GtkWidget *self, storage_config_window *window){ } void on_storage_remove(GtkWidget *self, storage_config_window *window){ + dialog_confirmation_data *data = yon_confirmation_dialog_data_new(); + data->title = REMOVE_LABEL; + data->action_text = REMOVE_CONFIRMATION_LABEL; + if (yon_confirmation_dialog_call(self,data)!=GTK_RESPONSE_ACCEPT){ + return; + } const char *storage_target = gtk_combo_box_get_active_id(GTK_COMBO_BOX(window->StoragePathCombo)); if (yon_char_is_empty(storage_target)) return; storage_struct *storage = g_hash_table_lookup(window->storages_copy,storage_target); diff --git a/source/ubl-strings.h b/source/ubl-strings.h index 277bc97..d4549b8 100644 --- a/source/ubl-strings.h +++ b/source/ubl-strings.h @@ -140,9 +140,9 @@ #define CLOSE_LABEL _("Close") -#define DISABLE_CONFIRMATION_LABEL _("Are you sure want to disable?") +#define DISABLE_CONFIRMATION_LABEL _("Attention! You want to disconnect the repository from the management of the repository manager. This will stop managing the repository itself and nested repositories!\n\nNote: in the future, you can reconnect the repository and manage it.") -#define REMOVE_CONFIRMATION_LABEL _("Are you sure want to remove?") +#define REMOVE_CONFIRMATION_LABEL _("Attention! You are about to delete a repository. This will permanently delete the repository and its nested repositories!") #define DO_NOT_SIGN_LABEL _("Do not sign") -- 2.35.1