|
|
|
@ -410,15 +410,23 @@ void on_gparted_update(GtkWidget *, main_window *widgets){
|
|
|
|
yon_devices_setup(widgets);
|
|
|
|
yon_devices_setup(widgets);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void on_reboot_accepted(main_window *){
|
|
|
|
void on_reboot_accepted(main_window *widgets){
|
|
|
|
g_mutex_lock(&main_config.install_mutex);
|
|
|
|
dialog_confirmation_data *data = yon_confirmation_dialog_data_new();
|
|
|
|
if (main_config.install_thread){
|
|
|
|
data->action_text=WARNING_REBOOT_TEXT_LABEL;
|
|
|
|
pthread_cancel((pthread_t)main_config.install_thread);
|
|
|
|
data->title=WARNING_TITLE_LABEL;
|
|
|
|
g_mutex_unlock(&main_config.install_mutex);
|
|
|
|
if (yon_confirmation_dialog_call(widgets->MainWindow,data)==GTK_RESPONSE_ACCEPT ){
|
|
|
|
}
|
|
|
|
g_mutex_lock(&main_config.install_mutex);
|
|
|
|
main_config.exit_accepted=1;
|
|
|
|
if (main_config.install_thread){
|
|
|
|
while(gtk_events_pending()) gtk_main_iteration();
|
|
|
|
pthread_cancel((pthread_t)main_config.install_thread);
|
|
|
|
if (system("reboot")){};
|
|
|
|
g_mutex_unlock(&main_config.install_mutex);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
main_config.exit_accepted=1;
|
|
|
|
|
|
|
|
while(gtk_events_pending()) gtk_main_iteration();
|
|
|
|
|
|
|
|
if (system("reboot")){};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
gtk_main_quit();
|
|
|
|
|
|
|
|
exit(0);
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void on_exit_accepted(main_window *){
|
|
|
|
void on_exit_accepted(main_window *){
|
|
|
|
@ -435,15 +443,16 @@ void on_exit_accepted(main_window *){
|
|
|
|
|
|
|
|
|
|
|
|
gboolean on_yon_exit(GtkWidget *,GdkEvent*, main_window *widgets){
|
|
|
|
gboolean on_yon_exit(GtkWidget *,GdkEvent*, main_window *widgets){
|
|
|
|
if (!main_config.exit_accepted||(main_config.save_done&&main_config.install_complete)){
|
|
|
|
if (!main_config.exit_accepted||(main_config.save_done&&main_config.install_complete)){
|
|
|
|
if (widgets){};
|
|
|
|
if (!main_config.install_complete&&!main_config.save_configured){
|
|
|
|
dialog_confirmation_data *data = yon_confirmation_dialog_data_new();
|
|
|
|
dialog_confirmation_data *data = yon_confirmation_dialog_data_new();
|
|
|
|
data->action_text=INTERRUPT_TEXT_LABEL;
|
|
|
|
data->action_text=INTERRUPT_TEXT_LABEL;
|
|
|
|
data->title=WARNING_TITLE_LABEL;
|
|
|
|
data->title=WARNING_TITLE_LABEL;
|
|
|
|
if (yon_confirmation_dialog_call(widgets->MainWindow,data)==GTK_RESPONSE_ACCEPT ){
|
|
|
|
if (yon_confirmation_dialog_call(widgets->MainWindow,data)==GTK_RESPONSE_ACCEPT ){
|
|
|
|
yon_window_config_save_instant();
|
|
|
|
yon_window_config_save_instant();
|
|
|
|
on_exit_accepted(widgets);
|
|
|
|
on_exit_accepted(widgets);
|
|
|
|
gtk_main_quit();
|
|
|
|
gtk_main_quit();
|
|
|
|
return 1;
|
|
|
|
return 1;
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|