diff --git a/source/ubinstall-gtk-page-switch.c b/source/ubinstall-gtk-page-switch.c index e27be95..01ff02a 100644 --- a/source/ubinstall-gtk-page-switch.c +++ b/source/ubinstall-gtk-page-switch.c @@ -525,6 +525,8 @@ void on_page_cancel_clicked(GtkWidget *, main_window *widgets){ case YON_PAGE_INSTALL_ERROR: case YON_PAGE_CONFIGURE_SAVE: case YON_PAGE_COMPLETION: + yon_config_restore(widgets); + gtk_main_quit(); break; default: { diff --git a/source/ubinstall-gtk-saving.c b/source/ubinstall-gtk-saving.c index bd462c0..5f1d6c7 100644 --- a/source/ubinstall-gtk-saving.c +++ b/source/ubinstall-gtk-saving.c @@ -93,7 +93,6 @@ void on_config_global_save(GtkWidget *,main_window *widgets){ gboolean on_install_success(main_window *widgets){ gtk_label_set_text(GTK_LABEL(widgets->InstallationLabel),""); - yon_config_restore(widgets); on_page_next_clicked(NULL,widgets); return 0; diff --git a/source/ubinstall-gtk.c b/source/ubinstall-gtk.c index 217e898..8c4d573 100644 --- a/source/ubinstall-gtk.c +++ b/source/ubinstall-gtk.c @@ -234,6 +234,7 @@ void on_reboot_accepted(main_window *widgets){ g_mutex_unlock(&main_config.install_mutex); } main_config.exit_accepted=1; + yon_config_restore(widgets); while(gtk_events_pending()) gtk_main_iteration(); if (system("reboot")){}; @@ -242,12 +243,13 @@ void on_reboot_accepted(main_window *widgets){ } } -void on_exit_accepted(main_window *){ +void on_exit_accepted(main_window *widgets){ g_mutex_lock(&main_config.install_mutex); if (main_config.install_thread){ pthread_cancel((pthread_t)main_config.install_thread); g_mutex_unlock(&main_config.install_mutex); } + yon_config_restore(widgets); main_config.exit_accepted=1; while(gtk_events_pending()) gtk_main_iteration(); } @@ -265,6 +267,7 @@ gboolean on_yon_exit(GtkWidget *,GdkEvent*, main_window *widgets){ return 1; } } else { + yon_config_restore(widgets); on_exit_accepted(widgets); gtk_main_quit(); }