From 5416f14a70b4c8c90e943ec811090efc673c4593 Mon Sep 17 00:00:00 2001 From: Ivan Yarcev Date: Fri, 27 Sep 2024 10:01:18 +0600 Subject: [PATCH] Slight changes to saving mechanism, reboot warning text change --- source/ubinstall-gtk.c | 14 ++++++++++++-- source/ubl-strings.h | 3 ++- ubinstall-gtk.pot | 4 ++++ ubinstall-gtk_ru.po | 4 ++++ 4 files changed, 22 insertions(+), 3 deletions(-) diff --git a/source/ubinstall-gtk.c b/source/ubinstall-gtk.c index 0a92563..a00a755 100644 --- a/source/ubinstall-gtk.c +++ b/source/ubinstall-gtk.c @@ -943,7 +943,16 @@ void *on_config_save(void *data){ main_window *widgets = (main_window*)data; int size=0; - config_str parameters = yon_config_get_all(&size); + config_str parameters = yon_config_get_selection_by_key(&size, + AUTOINSTALL_TYPE_INSTALL, + AUTOINSTALL_DEVICE, + device_format_parameter, + device_label_parameter, + main_config.install_mode!=1||main_config.install_mode!=2?NULL:part_parameter, + part_type_parameter, + device_format_parameter, + main_config.install_mode!=1?NULL:part_size_parameter, + NULL); FILE *file = fopen(progress_path,"w"); if (file) fclose(file); @@ -1463,6 +1472,7 @@ void on_page_navigation_clicked(GtkWidget *self, main_window *widgets){ char *file_system_type = (char*)gtk_combo_box_text_get_active_text(GTK_COMBO_BOX_TEXT(widgets->CommonInstallationFilesystemTypeCombo)); char *device_name = (char*)gtk_entry_get_text(GTK_ENTRY(widgets->CommonInstallationSectionNameEntry)); char *device; + yon_config_remove_by_key(part_size_parameter); yon_config_remove_by_key(part_parameter); gtk_tree_model_get(model,&iter,0,&device,-1); yon_config_register(AUTOINSTALL_TYPE_INSTALL,AUTOINSTALL_TYPE_INSTALL_command,"fast"); @@ -1762,7 +1772,7 @@ void on_page_navigation_clicked(GtkWidget *self, main_window *widgets){ gtk_window_set_transient_for(GTK_WINDOW(window->Window),GTK_WINDOW(widgets->MainWindow)); gtk_window_set_title(GTK_WINDOW(window->Window),TITLE_LABEL); gtk_window_set_icon_name(GTK_WINDOW(window->Window),icon_path); - gtk_label_set_text(GTK_LABEL(window->TextLabel),WARNING_TEXT_LABEL); + gtk_label_set_text(GTK_LABEL(window->TextLabel),WARNING_REBOOT_TEXT_LABEL); gtk_label_set_text(GTK_LABEL(window->TitleLabel),WARNING_TITLE_LABEL); gtk_widget_show(window->Window); break; diff --git a/source/ubl-strings.h b/source/ubl-strings.h index c43b7bd..abdc0be 100644 --- a/source/ubl-strings.h +++ b/source/ubl-strings.h @@ -183,4 +183,5 @@ #define WARNING_TITLE_LABEL _("Warning") -#define WARNING_TEXT_LABEL _("Are you sure want to exit and\ninterrupt installation process?") \ No newline at end of file +#define WARNING_TEXT_LABEL _("Are you sure want to exit and\ninterrupt installation process?") +#define WARNING_REBOOT_TEXT_LABEL _("Are you sure want to reboot system?") \ No newline at end of file diff --git a/ubinstall-gtk.pot b/ubinstall-gtk.pot index e3ef875..64ee4dd 100644 --- a/ubinstall-gtk.pot +++ b/ubinstall-gtk.pot @@ -565,6 +565,10 @@ msgstr "" msgid "Start GParted" msgstr "" +#: source/ubl-strings.h:187 +msgid "Are you sure want to reboot system?" +msgstr "" + msgid "Load global configuration" msgstr "" diff --git a/ubinstall-gtk_ru.po b/ubinstall-gtk_ru.po index 83736f7..7dc9da8 100644 --- a/ubinstall-gtk_ru.po +++ b/ubinstall-gtk_ru.po @@ -665,6 +665,10 @@ msgstr "Запустить GParted" msgid "English, U.S.A.; Russian, Russia" msgstr "Английский, США; Русский, Россия" +#: source/ubl-strings.h:187 +msgid "Are you sure want to reboot system?" +msgstr "Вы уверены что хотите перезагрузить систему?" + msgid "Afrikaans" msgstr "Африканский"