From d64b86530b92d265c2d3ef939c88d371d5bf39ab Mon Sep 17 00:00:00 2001 From: Ivan Yarcev Date: Fri, 5 Jul 2024 19:55:58 +0600 Subject: [PATCH 01/15] Changed connad for backend --- 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 c79e2ce..6bb64a4 100755 --- a/source/ubinstall-gtk.h +++ b/source/ubinstall-gtk.h @@ -112,7 +112,7 @@ NULL #define part_type_parameter "AUTOINSTALL[part_fs_type]" #define part_type_parameter_command "ubconfig --source global get [autoinstall] AUTOINSTALL[part_fs_type]" -#define save_config_command(parameters) yon_char_unite("pkexec bash -c 'ubconfig --target source set [autoinstall] ",parameters, "; nice ubinstall2 autoinstall'", NULL) +#define save_config_command(parameters) yon_char_unite("pkexec bash -c 'ubconfig --target system set [autoinstall] ",parameters, "; nice ubinstall2 autoinstall'", NULL) #define set_user_config_command(parameters) yon_char_unite("pkexec bash -c 'ubconfig --target system set [autoinstall] ",parameters,";nice ubinstall2 autoconfig'",NULL) -- 2.35.1 From 7c6fbd1433a6c16f9c990ecc452ab42f11c95cdb Mon Sep 17 00:00:00 2001 From: Ivan Yarcev Date: Fri, 5 Jul 2024 20:04:02 +0600 Subject: [PATCH 02/15] Test fix for installation finshing --- source/ubinstall-gtk.c | 1 - 1 file changed, 1 deletion(-) diff --git a/source/ubinstall-gtk.c b/source/ubinstall-gtk.c index 301eea2..b8805e4 100644 --- a/source/ubinstall-gtk.c +++ b/source/ubinstall-gtk.c @@ -331,7 +331,6 @@ void *yon_installation_start(main_window *widgets){ int code = system(start_fast_install_command); // main_config.install_thread=NULL; main_config.install_complete=1; - if (!code) gtk_notebook_set_current_page(GTK_NOTEBOOK(widgets->Notebook),YON_PAGE_COMPLETION); g_thread_exit(NULL); return NULL; -- 2.35.1 From b2602de4096d94d3f5039ac42b022a7efdd36457 Mon Sep 17 00:00:00 2001 From: Ivan Yarcev Date: Fri, 5 Jul 2024 20:07:04 +0600 Subject: [PATCH 03/15] installation unused warning fix --- source/ubinstall-gtk.c | 4 +++- source/ubl-strings.h | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/source/ubinstall-gtk.c b/source/ubinstall-gtk.c index b8805e4..f8d2a9d 100644 --- a/source/ubinstall-gtk.c +++ b/source/ubinstall-gtk.c @@ -328,7 +328,9 @@ void *on_config_save(void *){ void *yon_installation_start(main_window *widgets); void *yon_installation_start(main_window *widgets){ - int code = system(start_fast_install_command); + if (system(start_fast_install_command)){ + yon_ubl_status_box_spawn(GTK_CONTAINER(widgets->StatusBox),INSTALLATION_ERROR,5,BACKGROUND_IMAGE_FAIL_TYPE); + } // main_config.install_thread=NULL; main_config.install_complete=1; gtk_notebook_set_current_page(GTK_NOTEBOOK(widgets->Notebook),YON_PAGE_COMPLETION); diff --git a/source/ubl-strings.h b/source/ubl-strings.h index ae86631..e8cd942 100644 --- a/source/ubl-strings.h +++ b/source/ubl-strings.h @@ -113,4 +113,6 @@ #define DOCUMENTATION_QUESTION_LABEL _("Would you like to read documentation in the Web?") #define DOCUMENTATION_HEAD_LABEL _("You will be redirected to documentation website where documentation is\ntranslated and supported by community.") #define DOCUMENTATION_CHECK_LABEL _("Always redirect to online documentation") -#define OPEN_DOCUMENTATION_LABEL _("Open documentation") \ No newline at end of file +#define OPEN_DOCUMENTATION_LABEL _("Open documentation") + +#define INSTALLATION_ERROR _("Installation error") \ No newline at end of file -- 2.35.1 From fc6f9b2f4228b9a0229c10a1a49280f2cdf5ad61 Mon Sep 17 00:00:00 2001 From: Ivan Yarcev Date: Fri, 5 Jul 2024 20:11:15 +0600 Subject: [PATCH 04/15] Test fir for unswitching --- source/ubinstall-gtk.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/source/ubinstall-gtk.c b/source/ubinstall-gtk.c index f8d2a9d..cb2f33e 100644 --- a/source/ubinstall-gtk.c +++ b/source/ubinstall-gtk.c @@ -328,12 +328,14 @@ void *on_config_save(void *){ void *yon_installation_start(main_window *widgets); void *yon_installation_start(main_window *widgets){ - if (system(start_fast_install_command)){ - yon_ubl_status_box_spawn(GTK_CONTAINER(widgets->StatusBox),INSTALLATION_ERROR,5,BACKGROUND_IMAGE_FAIL_TYPE); - } - // main_config.install_thread=NULL; - main_config.install_complete=1; + if (!main_config.install_complete){ + if (system(start_fast_install_command)){ + yon_ubl_status_box_spawn(GTK_CONTAINER(widgets->StatusBox),INSTALLATION_ERROR,5,BACKGROUND_IMAGE_FAIL_TYPE); + } + main_config.install_thread=NULL; + main_config.install_complete=1; gtk_notebook_set_current_page(GTK_NOTEBOOK(widgets->Notebook),YON_PAGE_COMPLETION); + } g_thread_exit(NULL); return NULL; -- 2.35.1 From e539fd3f1083e2598233e86f45fe43eb461678d0 Mon Sep 17 00:00:00 2001 From: Ivan Yarcev Date: Fri, 5 Jul 2024 20:18:57 +0600 Subject: [PATCH 05/15] Test fir for unswitching --- source/ubinstall-gtk.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/source/ubinstall-gtk.c b/source/ubinstall-gtk.c index cb2f33e..7ab3609 100644 --- a/source/ubinstall-gtk.c +++ b/source/ubinstall-gtk.c @@ -326,12 +326,22 @@ void *on_config_save(void *){ return NULL; } + +char* yon_debug_output(char *pattern,char*text); +char* yon_debug_output(char *pattern,char*text){ + if (main_config.debug_mode){ + printf(pattern,text); + } + return text; +} + void *yon_installation_start(main_window *widgets); void *yon_installation_start(main_window *widgets){ if (!main_config.install_complete){ if (system(start_fast_install_command)){ yon_ubl_status_box_spawn(GTK_CONTAINER(widgets->StatusBox),INSTALLATION_ERROR,5,BACKGROUND_IMAGE_FAIL_TYPE); } + yon_debug_output("%s\n","SUCCESS"); main_config.install_thread=NULL; main_config.install_complete=1; gtk_notebook_set_current_page(GTK_NOTEBOOK(widgets->Notebook),YON_PAGE_COMPLETION); @@ -790,7 +800,11 @@ void on_page_navigation_clicked(GtkWidget *self, main_window *widgets){ } else { yon_config_remove_by_key(xkboptions_parameter); } - gtk_notebook_set_current_page(GTK_NOTEBOOK(widgets->Notebook),YON_PAGE_INSTALLATION); + if (!main_config.install_complete){ + gtk_notebook_set_current_page(GTK_NOTEBOOK(widgets->Notebook),YON_PAGE_INSTALLATION); + } else { + gtk_notebook_set_current_page(GTK_NOTEBOOK(widgets->Notebook),YON_PAGE_COMPLETION); + } if (gtk_progress_bar_get_fraction(GTK_PROGRESS_BAR(widgets->InstallationProgress))>0.9){ pthread_t tid; pthread_create(&tid,NULL,on_setup_system_configuration,NULL); -- 2.35.1 From be13dd928d54177f0b655a98c808b653281310ad Mon Sep 17 00:00:00 2001 From: Ivan Yarcev Date: Fri, 5 Jul 2024 20:31:49 +0600 Subject: [PATCH 06/15] test fix for completion page --- source/ubinstall-gtk.c | 65 ++++++++++++++++++++++++++---------------- source/ubinstall-gtk.h | 2 ++ 2 files changed, 42 insertions(+), 25 deletions(-) diff --git a/source/ubinstall-gtk.c b/source/ubinstall-gtk.c index 7ab3609..faac6c5 100644 --- a/source/ubinstall-gtk.c +++ b/source/ubinstall-gtk.c @@ -226,6 +226,7 @@ void config_init(){ main_config.install_thread=NULL; main_config.progress_thread=0; main_config.install_complete=0; + main_config.save_done=0; } int yon_image_resize_from_container(GtkImage *target, GdkPixbuf *pixbuf_unscaled); @@ -311,22 +312,6 @@ gboolean on_image_slide(void *data){ return 1; } -void *on_config_save(void *); -void *on_config_save(void *){ - int size=0; - config_str parameters = yon_config_get_all(&size); - main_config.install_thread=(GThread*)0x1; - FILE *file = fopen(progress_path,"w"); - if (file) - fclose(file); - char *command = save_config_command(yon_char_parsed_to_string(parameters,size," ")); - if (system(command)){}; - main_config.install_thread=(GThread*)0x0; - main_config.config_save_thread=NULL; - return NULL; -} - - char* yon_debug_output(char *pattern,char*text); char* yon_debug_output(char *pattern,char*text){ if (main_config.debug_mode){ @@ -335,15 +320,41 @@ char* yon_debug_output(char *pattern,char*text){ return text; } +void *on_config_save(void *data); +void *on_config_save(void *data){ + main_window *widgets = (main_window*)data; + if (!main_config.install_complete){ + int size=0; + config_str parameters = yon_config_get_all(&size); + main_config.install_thread=(GThread*)0x1; + FILE *file = fopen(progress_path,"w"); + if (file) + fclose(file); + char *command = save_config_command(yon_char_parsed_to_string(parameters,size," ")); + if (!system(command)){ + yon_ubl_status_box_spawn(GTK_CONTAINER(widgets->StatusBox),INSTALLATION_ERROR,5,BACKGROUND_IMAGE_FAIL_TYPE); + }; + yon_debug_output("%s\n","SUCCESS"); + main_config.install_thread=NULL; + main_config.install_complete=1; + if (gtk_notebook_get_current_page(GTK_NOTEBOOK(widgets->Notebook))){ + if (main_config.save_done){ + gtk_notebook_set_current_page(GTK_NOTEBOOK(widgets->Notebook),YON_PAGE_COMPLETION); + } + } + main_config.install_thread=(GThread*)0x0; + main_config.config_save_thread=NULL; + } + return NULL; +} + + + void *yon_installation_start(main_window *widgets); void *yon_installation_start(main_window *widgets){ if (!main_config.install_complete){ if (system(start_fast_install_command)){ - yon_ubl_status_box_spawn(GTK_CONTAINER(widgets->StatusBox),INSTALLATION_ERROR,5,BACKGROUND_IMAGE_FAIL_TYPE); } - yon_debug_output("%s\n","SUCCESS"); - main_config.install_thread=NULL; - main_config.install_complete=1; gtk_notebook_set_current_page(GTK_NOTEBOOK(widgets->Notebook),YON_PAGE_COMPLETION); } g_thread_exit(NULL); @@ -460,7 +471,7 @@ void on_page_changed(GtkWidget *,GtkWidget *,int page, main_window *widgets){ gtk_image_set_from_icon_name(GTK_IMAGE(gtk_button_get_image(GTK_BUTTON(widgets->CancelInstallButton))),"com.ublinux.libublsettingsui-gtk3.reset-symbolic",GTK_ICON_SIZE_BUTTON); pthread_t tid; - pthread_create(&tid,NULL,on_config_save,NULL); + pthread_create(&tid,NULL,on_config_save,widgets); } break; case YON_PAGE_INSTALL_COMMON: @@ -471,8 +482,9 @@ void on_page_changed(GtkWidget *,GtkWidget *,int page, main_window *widgets){ } } -void *on_setup_system_configuration(void *); -void *on_setup_system_configuration(void *){ +void *on_setup_system_configuration(void *data); +void *on_setup_system_configuration(void * data){ + main_window *widgets = (main_window*)data; int size; config_str all_parameters = yon_config_get_selection_by_key(&size, user_gecos_parameter, @@ -496,6 +508,9 @@ void *on_setup_system_configuration(void *){ free(command); if (parameter_string) free(parameter_string); } + main_config.save_done=1; + if (main_config.install_complete) + gtk_notebook_set_current_page(GTK_NOTEBOOK(widgets->Notebook),YON_PAGE_COMPLETION); return NULL; } @@ -807,7 +822,7 @@ 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,NULL); + pthread_create(&tid,NULL,on_setup_system_configuration,widgets); } gtk_widget_set_sensitive(widgets->CancelInstallButton,0); gtk_widget_set_sensitive(widgets->NextButton,0); @@ -815,7 +830,7 @@ void on_page_navigation_clicked(GtkWidget *self, main_window *widgets){ }break; case YON_PAGE_INSTALLATION_BEGIN:{ pthread_t tid; - pthread_create(&tid,NULL,on_config_save,NULL); + pthread_create(&tid,NULL,on_config_save,widgets); gtk_notebook_set_current_page(GTK_NOTEBOOK(widgets->Notebook),YON_PAGE_INSTALLATION); } break; case YON_PAGE_COMPLETION: diff --git a/source/ubinstall-gtk.h b/source/ubinstall-gtk.h index 6bb64a4..b81f2c3 100755 --- a/source/ubinstall-gtk.h +++ b/source/ubinstall-gtk.h @@ -166,6 +166,8 @@ typedef struct { int always_open_documentation; int password_min_length; + + int save_done; int install_complete; int debug_mode; -- 2.35.1 From adca41a0f154a6d471c8d5a488731234aeb0af77 Mon Sep 17 00:00:00 2001 From: Ivan Yarcev Date: Fri, 5 Jul 2024 20:39:19 +0600 Subject: [PATCH 07/15] Final fix for installation completion --- source/ubinstall-gtk.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/source/ubinstall-gtk.c b/source/ubinstall-gtk.c index faac6c5..8d28498 100644 --- a/source/ubinstall-gtk.c +++ b/source/ubinstall-gtk.c @@ -331,7 +331,7 @@ void *on_config_save(void *data){ if (file) fclose(file); char *command = save_config_command(yon_char_parsed_to_string(parameters,size," ")); - if (!system(command)){ + if (system(command)){ yon_ubl_status_box_spawn(GTK_CONTAINER(widgets->StatusBox),INSTALLATION_ERROR,5,BACKGROUND_IMAGE_FAIL_TYPE); }; yon_debug_output("%s\n","SUCCESS"); @@ -465,6 +465,12 @@ void on_page_changed(GtkWidget *,GtkWidget *,int page, main_window *widgets){ break; case YON_PAGE_COMPLETION:{ gtk_widget_set_sensitive(widgets->BackButton,0); + gtk_widget_hide(widgets->InstallationProgress); + gtk_widget_hide(widgets->PackageInstallationProgress); + gtk_widget_hide(widgets->InstallationLabel); + gtk_widget_hide(widgets->PackageInstallationLabel); + 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.libublsettingsui-gtk3.sync-symbolic",GTK_ICON_SIZE_BUTTON); -- 2.35.1 From 7c4557f8414a5c2a424cad5c7bd3f7825c26fd42 Mon Sep 17 00:00:00 2001 From: Ivan Yarcev Date: Fri, 5 Jul 2024 20:40:48 +0600 Subject: [PATCH 08/15] Fixed unsensitive buttons --- source/ubinstall-gtk.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/source/ubinstall-gtk.c b/source/ubinstall-gtk.c index 8d28498..6dbbc36 100644 --- a/source/ubinstall-gtk.c +++ b/source/ubinstall-gtk.c @@ -469,6 +469,8 @@ void on_page_changed(GtkWidget *,GtkWidget *,int page, main_window *widgets){ gtk_widget_hide(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); -- 2.35.1 From f5d618e638ec744640ff176322f8fd0bd48416cd Mon Sep 17 00:00:00 2001 From: Ivan Yarcev Date: Fri, 5 Jul 2024 20:44:44 +0600 Subject: [PATCH 09/15] Fixed unsensitive buttons --- source/ubinstall-gtk.c | 2 -- source/ubinstall-gtk.h | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/source/ubinstall-gtk.c b/source/ubinstall-gtk.c index 6dbbc36..237f275 100644 --- a/source/ubinstall-gtk.c +++ b/source/ubinstall-gtk.c @@ -337,11 +337,9 @@ void *on_config_save(void *data){ yon_debug_output("%s\n","SUCCESS"); main_config.install_thread=NULL; main_config.install_complete=1; - if (gtk_notebook_get_current_page(GTK_NOTEBOOK(widgets->Notebook))){ if (main_config.save_done){ gtk_notebook_set_current_page(GTK_NOTEBOOK(widgets->Notebook),YON_PAGE_COMPLETION); } - } main_config.install_thread=(GThread*)0x0; main_config.config_save_thread=NULL; } diff --git a/source/ubinstall-gtk.h b/source/ubinstall-gtk.h index b81f2c3..6feade6 100755 --- a/source/ubinstall-gtk.h +++ b/source/ubinstall-gtk.h @@ -112,7 +112,7 @@ NULL #define part_type_parameter "AUTOINSTALL[part_fs_type]" #define part_type_parameter_command "ubconfig --source global get [autoinstall] AUTOINSTALL[part_fs_type]" -#define save_config_command(parameters) yon_char_unite("pkexec bash -c 'ubconfig --target system set [autoinstall] ",parameters, "; nice ubinstall2 autoinstall'", NULL) +#define save_config_command(parameters) yon_char_unite("pkexec bash -c 'ubconfig --target system set [autoinstall] ",parameters, "; nice ubinstall2 autoinstall --test'", NULL) #define set_user_config_command(parameters) yon_char_unite("pkexec bash -c 'ubconfig --target system set [autoinstall] ",parameters,";nice ubinstall2 autoconfig'",NULL) -- 2.35.1 From 584d6e7200adcc2b859461f67c8a5f5d3b2d86a3 Mon Sep 17 00:00:00 2001 From: Ivan Yarcev Date: Fri, 5 Jul 2024 20:45:04 +0600 Subject: [PATCH 10/15] Fixed unsensitive buttons --- 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 6feade6..b81f2c3 100755 --- a/source/ubinstall-gtk.h +++ b/source/ubinstall-gtk.h @@ -112,7 +112,7 @@ NULL #define part_type_parameter "AUTOINSTALL[part_fs_type]" #define part_type_parameter_command "ubconfig --source global get [autoinstall] AUTOINSTALL[part_fs_type]" -#define save_config_command(parameters) yon_char_unite("pkexec bash -c 'ubconfig --target system set [autoinstall] ",parameters, "; nice ubinstall2 autoinstall --test'", NULL) +#define save_config_command(parameters) yon_char_unite("pkexec bash -c 'ubconfig --target system set [autoinstall] ",parameters, "; nice ubinstall2 autoinstall'", NULL) #define set_user_config_command(parameters) yon_char_unite("pkexec bash -c 'ubconfig --target system set [autoinstall] ",parameters,";nice ubinstall2 autoconfig'",NULL) -- 2.35.1 From f009f4f6cfdba3e56dc74a1e8fa8c7ee623a90f1 Mon Sep 17 00:00:00 2001 From: Ivan Yarcev Date: Fri, 5 Jul 2024 20:47:05 +0600 Subject: [PATCH 11/15] Fixed unsensitive buttons --- source/ubinstall-gtk.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/source/ubinstall-gtk.c b/source/ubinstall-gtk.c index 237f275..2638c93 100644 --- a/source/ubinstall-gtk.c +++ b/source/ubinstall-gtk.c @@ -334,9 +334,10 @@ void *on_config_save(void *data){ if (system(command)){ yon_ubl_status_box_spawn(GTK_CONTAINER(widgets->StatusBox),INSTALLATION_ERROR,5,BACKGROUND_IMAGE_FAIL_TYPE); }; - yon_debug_output("%s\n","SUCCESS"); main_config.install_thread=NULL; + yon_debug_output("Install set to: %d\n",main_config.install_complete); main_config.install_complete=1; + yon_debug_output("Save state: %d\n",main_config.save_done); if (main_config.save_done){ gtk_notebook_set_current_page(GTK_NOTEBOOK(widgets->Notebook),YON_PAGE_COMPLETION); } @@ -515,6 +516,9 @@ void *on_setup_system_configuration(void * data){ if (parameter_string) free(parameter_string); } main_config.save_done=1; + yon_debug_output("Save changed to: %d\n",main_config.save_done); + + yon_debug_output("Install state: %d\n",main_config.install_complete); if (main_config.install_complete) gtk_notebook_set_current_page(GTK_NOTEBOOK(widgets->Notebook),YON_PAGE_COMPLETION); return NULL; -- 2.35.1 From 3a534cc296c4d89c5140b913e6d2be56c12ad27f Mon Sep 17 00:00:00 2001 From: Ivan Yarcev Date: Fri, 5 Jul 2024 20:48:34 +0600 Subject: [PATCH 12/15] Fixed unsensitive buttons --- source/ubinstall-gtk.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/source/ubinstall-gtk.c b/source/ubinstall-gtk.c index 2638c93..70df4a9 100644 --- a/source/ubinstall-gtk.c +++ b/source/ubinstall-gtk.c @@ -335,9 +335,9 @@ void *on_config_save(void *data){ yon_ubl_status_box_spawn(GTK_CONTAINER(widgets->StatusBox),INSTALLATION_ERROR,5,BACKGROUND_IMAGE_FAIL_TYPE); }; main_config.install_thread=NULL; - yon_debug_output("Install set to: %d\n",main_config.install_complete); + yon_debug_output("Install set to: %s\n",yon_char_from_int(main_config.install_complete)); main_config.install_complete=1; - yon_debug_output("Save state: %d\n",main_config.save_done); + yon_debug_output("Save state: %s\n",yon_char_from_int(main_config.save_done)); if (main_config.save_done){ gtk_notebook_set_current_page(GTK_NOTEBOOK(widgets->Notebook),YON_PAGE_COMPLETION); } @@ -516,9 +516,9 @@ void *on_setup_system_configuration(void * data){ if (parameter_string) free(parameter_string); } main_config.save_done=1; - yon_debug_output("Save changed to: %d\n",main_config.save_done); + yon_debug_output("Save changed to: %s\n",yon_char_from_int(main_config.save_done)); - yon_debug_output("Install state: %d\n",main_config.install_complete); + yon_debug_output("Install state: %s\n",yon_char_from_int(main_config.install_complete)); if (main_config.install_complete) gtk_notebook_set_current_page(GTK_NOTEBOOK(widgets->Notebook),YON_PAGE_COMPLETION); return NULL; -- 2.35.1 From 032f3b6a9d4852223fffc51dc39ddebc987efb63 Mon Sep 17 00:00:00 2001 From: Ivan Yarcev Date: Fri, 5 Jul 2024 20:56:43 +0600 Subject: [PATCH 13/15] Fixed unsensitive buttons --- source/ubinstall-gtk.c | 29 +++++++---------------------- 1 file changed, 7 insertions(+), 22 deletions(-) diff --git a/source/ubinstall-gtk.c b/source/ubinstall-gtk.c index 70df4a9..e5e9234 100644 --- a/source/ubinstall-gtk.c +++ b/source/ubinstall-gtk.c @@ -335,32 +335,17 @@ void *on_config_save(void *data){ yon_ubl_status_box_spawn(GTK_CONTAINER(widgets->StatusBox),INSTALLATION_ERROR,5,BACKGROUND_IMAGE_FAIL_TYPE); }; main_config.install_thread=NULL; - yon_debug_output("Install set to: %s\n",yon_char_from_int(main_config.install_complete)); main_config.install_complete=1; + yon_debug_output("Install set to: %s\n",yon_char_from_int(main_config.install_complete)); yon_debug_output("Save state: %s\n",yon_char_from_int(main_config.save_done)); if (main_config.save_done){ gtk_notebook_set_current_page(GTK_NOTEBOOK(widgets->Notebook),YON_PAGE_COMPLETION); } - main_config.install_thread=(GThread*)0x0; main_config.config_save_thread=NULL; } return NULL; } - - -void *yon_installation_start(main_window *widgets); -void *yon_installation_start(main_window *widgets){ - if (!main_config.install_complete){ - if (system(start_fast_install_command)){ - } - gtk_notebook_set_current_page(GTK_NOTEBOOK(widgets->Notebook),YON_PAGE_COMPLETION); - } - g_thread_exit(NULL); - return NULL; - -} - gboolean yon_installation_progress_update(void *data); gboolean yon_installation_progress_update(void *data){ main_window *widgets = (main_window*)data; @@ -515,12 +500,6 @@ void *on_setup_system_configuration(void * data){ free(command); if (parameter_string) free(parameter_string); } - main_config.save_done=1; - yon_debug_output("Save changed to: %s\n",yon_char_from_int(main_config.save_done)); - - yon_debug_output("Install state: %s\n",yon_char_from_int(main_config.install_complete)); - if (main_config.install_complete) - gtk_notebook_set_current_page(GTK_NOTEBOOK(widgets->Notebook),YON_PAGE_COMPLETION); return NULL; } @@ -834,6 +813,12 @@ void on_page_navigation_clicked(GtkWidget *self, main_window *widgets){ pthread_t tid; pthread_create(&tid,NULL,on_setup_system_configuration,widgets); } + main_config.save_done=1; + yon_debug_output("Save changed to: %s\n",yon_char_from_int(main_config.save_done)); + + yon_debug_output("Install state: %s\n",yon_char_from_int(main_config.install_complete)); + if (main_config.install_complete) + gtk_notebook_set_current_page(GTK_NOTEBOOK(widgets->Notebook),YON_PAGE_COMPLETION); gtk_widget_set_sensitive(widgets->CancelInstallButton,0); gtk_widget_set_sensitive(widgets->NextButton,0); gtk_widget_set_sensitive(widgets->BackButton,0); -- 2.35.1 From 7ad06cb332c803f2d6852bbfed27bee1827da307 Mon Sep 17 00:00:00 2001 From: Ivan Yarcev Date: Fri, 5 Jul 2024 20:57:37 +0600 Subject: [PATCH 14/15] Fixed unsensitive buttons --- source/ubinstall-gtk.c | 1 + 1 file changed, 1 insertion(+) diff --git a/source/ubinstall-gtk.c b/source/ubinstall-gtk.c index e5e9234..b957b80 100644 --- a/source/ubinstall-gtk.c +++ b/source/ubinstall-gtk.c @@ -477,6 +477,7 @@ void on_page_changed(GtkWidget *,GtkWidget *,int page, main_window *widgets){ void *on_setup_system_configuration(void *data); void *on_setup_system_configuration(void * data){ main_window *widgets = (main_window*)data; + if (widgets){}; int size; config_str all_parameters = yon_config_get_selection_by_key(&size, user_gecos_parameter, -- 2.35.1 From e78d68fb5f7f3bc1e6aac74a30267ce245932049 Mon Sep 17 00:00:00 2001 From: Ivan Yarcev Date: Fri, 5 Jul 2024 21:07:07 +0600 Subject: [PATCH 15/15] Fixed unsensitive buttons --- source/ubinstall-gtk.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/ubinstall-gtk.c b/source/ubinstall-gtk.c index b957b80..6e3dec2 100644 --- a/source/ubinstall-gtk.c +++ b/source/ubinstall-gtk.c @@ -462,8 +462,8 @@ void on_page_changed(GtkWidget *,GtkWidget *,int page, main_window *widgets){ gtk_image_set_from_icon_name(GTK_IMAGE(gtk_button_get_image(GTK_BUTTON(widgets->NextButton))),"com.ublinux.libublsettingsui-gtk3.sync-symbolic",GTK_ICON_SIZE_BUTTON); gtk_image_set_from_icon_name(GTK_IMAGE(gtk_button_get_image(GTK_BUTTON(widgets->CancelInstallButton))),"com.ublinux.libublsettingsui-gtk3.reset-symbolic",GTK_ICON_SIZE_BUTTON); - pthread_t tid; - pthread_create(&tid,NULL,on_config_save,widgets); + // pthread_t tid; + // pthread_create(&tid,NULL,on_config_save,widgets); } break; case YON_PAGE_INSTALL_COMMON: -- 2.35.1