From 719b4251603784033bc89f8441d9961ba85e67b4 Mon Sep 17 00:00:00 2001 From: Ivan Yarcev Date: Wed, 29 Oct 2025 11:51:11 +0600 Subject: [PATCH] Fixed config mode cancelation --- source/ubinstall-gtk-configuration-mode.c | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/source/ubinstall-gtk-configuration-mode.c b/source/ubinstall-gtk-configuration-mode.c index 2d4f99f..2e97ea6 100644 --- a/source/ubinstall-gtk-configuration-mode.c +++ b/source/ubinstall-gtk-configuration-mode.c @@ -53,18 +53,20 @@ void on_configuration_mode_switch(GtkWidget *self,main_window *widgets){ gtk_widget_show(window->Window); gtk_main(); - yon_ubl_status_box_spawn_infinite(GTK_CONTAINER(widgets->StatusBox),"config_mode",CONFIGURATION_MODE_STATUS_LABEL,BACKGROUND_IMAGE_INFO_TYPE); - yon_ubl_status_box_spawn_infinite(GTK_CONTAINER(widgets->StatusBox2),"config_mede",CONFIG_PATH_LABEL(main_config.config_save_path),BACKGROUND_IMAGE_INFO_TYPE); - GList *revealerlist = gtk_container_get_children(GTK_CONTAINER(widgets->StatusBox2)); - GList *list = gtk_container_get_children(GTK_CONTAINER(g_list_nth_data(revealerlist,0))); - GtkWidget *box = GTK_WIDGET(list->data); + if (main_config.config_save_path){ + yon_ubl_status_box_spawn_infinite(GTK_CONTAINER(widgets->StatusBox),"config_mode",CONFIGURATION_MODE_STATUS_LABEL,BACKGROUND_IMAGE_INFO_TYPE); + yon_ubl_status_box_spawn_infinite(GTK_CONTAINER(widgets->StatusBox2),"config_mede",CONFIG_PATH_LABEL(main_config.config_save_path),BACKGROUND_IMAGE_INFO_TYPE); + GList *revealerlist = gtk_container_get_children(GTK_CONTAINER(widgets->StatusBox2)); + GList *list = gtk_container_get_children(GTK_CONTAINER(g_list_nth_data(revealerlist,0))); + GtkWidget *box = GTK_WIDGET(list->data); - g_list_free(revealerlist); - g_list_free(list); + g_list_free(revealerlist); + g_list_free(list); - gtk_style_context_remove_class(gtk_widget_get_style_context(box),"boxInfoMessOK"); - gtk_style_context_add_class(gtk_widget_get_style_context(box),"boxInfoMessGray"); - main_config.configure_mode = 1; + gtk_style_context_remove_class(gtk_widget_get_style_context(box),"boxInfoMessOK"); + gtk_style_context_add_class(gtk_widget_get_style_context(box),"boxInfoMessGray"); + main_config.configure_mode = 1; + } gtk_widget_destroy(window->Window); return;