Added storage disable and remove confirmation windows

pull/134/head
parent 82af8e76ce
commit b26a145e2d
No known key found for this signature in database
GPG Key ID: FF1D842BF4DDE92B

@ -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

@ -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);

@ -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")

Loading…
Cancel
Save