From b02b37d384880ec01a4e7445854c8cd480aa686e Mon Sep 17 00:00:00 2001 From: Ivan Yarcev Date: Wed, 7 Aug 2024 10:26:46 +0600 Subject: [PATCH 1/8] fixed configuration not launching if installation process has finished --- source/ubinstall-gtk.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/source/ubinstall-gtk.c b/source/ubinstall-gtk.c index 1540b16..8a275a7 100644 --- a/source/ubinstall-gtk.c +++ b/source/ubinstall-gtk.c @@ -956,7 +956,7 @@ gboolean yon_installation_progress_update(void *data) { yon_char_parsed_free(text, size); if (!strstr(percentage, "#pb")) { - double fraction = atof(percentage); + double fraction = atof(percentage+1); gtk_label_set_text(GTK_LABEL(widgets->InstallationLabel), current_copy); gtk_progress_bar_set_fraction(GTK_PROGRESS_BAR(widgets->InstallationProgress), fraction / 100); gtk_progress_bar_set_fraction(GTK_PROGRESS_BAR(widgets->PackageInstallationProgress), 0); @@ -1637,9 +1637,11 @@ void on_page_navigation_clicked(GtkWidget *self, main_window *widgets){ if (gtk_progress_bar_get_fraction(GTK_PROGRESS_BAR(widgets->InstallationProgress))>0.9){ pthread_t tid; pthread_create(&tid,NULL,on_setup_system_configuration,widgets); + yon_debug_output("%s\n","installation ending configuration startup"); } else { pthread_t tid; pthread_create(&tid,NULL,on_save_system_configuration,widgets); + yon_debug_output("%s\n","installation process configuration startup"); } main_config.save_done=1; yon_debug_output("Save changed to: %s\n",yon_char_from_int(main_config.save_done)); From 8cb720181ca53d6ad4c585889ef49f17dd2e9874 Mon Sep 17 00:00:00 2001 From: Ivan Yarcev Date: Wed, 7 Aug 2024 11:00:18 +0600 Subject: [PATCH 2/8] Changed AUTOINSTALL[device_label] to AUTOINSTALL[part_label] --- source/ubinstall-gtk.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/ubinstall-gtk.h b/source/ubinstall-gtk.h index d2e9852..ac07455 100755 --- a/source/ubinstall-gtk.h +++ b/source/ubinstall-gtk.h @@ -106,7 +106,7 @@ NULL #define locale_parameter_command "ubconfig --source global get [autoinstall] AUTOINSTALL[locale]" #define device_format_parameter "AUTOINSTALL[device_format]" #define device_format_parameter_command "ubconfig --source global get [autoinstall] AUTOINSTALL[device_format]" -#define device_label_parameter "AUTOINSTALL[device_label]" +#define device_label_parameter "AUTOINSTALL[part_label]" #define device_label_parameter_command "ubconfig --source global get [autoinstall] AUTOINSTALL[part_label]" #define part_size_parameter "AUTOINSTALL[part_size]" #define part_size_parameter_command "ubconfig --source global get [autoinstall] AUTOINSTALL[part_size]" From d440cf539676ae3ee251d6578820abd95a1fea12 Mon Sep 17 00:00:00 2001 From: Ivan Yarcev Date: Wed, 7 Aug 2024 11:03:42 +0600 Subject: [PATCH 3/8] Localisation fixes --- ubinstall-gtk_ru.po | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ubinstall-gtk_ru.po b/ubinstall-gtk_ru.po index 9148dd4..00a0ef7 100644 --- a/ubinstall-gtk_ru.po +++ b/ubinstall-gtk_ru.po @@ -251,7 +251,7 @@ msgid "User root password:" msgstr "Пароль пользователя root:" #: source/ubl-strings.h:49 -msgid "Computer name:" +msgid "Host name:" msgstr "Имя компьютера" #: source/ubl-strings.h:50 From 4d57d42defb4cd2e400f4fb04923df621fe98f64 Mon Sep 17 00:00:00 2001 From: Ivan Yarcev Date: Wed, 7 Aug 2024 11:54:55 +0600 Subject: [PATCH 4/8] Fixed welcome page picture align --- ubinstall-gtk.glade | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ubinstall-gtk.glade b/ubinstall-gtk.glade index 258e697..fb1fc94 100644 --- a/ubinstall-gtk.glade +++ b/ubinstall-gtk.glade @@ -581,6 +581,7 @@ agreement True False + center Welcome to UBLinux installation True @@ -598,6 +599,7 @@ agreement True False + center This program will ask you few questions and help you install UBLinux on your computer True @@ -615,6 +617,8 @@ and help you install UBLinux on your computer True False + center + center 128 /com/ublinux/images/language.png From 99983baa5abe702fe48fa37bca595f7bd6c53fd0 Mon Sep 17 00:00:00 2001 From: Ivan Yarcev Date: Wed, 7 Aug 2024 14:06:49 +0600 Subject: [PATCH 5/8] Changed documentation and about menu items, as installation begins, sensitiveness of cancel button is set to 0 --- source/ubinstall-gtk.c | 12 ++++++++++-- ubinstall-gtk.glade | 19 ------------------- 2 files changed, 10 insertions(+), 21 deletions(-) diff --git a/source/ubinstall-gtk.c b/source/ubinstall-gtk.c index 8a275a7..596bd45 100644 --- a/source/ubinstall-gtk.c +++ b/source/ubinstall-gtk.c @@ -1028,6 +1028,8 @@ void on_page_changed(GtkWidget *,GtkWidget *,int page, main_window *widgets){ case YON_PAGE_INSTALLATION:{ yon_switch_page_render(widgets,3); gtk_widget_set_sensitive(widgets->BackButton,0); + if ((!main_config.configure_mode)) + gtk_widget_set_sensitive(widgets->CancelInstallButton,0); if (main_config.config_save_thread&&!main_config.configure_mode) g_thread_join(main_config.config_save_thread); if (!main_config.progress_thread&&!main_config.configure_mode) @@ -2155,8 +2157,8 @@ main_window *yon_main_window_complete(){ widgets->GpartedSameButton = yon_gtk_builder_get_widget(builder,"GpartedSameButton"); widgets->ConfigurationModeMenuItem = yon_gtk_builder_get_widget(builder,"ConfigurationModeMenuItem"); - widgets->DocumentationMenuItem = yon_gtk_builder_get_widget(builder,"DocumentationMenuItem"); - widgets->AboutMenuItem = yon_gtk_builder_get_widget(builder,"AboutMenuItem"); + widgets->DocumentationMenuItem = yon_ubl_menu_item_documentation_new(DOCUMENTATION_LABEL); + widgets->AboutMenuItem = yon_ubl_menu_item_about_new(ABOUT_LABEL); widgets->StatusBox = yon_gtk_builder_get_widget(builder,"StatusBox"); widgets->AdditionalSoftwareCell = GTK_CELL_RENDERER(gtk_builder_get_object(builder,"AdditionalSoftwareCell")); @@ -2226,6 +2228,12 @@ main_window *yon_main_window_complete(){ widgets->SameFSTypeSensitiveCheck = yon_gtk_builder_get_widget(builder,"SameFSTypeSensitiveCheck"); widgets->SameLabelSensitiveCheck = yon_gtk_builder_get_widget(builder,"SameLabelSensitiveCheck"); + GtkWidget *menu = yon_gtk_builder_get_widget(builder,"menu2"); + gtk_style_context_add_class(gtk_widget_get_style_context(widgets->DocumentationMenuItem),"menuitemmiddle"); + gtk_style_context_remove_class(gtk_widget_get_style_context(widgets->DocumentationMenuItem),"menuitemtop"); + gtk_menu_shell_append(GTK_MENU_SHELL(menu),widgets->DocumentationMenuItem); + gtk_menu_shell_append(GTK_MENU_SHELL(menu),widgets->AboutMenuItem); + g_signal_connect(G_OBJECT(widgets->LoadGlobalConfigurationMenuItem),"activate",G_CALLBACK(on_config_global_load),widgets); g_signal_connect(G_OBJECT(widgets->LoadLocalConfigurationMenuItem),"activate",G_CALLBACK(on_config_local_load),widgets); g_signal_connect(G_OBJECT(widgets->LoadExternalConfigurationMenuItem),"activate",G_CALLBACK(on_config_custom_load),widgets); diff --git a/ubinstall-gtk.glade b/ubinstall-gtk.glade index fb1fc94..1d9f769 100644 --- a/ubinstall-gtk.glade +++ b/ubinstall-gtk.glade @@ -210,30 +210,11 @@ False Configuration mode True - - - - - True - False - Documentation - True - - - True - False - About - True - - - True From da78e5519a18c2dbf56160e7965faadc55966641 Mon Sep 17 00:00:00 2001 From: Ivan Yarcev Date: Wed, 7 Aug 2024 14:09:06 +0600 Subject: [PATCH 6/8] Localisation changes --- ubinstall-gtk_ru.po | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ubinstall-gtk_ru.po b/ubinstall-gtk_ru.po index 00a0ef7..671f72a 100644 --- a/ubinstall-gtk_ru.po +++ b/ubinstall-gtk_ru.po @@ -517,7 +517,7 @@ msgstr "Начало установки ОС UBLinux" #: source/ubl-strings.h:123 msgid "Documentation" -msgstr "Документация" +msgstr "Справка" #: source/ubl-strings.h:124 msgid "About" From e6b794424449c528271845c02021867149754f24 Mon Sep 17 00:00:00 2001 From: Ivan Yarcev Date: Wed, 7 Aug 2024 14:50:04 +0600 Subject: [PATCH 7/8] Localisation fixes --- ubinstall-gtk_ru.po | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ubinstall-gtk_ru.po b/ubinstall-gtk_ru.po index 671f72a..3196368 100644 --- a/ubinstall-gtk_ru.po +++ b/ubinstall-gtk_ru.po @@ -252,7 +252,7 @@ msgstr "Пароль пользователя root:" #: source/ubl-strings.h:49 msgid "Host name:" -msgstr "Имя компьютера" +msgstr "Имя компьютера:" #: source/ubl-strings.h:50 msgid "Automatically" From 6a805d8051c8a9976b9df6acf9ce509cc8e3a37c Mon Sep 17 00:00:00 2001 From: Ivan Yarcev Date: Wed, 7 Aug 2024 18:00:33 +0600 Subject: [PATCH 8/8] Test fix for installation error crash --- source/ubinstall-gtk.c | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/source/ubinstall-gtk.c b/source/ubinstall-gtk.c index 596bd45..5c105c6 100644 --- a/source/ubinstall-gtk.c +++ b/source/ubinstall-gtk.c @@ -1046,9 +1046,24 @@ void on_page_changed(GtkWidget *,GtkWidget *,int page, main_window *widgets){ gtk_widget_hide(widgets->SaveButton); break; - case YON_PAGE_INSTALL_ERROR: + case YON_PAGE_INSTALL_ERROR:{ on_summary_log_view((GtkWidget*)NULL); - [[fallthrough]]; + + yon_switch_page_render(widgets,7); + gtk_widget_set_sensitive(widgets->BackButton,0); + gtk_widget_hide(gtk_widget_get_parent(widgets->PackageInstallationProgress)); + gtk_widget_hide(widgets->InstallationLabel); + gtk_widget_hide(widgets->PackageInstallationLabel); + gtk_widget_set_sensitive(widgets->NextButton,1); + gtk_widget_set_sensitive(widgets->CancelInstallButton,1); + main_config.install_complete=0; + main_config.save_done=0; + gtk_button_set_label(GTK_BUTTON(widgets->NextButton),RESTART_LABEL); + gtk_button_set_label(GTK_BUTTON(widgets->CancelInstallButton),EXIT_LABEL); + gtk_image_set_from_icon_name(GTK_IMAGE(gtk_button_get_image(GTK_BUTTON(widgets->NextButton))), + "com.ublinux.ubinstall-gtk.sync-symbolic",GTK_ICON_SIZE_BUTTON); + + } break; case YON_PAGE_COMPLETION:{ yon_switch_page_render(widgets,7); gtk_widget_set_sensitive(widgets->BackButton,0); @@ -1198,7 +1213,6 @@ if (window->Window){ main_config.log_progress_buzy=0; if (size){ char *final = yon_char_parsed_to_string(parsed,size,""); - // char *prev = (char*)gtk_label_get_text(GTK_LABEL(window->LogLabel)); gtk_label_set_text(GTK_LABEL(window->LogLabel),final); if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(window->ScrollToEndCheck))){ gtk_adjustment_set_value(gtk_scrolled_window_get_vadjustment(GTK_SCROLLED_WINDOW(window->ScrollWindow)),gtk_adjustment_get_upper(gtk_scrolled_window_get_vadjustment(GTK_SCROLLED_WINDOW(window->ScrollWindow)))); @@ -1835,6 +1849,7 @@ void on_page_navigation_clicked(GtkWidget *self, main_window *widgets){ switch (page){ case YON_PAGE_COMPLETION: case YON_PAGE_INSTALL_ERROR:{ + // GtkWidget *dialog = gtk_dialog_new(); gtk_main_quit(); }break; default:{