From 22fcc5fcda46ae76736db598191b605dadeb9246 Mon Sep 17 00:00:00 2001 From: Ivan Yarcev Date: Mon, 20 Oct 2025 11:54:16 +0600 Subject: [PATCH] Fixes --- source/ubinstall-gtk-advanced.c | 9 +++++---- source/ubinstall-gtk-page-switch.c | 5 +++++ source/ubl-strings.h | 4 ++-- 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/source/ubinstall-gtk-advanced.c b/source/ubinstall-gtk-advanced.c index affce7f..2d87075 100644 --- a/source/ubinstall-gtk-advanced.c +++ b/source/ubinstall-gtk-advanced.c @@ -789,8 +789,9 @@ void on_advanced_virtual_device_changed(GtkWidget *, main_window *widgets){ if (!yon_char_is_empty(device)&&!yon_char_is_empty(parsed[2])&!strcmp(parsed[2],device)){ cur_device = parsed; gtk_label_set_text(GTK_LABEL(widgets->AdvancedVirtualDeviceLabel),parsed[1]); - } + } else { yon_char_parsed_free(parsed,parsed_size); + } } if (!yon_char_is_empty(device)){ GtkTreeIter iter; @@ -801,14 +802,14 @@ void on_advanced_virtual_device_changed(GtkWidget *, main_window *widgets){ gtk_tree_model_get(model,&iter,5,&status,-1); if (status) active_devices++; } - if (atoi(cur_device[3])StatusBox),COUNT_INVALID_LABEL(cur_device[4]),5,BACKGROUND_IMAGE_INFO_TYPE); + if (atoi(cur_device[3])>active_devices){ + yon_ubl_status_box_spawn(GTK_CONTAINER(widgets->StatusBox),COUNT_INVALID_LABEL(cur_device[3]),5,BACKGROUND_IMAGE_INFO_TYPE); yon_ubl_status_highlight_incorrect(widgets->AdvancedVirtualDeviceCombo); yon_char_parsed_free(cur_device,4); return; } - if (atoi(cur_device[4])%active_devices==0){ + if (atoi(cur_device[4])%active_devices!=0){ yon_ubl_status_box_spawn(GTK_CONTAINER(widgets->StatusBox),PARITY_INVALID_LABEL(cur_device[4]),5,BACKGROUND_IMAGE_INFO_TYPE); yon_ubl_status_highlight_incorrect(widgets->AdvancedVirtualDeviceCombo); yon_char_parsed_free(cur_device,4); diff --git a/source/ubinstall-gtk-page-switch.c b/source/ubinstall-gtk-page-switch.c index 4fd29ca..e33331f 100644 --- a/source/ubinstall-gtk-page-switch.c +++ b/source/ubinstall-gtk-page-switch.c @@ -29,6 +29,11 @@ enum YON_PAGES yon_page_get_next(main_window *widgets, enum YON_PAGES page){ case YON_PAGE_RECOVERY_GRUB_UPDATE: return main_config.configure_mode?YON_PAGE_INSTALLATION:YON_PAGE_INSTALLATION_BEGIN; break; case YON_PAGE_RECOVERY_OS_ONLY: return main_config.configure_mode?YON_PAGE_INSTALLATION:YON_PAGE_INSTALLATION_BEGIN; break; case YON_PAGE_RECOVERY_USRDATA_ONLY: return main_config.configure_mode?YON_PAGE_INSTALLATION:YON_PAGE_INSTALLATION_BEGIN; break; + case YON_PAGE_COMPLETED: + case YON_PAGE_INSTALL_ERROR: + case YON_PAGE_CONFIGURE_END: + on_reboot_accepted(widgets); + break; default:return YON_PAGE_WELCOME; } return YON_PAGE_WELCOME; diff --git a/source/ubl-strings.h b/source/ubl-strings.h index 2206876..29b814d 100644 --- a/source/ubl-strings.h +++ b/source/ubl-strings.h @@ -214,8 +214,8 @@ #define SAVE_AND_EXIT_LABEL _("Save and exit") #define NO_LABEL _("No") -#define PARITY_INVALID_LABEL(target) yon_char_unite(_("Cu"),target) -#define COUNT_INVALID_LABEL(target) yon_char_unite(_("Cu"),target) +#define PARITY_INVALID_LABEL(target) yon_char_unite(_("Cu"),target,NULL) +#define COUNT_INVALID_LABEL(target) yon_char_unite(_("Cues"),target,NULL) // #define _LABEL _("New section at") // #define _LABEL _("\"/ublinux-data/\" user data section")