From 94ccd8f4bde2cf98dc36974676d77fa70a004a94 Mon Sep 17 00:00:00 2001 From: Ivan Dmitrievich Yartsev Date: Fri, 20 Feb 2026 16:59:20 +0600 Subject: [PATCH] Test fix for missing main components in list --- source/ubinstall-gtk-components.c | 8 ++++++++ source/ubinstall-gtk.h | 3 ++- source/ubl-strings.h | 2 ++ 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/source/ubinstall-gtk-components.c b/source/ubinstall-gtk-components.c index 2cef0a4..b730643 100644 --- a/source/ubinstall-gtk-components.c +++ b/source/ubinstall-gtk-components.c @@ -207,6 +207,10 @@ gboolean yon_spinner_switch_off(GtkSpinner *target){ return G_SOURCE_REMOVE; } +void yon_modules_missed_func(main_window *widgets){ + yon_ubl_status_box_spawn(GTK_CONTAINER(widgets->StatusBox),MAIN_COMPONENTS_NOT_FOUND_LABEL,5,BACKGROUND_IMAGE_FAIL_TYPE); +} + void *yon_os_components_setup(main_window *widgets){ int base_size; config_str base = yon_config_load(get_modules_command,&base_size); @@ -223,6 +227,10 @@ void *yon_os_components_setup(main_window *widgets){ g_idle_add((GSourceFunc)yon_os_component_insert,row); } g_idle_add((GSourceFunc)yon_spinner_switch_off,widgets->OSSpinner); + if (!base_size){ + g_idle_add_once((GSourceOnceFunc)yon_modules_missed_func,widgets); + return NULL; + } yon_char_parsed_free(base,base_size); return NULL; } diff --git a/source/ubinstall-gtk.h b/source/ubinstall-gtk.h index 6c03c0a..8b19523 100755 --- a/source/ubinstall-gtk.h +++ b/source/ubinstall-gtk.h @@ -1524,4 +1524,5 @@ config_str yon_os_components_get_modules(int *size); int yon_os_components_check_packages_size(GtkWidget *, main_window *widgets); void on_pacman_search_enter(GtkEntry *self, main_window *widgets); gboolean yon_log_scroll(log_window *window); -gboolean on_log_window_exit(GtkWidget *,GdkEvent*, log_window *window); \ No newline at end of file +gboolean on_log_window_exit(GtkWidget *,GdkEvent*, log_window *window); +void yon_modules_missed_func(main_window *widgets); \ No newline at end of file diff --git a/source/ubl-strings.h b/source/ubl-strings.h index cb86d7f..aaf748d 100644 --- a/source/ubl-strings.h +++ b/source/ubl-strings.h @@ -577,3 +577,5 @@ For more information, visit our website the \"Support Levels\" section.") #define slide_22_title _("Network Boot") #define slide_22_text _("Allows system booting for diskless and standard workstations over a local network or the Internet (even over slow connection channels).") + +#define MAIN_COMPONENTS_NOT_FOUND_LABEL _("Main components does not found. Proceed back to installation type selection page and use \"Select sources\" button from below") \ No newline at end of file