From dcd63f3dc5122fb807ed1f347a507a632e3bd8af Mon Sep 17 00:00:00 2001 From: Ivan Yarcev Date: Mon, 27 Oct 2025 18:16:58 +0600 Subject: [PATCH] --ini replaced with --file from library --- source/ubinstall-gtk-page-switch.c | 2 +- source/ubinstall-gtk.c | 9 +-------- source/ubinstall-gtk.h | 3 --- 3 files changed, 2 insertions(+), 12 deletions(-) diff --git a/source/ubinstall-gtk-page-switch.c b/source/ubinstall-gtk-page-switch.c index e493db7..8868485 100644 --- a/source/ubinstall-gtk-page-switch.c +++ b/source/ubinstall-gtk-page-switch.c @@ -293,7 +293,7 @@ void yon_switch_page_render(main_window *widgets){ void yon_configuration_mode_check(main_window *widgets){ enum YON_PAGES page = gtk_notebook_get_current_page(GTK_NOTEBOOK(widgets->Notebook)); - if (page==YON_PAGE_WELCOME){ + if (page==YON_PAGE_WELCOME&&!main_config.force_ini){ gtk_widget_set_sensitive(widgets->ConfigurationModeMenuItem,1); } else { gtk_widget_set_sensitive(widgets->ConfigurationModeMenuItem,0); diff --git a/source/ubinstall-gtk.c b/source/ubinstall-gtk.c index 4d4c844..a06d7f8 100644 --- a/source/ubinstall-gtk.c +++ b/source/ubinstall-gtk.c @@ -1183,22 +1183,15 @@ int main(int argc, char *argv[]){ int option_index = 0; struct option long_options[] = { {"dry-run", 0, 0, 'D'}, - {"ini", 1, 0, 'I'}, {NULL, 0, NULL, 0} }; optind = 1; for (int i = 0; i < size; i++) { - int argument = getopt_long(argc, argv, "DI:", long_options, &option_index); + int argument = getopt_long(argc, argv, "D", long_options, &option_index); switch (argument) { case 'D': main_config.dry_run = 1; break; - case 'I': - main_config.force_ini = yon_char_new(optarg); - main_config.config_load_path = main_config.force_ini; - main_config.config_save_path = main_config.force_ini; - main_config.configure_mode = 1; - break; default: break; } diff --git a/source/ubinstall-gtk.h b/source/ubinstall-gtk.h index 61bf5ce..829ac4d 100755 --- a/source/ubinstall-gtk.h +++ b/source/ubinstall-gtk.h @@ -395,11 +395,8 @@ typedef struct { GHashTable *network_types; GtkWidget *kernel_unchosen_radio; - char *config_load_path; - char *config_save_path; unsigned int cur_slide; gboolean dry_run; - char *force_ini; } config; extern config main_config;