diff --git a/locale/ubinstall-gtk.pot b/locale/ubinstall-gtk.pot index 5a173c2..8d97093 100644 --- a/locale/ubinstall-gtk.pot +++ b/locale/ubinstall-gtk.pot @@ -5360,4 +5360,10 @@ msgid "Select installation sources" msgstr "" msgid "Database update" +msgstr "" + +msgid "The required field is highlighted in green" +msgstr "" + +msgid "Authentication in the bootloader menu" msgstr "" \ No newline at end of file diff --git a/locale/ubinstall-gtk_ru.po b/locale/ubinstall-gtk_ru.po index b786b71..fc8cecf 100644 --- a/locale/ubinstall-gtk_ru.po +++ b/locale/ubinstall-gtk_ru.po @@ -5555,4 +5555,10 @@ msgid "Select installation sources" msgstr "Выберите источники для " msgid "Database update" -msgstr "Обновление баз данных" \ No newline at end of file +msgstr "Обновление баз данных" + +msgid "The required field is highlighted in green" +msgstr "Обязательное поле подсвечено зелёным" + +msgid "Authentication in the bootloader menu" +msgstr "Аутентификация в меню загрузчика" \ No newline at end of file diff --git a/source/ubinstall-gtk-components.c b/source/ubinstall-gtk-components.c index de88cf5..263e52f 100644 --- a/source/ubinstall-gtk-components.c +++ b/source/ubinstall-gtk-components.c @@ -242,6 +242,7 @@ void *yon_modules_list_load(main_window *widgets){ row->size = yon_char_unite(temp," ", size_str,NULL); free(temp); g_idle_add((GSourceFunc)yon_os_component_insert,row); + // yon_os_component_insert(row); } if (main_config.modules_size) yon_char_parsed_free(main_config.modules,main_config.modules_size); main_config.modules = modules; @@ -249,6 +250,8 @@ void *yon_modules_list_load(main_window *widgets){ } g_idle_add((GSourceFunc)yon_spinner_switch_off,widgets->OSSpinner); g_idle_add((GSourceFunc)yon_os_components_load,widgets); + // yon_spinner_switch_off(GTK_SPINNER(widgets->OSSpinner)); + // yon_os_components_load(widgets); g_thread_exit(NULL); } @@ -549,10 +552,12 @@ void yon_software_init(main_window *widgets){ row->size_raw = size; row->size = size_str; row->widgets=widgets; - g_idle_add((GSourceFunc)yon_software_insert,row); + yon_software_insert(row); + // g_idle_add((GSourceFunc)yon_software_insert,row); while(gtk_events_pending()) gtk_main_iteration(); } - g_idle_add((GSourceFunc)yon_spinner_switch_off,widgets->OSSpinner); + yon_spinner_switch_off(GTK_SPINNER(widgets->OSSpinner)); + // g_idle_add((GSourceFunc)yon_spinner_switch_off,widgets->OSSpinner); yon_char_parsed_free(base,base_size); yon_software_check_packages_size(NULL,widgets); return ; @@ -750,7 +755,6 @@ gboolean yon_pacman_fill(struct pacman_struct *pacman){ yon_char_parsed_free(loaded,size); gtk_widget_set_sensitive(widgets->PacmanSoftwareSearchEntry,1); gtk_widget_set_sensitive(widgets->PacmanSoftwareChosenPackagesTree,1); - gtk_widget_set_sensitive(widgets->PacmanSoftwareStatusButton,1); g_object_ref(G_OBJECT(widgets->MainSpinner)); gtk_container_remove(GTK_CONTAINER(widgets->PacmanLoadingOverlay),widgets->MainSpinner); return G_SOURCE_REMOVE; @@ -760,7 +764,8 @@ void *yon_pacman_load(struct pacman_struct *pacman){ const char *find_package = pacman->find_package; // char *command = get_local_module_info_command(find_package); pacman->packages = yon_packages_find(YON_PACKAGES_SYNC,find_package,&pacman->packages_size); - g_idle_add((GSourceFunc)yon_pacman_fill,pacman); + // g_idle_add((GSourceFunc)yon_pacman_fill,pacman); + yon_pacman_fill(pacman); return NULL; } @@ -782,7 +787,6 @@ void on_pacman_icon_press(GtkEntry *self,GtkEntryIconPosition icon_pos,GdkEvent* pacman->find_package=find_package; gtk_widget_set_sensitive(widgets->PacmanSoftwareSearchEntry,0); gtk_widget_set_sensitive(widgets->PacmanSoftwareChosenPackagesTree,0); - gtk_widget_set_sensitive(widgets->PacmanSoftwareStatusButton,0); gtk_overlay_add_overlay(GTK_OVERLAY(widgets->PacmanLoadingOverlay),widgets->MainSpinner); g_thread_new("pacman_modules_get_thread",(GThreadFunc)yon_pacman_load,pacman); } \ No newline at end of file diff --git a/source/ubinstall-gtk-config-hub.c b/source/ubinstall-gtk-config-hub.c index 83a68e9..7792e6d 100644 --- a/source/ubinstall-gtk-config-hub.c +++ b/source/ubinstall-gtk-config-hub.c @@ -236,6 +236,8 @@ void on_configuration_hub_open(GtkFlowBox *,GtkFlowBoxChild *child, main_window config_hub_icon *cur_icon = g_object_get_data(G_OBJECT(child),"config_hub_icon"); gtk_notebook_set_current_page(GTK_NOTEBOOK(widgets->Notebook),cur_icon->page); + yon_page_init(widgets,cur_icon->page); + yon_page_update(widgets); switch(cur_icon->page){ case YON_PAGE_OS_COMPONENTS: case YON_PAGE_KERNEL: @@ -247,8 +249,6 @@ void on_configuration_hub_open(GtkFlowBox *,GtkFlowBoxChild *child, main_window break; default: break; }; - yon_page_init(widgets,cur_icon->page); - yon_page_update(widgets); } void yon_configuration_hub_add(GtkFlowBox *target, char *name, char *icon, enum YON_PAGES page){ diff --git a/source/ubinstall-gtk-install-start.c b/source/ubinstall-gtk-install-start.c index 19caa72..85b6281 100644 --- a/source/ubinstall-gtk-install-start.c +++ b/source/ubinstall-gtk-install-start.c @@ -8,15 +8,20 @@ int yon_installation_start(main_window *widgets){ void yon_quick_install(GtkWidget *self, main_window *widgets){ if (!yon_installation_check_packages_size(widgets)) return; - main_config.save_configured=1; - gtk_widget_hide(self); - gtk_widget_show(gtk_widget_get_parent(widgets->InstallationProgress)); - pthread_create(&main_config.install_thread,NULL,on_config_save,widgets); - gtk_notebook_set_current_page(GTK_NOTEBOOK(widgets->Notebook),YON_PAGE_INSTALLATION); - if (!yon_char_is_empty(main_config.config_load_path)){ - char *command = quick_install_command(main_config.config_load_path); - yon_launch_app_with_arguments(command,NULL); + if (!main_config.dry_run){ + main_config.save_configured=1; + gtk_widget_hide(self); + gtk_widget_show(gtk_widget_get_parent(widgets->InstallationProgress)); + pthread_create(&main_config.install_thread,NULL,on_config_save,widgets); + gtk_notebook_set_current_page(GTK_NOTEBOOK(widgets->Notebook),YON_PAGE_INSTALLATION); + if (!yon_char_is_empty(main_config.config_load_path)){ + char *command = quick_install_command(main_config.config_load_path); + yon_launch_app_with_arguments(command,NULL); + } + yon_page_init(widgets,YON_PAGE_INSTALLATION); + yon_page_update(widgets); + + } else { + yon_launch("ubconfig --source system get /"); } - yon_page_init(widgets,YON_PAGE_INSTALLATION); - yon_page_update(widgets); } diff --git a/source/ubinstall-gtk-page-switch.c b/source/ubinstall-gtk-page-switch.c index e0d4fbe..bf37402 100644 --- a/source/ubinstall-gtk-page-switch.c +++ b/source/ubinstall-gtk-page-switch.c @@ -602,6 +602,7 @@ void on_page_next_clicked(GtkWidget *, main_window *widgets){ page = yon_page_get_next(widgets,page); if ((int)page!=-1){ gtk_notebook_set_current_page(GTK_NOTEBOOK(widgets->Notebook),page); + yon_page_init(widgets,page); switch(page){ case YON_PAGE_KERNEL: case YON_PAGE_KERNEL_ADDON: @@ -612,7 +613,6 @@ void on_page_next_clicked(GtkWidget *, main_window *widgets){ break; default: break; }; - yon_page_init(widgets,page); } yon_page_update(widgets); } diff --git a/source/ubinstall-gtk-saving.c b/source/ubinstall-gtk-saving.c index f5f0efd..338500e 100644 --- a/source/ubinstall-gtk-saving.c +++ b/source/ubinstall-gtk-saving.c @@ -8,22 +8,25 @@ void yon_load_proceed(YON_CONFIG_TYPE type){ if (type!=YON_CONFIG_CUSTOM){ yon_config_clean(); } - if (!yon_char_is_empty(config_get_default_command)) + if (!yon_char_is_empty(config_get_default_command)){ yon_config_load_config(YON_CONFIG_DEFAULT,config_get_default_command,NULL); + } + if (main_config.config_load_path){ + if (main_config.startup_config){ + yon_config_restore(NULL); + yon_config_custom_clean(main_config.startup_config); + } + main_config.startup_config = NULL; + yon_config_custom_load_config(&main_config.startup_config,config_get_command(main_config.config_load_path),NULL); + } switch (type){ case YON_CONFIG_LOCAL: - if (main_config.startup_config){ - yon_config_restore(NULL); - } - yon_config_custom_clean(main_config.startup_config); - main_config.startup_config = NULL; - yon_config_custom_load_config(&main_config.startup_config,config_get_command("system"),NULL); main_config.config_load_path = yon_char_new("system"); main_config.config_save_path = main_config.config_load_path; yon_config_load_config(type,config_get_command("system"),NULL); break; case YON_CONFIG_CUSTOM: - if (yon_char_is_empty(main_config.config_load_path)){ + if (yon_char_is_empty(main_config.force_ini)){ char *path = NULL; path=yon_custom_config_init(GTK_FILE_CHOOSER_ACTION_OPEN); if (!yon_char_is_empty(path)){ @@ -34,7 +37,7 @@ void yon_load_proceed(YON_CONFIG_TYPE type){ } } else { yon_config_clean(); - yon_config_load_config(type,config_get_command(main_config.config_load_path),NULL); + yon_config_load_config(type,config_get_command(main_config.force_ini),NULL); } break; default: @@ -47,11 +50,6 @@ void on_config_local_load(GtkWidget *,main_window *widgets){ on_config_custom_load_last(NULL,widgets); return; } - if (!yon_char_is_empty(main_config.config_load_path)) free(main_config.config_load_path); - main_config.config_load_path = yon_char_new("system"); - // yon_config_custom_clean(main_config.startup_config); - // main_config.startup_config = NULL; - // yon_config_custom_load_config(&main_config.startup_config,config_get_command("system"),NULL); yon_load_proceed(YON_CONFIG_LOCAL); main_config.load_mode=YON_CONFIG_LOCAL; yon_main_window_update_locale(widgets); @@ -60,18 +58,10 @@ void on_config_local_load(GtkWidget *,main_window *widgets){ void on_config_custom_load(GtkWidget *,main_window *){ char *temp_custom_path = NULL; - if (!yon_char_is_empty(main_config.config_load_path)){ - temp_custom_path = main_config.config_load_path; - main_config.config_load_path = NULL; - main_config.config_save_path = NULL; - } yon_load_proceed(YON_CONFIG_CUSTOM); if (!yon_char_is_empty(main_config.config_load_path)){ main_config.load_mode=YON_CONFIG_CUSTOM; free(temp_custom_path); - } else { - main_config.config_load_path = temp_custom_path; - main_config.config_save_path = main_config.config_load_path; } } @@ -351,14 +341,16 @@ int yon_config_save(main_window *widgets){ } void yon_config_restore(main_window *){ - yon_launch(yon_debug_output("%s\n","ubconfig --source system remove [autoinstall]")); + if (yon_char_is_empty(main_config.config_load_path)) return; + char *remove_command = yon_char_unite("ubconfig --source ",main_config.config_load_path," remove [autoinstall]",NULL); + yon_launch(yon_debug_output("%s\n",remove_command)); yon_config_custom_apply(&main_config.startup_config); yon_config_set_status_full(1); int size = 0; config_str parameters = yon_config_get_save_parameters(&size); if (size){ char *command_params = yon_char_parsed_to_string(parameters,size, " "); - char *command = yon_char_unite(ubconfig_set_command("system"),command_params,NULL); + char *command = yon_char_unite(ubconfig_set_command(main_config.config_load_path),command_params,NULL); yon_debug_output("%s\n",command); yon_launch(command); yon_char_parsed_free(parameters,size); diff --git a/source/ubinstall-gtk-startup-apps.c b/source/ubinstall-gtk-startup-apps.c index b034cc8..ce73dfa 100644 --- a/source/ubinstall-gtk-startup-apps.c +++ b/source/ubinstall-gtk-startup-apps.c @@ -165,6 +165,7 @@ startup_service_window *yon_startup_app_window_new(){ g_signal_connect(G_OBJECT(window->CancelButton),"clicked",G_CALLBACK(on_subwindow_close),NULL); g_object_set_data(G_OBJECT(window->AcceptButton),"startup_service_window",window); + yon_ubl_status_box_spawn(GTK_CONTAINER(window->StatusBox),IMPORTANT_OUTLINE_LABEL,0,BACKGROUND_IMAGE_INFO_TYPE); return window; } diff --git a/source/ubinstall-gtk-startup-services.c b/source/ubinstall-gtk-startup-services.c index 418adae..17cd010 100644 --- a/source/ubinstall-gtk-startup-services.c +++ b/source/ubinstall-gtk-startup-services.c @@ -168,6 +168,7 @@ startup_service_window *yon_startup_service_window_new(){ g_signal_connect(G_OBJECT(window->CancelButton),"clicked",G_CALLBACK(on_subwindow_close),NULL); g_object_set_data(G_OBJECT(window->AcceptButton),"startup_service_window",window); + yon_ubl_status_box_spawn(GTK_CONTAINER(window->StatusBox),IMPORTANT_OUTLINE_LABEL,0,BACKGROUND_IMAGE_INFO_TYPE); return window; } diff --git a/source/ubinstall-gtk.c b/source/ubinstall-gtk.c index 338b8e4..9751093 100644 --- a/source/ubinstall-gtk.c +++ b/source/ubinstall-gtk.c @@ -393,6 +393,7 @@ void yon_db_lock_update(GFileMonitor *,GFile *,GFile *,GFileMonitorEvent ,main_w gtk_widget_set_sensitive(widgets->KernelPacmanStatusButton,0); gtk_widget_set_sensitive(widgets->PacmanSoftwareStatusButton,0); gtk_widget_set_sensitive(widgets->KernelAddonPacmanStatusButton,0); + gtk_widget_set_sensitive(widgets->PackagesStatusButton,0); gtk_widget_set_sensitive(widgets->AdditionalComponentsStatusButton,0); } } @@ -402,6 +403,7 @@ void yon_db_unlock_update(GFileMonitor *,GFile *,GFile *,GFileMonitorEvent ,main gtk_widget_set_sensitive(widgets->KernelPacmanStatusButton,1); gtk_widget_set_sensitive(widgets->PacmanSoftwareStatusButton,1); gtk_widget_set_sensitive(widgets->KernelAddonPacmanStatusButton,1); + gtk_widget_set_sensitive(widgets->PackagesStatusButton,1); gtk_widget_set_sensitive(widgets->AdditionalComponentsStatusButton,1); } } @@ -1049,6 +1051,9 @@ void yon_main_window_create(main_window *widgets){ exit (1); } yon_config_mode_start(widgets); + } else { + yon_config_custom_load_config(&main_config.startup_config,config_get_command("system"),NULL); + } { char *command = yon_config_parameter_prepare_command(part_size_parameter_command,"default",NULL,NULL); diff --git a/source/ubl-strings.h b/source/ubl-strings.h index 2a8bf70..402aa72 100644 --- a/source/ubl-strings.h +++ b/source/ubl-strings.h @@ -306,7 +306,9 @@ NULL) #define INFO_LABEL _("Package information") #define ALREADY_RUNNING_LABEL _("Application is already running") #define DB_UPDATE_LABEL _("Database update") +#define IMPORTANT_OUTLINE_LABEL _("The required field is highlighted in green") +// #define _LABEL _("Authentication in the bootloader menu") // #define _LABEL _("Chosen size:") // #define _LABEL _("Overall size:") // #define _LABEL _("Select your language:") diff --git a/ubinstall-gtk-service-window.glade b/ubinstall-gtk-service-window.glade index e2fa23d..922f61b 100644 --- a/ubinstall-gtk-service-window.glade +++ b/ubinstall-gtk-service-window.glade @@ -72,6 +72,9 @@ True True + True diff --git a/ubinstall-gtk.css b/ubinstall-gtk.css index 61ab5cb..bd3e79f 100644 --- a/ubinstall-gtk.css +++ b/ubinstall-gtk.css @@ -20,6 +20,11 @@ background:transparent; background:transparent; } +.important_border { + border-color: #009e0f; + border-style: solid; +} + .bgcommon { background:@theme_bg_color; } diff --git a/ubinstall-gtk.glade b/ubinstall-gtk.glade index d1ea92e..5022ba5 100644 --- a/ubinstall-gtk.glade +++ b/ubinstall-gtk.glade @@ -6548,10 +6548,12 @@ Select a different installation sources. + True False 5 + True True @@ -6564,7 +6566,7 @@ Select a different installation sources. True False - Login without password request + Authentication in the bootloader menu False