Added update button confirmation

pull/271/head
parent 6a3a66b3b0
commit e830c9f0cb
No known key found for this signature in database
GPG Key ID: FF1D842BF4DDE92B

@ -199,6 +199,10 @@ msgstr ""
msgid "Update users and groups"
msgstr ""
#: source/ubl-strings.h:51
msgid "Refreshing to the last loaded configuration will lose unsaved changes!\nСontinue anyway?"
msgstr ""
#: source/ubl-strings.h:52
msgid "Additional saving configuration"
msgstr ""

@ -213,6 +213,10 @@ msgstr "Удалить"
msgid "Update users and groups"
msgstr "Обновить список пользователей и групп"
#: source/ubl-strings.h:51
msgid "Refreshing to the last loaded configuration will lose unsaved changes!\nСontinue anyway?"
msgstr "При обновлении до последней загруженной конфигурации несохраненные изменения будут потеряны! Обновить?"
#: source/ubl-strings.h:52
msgid "Additional saving configuration"
msgstr "Дополнительные настройки сохранения"

@ -1960,6 +1960,19 @@ void on_user_info(GtkWidget *,main_window *widgets){
}
void on_config_update(GtkWidget *, main_window *widgets){
int size;
config_str parameters = yon_config_get_save_parameters(&size);
if (size){
dialog_confirmation_data *data = yon_confirmation_dialog_data_new();
data->action_text = UPDATE_CONFIRMATION_LABEL;
data->title = UPDATE_LABEL;
if (yon_confirmation_dialog_call(widgets->Window,data)!=GTK_RESPONSE_ACCEPT)
return;
yon_char_parsed_free(parameters,size);
}
if (main_config.load_mode==YON_CONFIG_GLOBAL){
on_config_global_load(NULL,widgets);
} else {

@ -52,6 +52,7 @@
#define EDIT_LABEL _("Edit")
#define REMOVE_LABEL _("Remove")
#define UPDATE_LABEL _("Update users and groups")
#define UPDATE_CONFIRMATION_LABEL _("Refreshing to the last loaded configuration will lose unsaved changes!\nСontinue anyway?")
#define SAVING_CONFIGURATION_LABEL _("Additional saving configuration")
#define FILTER_NAME_CONFIG_LABEL yon_char_append(_("Configuration file")," *.ini")

Loading…
Cancel
Save