From e3f127825993ffe2947307d46bfb790bcf4494d8 Mon Sep 17 00:00:00 2001 From: Ivan Dmitrievich Yartsev Date: Fri, 16 Jan 2026 17:50:50 +0000 Subject: [PATCH] Fixed source switch fix --- source/ubinstall-gtk-bootloader.c | 10 ++++++---- source/ubinstall-gtk-page-switch.c | 6 ++++-- source/ubinstall-gtk-source.c | 10 ++++++++-- 3 files changed, 18 insertions(+), 8 deletions(-) diff --git a/source/ubinstall-gtk-bootloader.c b/source/ubinstall-gtk-bootloader.c index a315b5d..b493086 100644 --- a/source/ubinstall-gtk-bootloader.c +++ b/source/ubinstall-gtk-bootloader.c @@ -164,7 +164,8 @@ void on_bootloader_user_add(GtkWidget *, main_window *widgets){ void yon_menu_open_submenu(yon_menu_window *window, yon_menu_item *item){ int size; config_str options = yon_config_load(get_menus_entry_command,&size); - textdomain("ublinux-init-grub-functions"); + bind_textdomain_codeset("ublinux-init-grub-functions","UTF-8"); + for (int i=1;iMenuWindow), GTK_WINDOW(widgets->MainWindow)); diff --git a/source/ubinstall-gtk-page-switch.c b/source/ubinstall-gtk-page-switch.c index c533447..bc86d60 100644 --- a/source/ubinstall-gtk-page-switch.c +++ b/source/ubinstall-gtk-page-switch.c @@ -38,12 +38,14 @@ enum YON_PAGES yon_page_get_next(main_window *widgets, enum YON_PAGES page){ case YON_PAGE_INSTALLATION: return YON_PAGE_COMPLETION; break; case YON_PAGE_CONFIGURE_SAVE: break; + case YON_PAGE_CONFIGURE_END: + gtk_main_quit(); + exit(0); + break; case YON_PAGE_COMPLETED: case YON_PAGE_INSTALL_ERROR: - case YON_PAGE_CONFIGURE_END: case YON_PAGE_RECOVERY_COMPLETION: case YON_PAGE_COMPLETION: - on_reboot_accepted(widgets); break; // default:return YON_PAGE_WELCOME; diff --git a/source/ubinstall-gtk-source.c b/source/ubinstall-gtk-source.c index e052630..17dd8b2 100644 --- a/source/ubinstall-gtk-source.c +++ b/source/ubinstall-gtk-source.c @@ -18,7 +18,7 @@ void yon_source_update(source_window *window){ GList *iter; for (iter = list; iter; iter = iter->next){ source_element *element = (source_element*)g_object_get_data(G_OBJECT(iter->data),"source_element"); - if (!iter->next){ + if (!iter->next&&!element->AddButton){ GtkWidget *button = gtk_button_new_from_icon_name(add_icon_path,GTK_ICON_SIZE_BUTTON); g_signal_connect(G_OBJECT(button),"clicked",G_CALLBACK(on_source_add),window); gtk_box_pack_end(GTK_BOX(element->MainBox),button,0,0,0); @@ -26,12 +26,18 @@ void yon_source_update(source_window *window){ gtk_style_context_add_class(gtk_widget_get_style_context(button),"thin"); gtk_style_context_add_class(gtk_widget_get_style_context(button),"instant"); gtk_widget_show(button); - } else { + } else if (iter->next){ if (element->AddButton) { gtk_widget_destroy(element->AddButton); element->AddButton = NULL; } } + + if (!iter->next&&!iter->prev){ + gtk_widget_hide(element->RemoveButton); + } else { + gtk_widget_show(element->RemoveButton); + } } }