|
|
|
|
@ -915,7 +915,7 @@ void *on_config_save(void *data){
|
|
|
|
|
if (!main_config.install_complete){
|
|
|
|
|
int size=0;
|
|
|
|
|
config_str parameters = yon_config_get_all(&size);
|
|
|
|
|
main_config.install_thread=(GThread*)0x1;
|
|
|
|
|
// main_config.install_thread=(GThread*)0x1;
|
|
|
|
|
FILE *file = fopen(progress_path,"w");
|
|
|
|
|
if (file)
|
|
|
|
|
fclose(file);
|
|
|
|
|
@ -1694,8 +1694,7 @@ void on_page_navigation_clicked(GtkWidget *self, main_window *widgets){
|
|
|
|
|
}break;
|
|
|
|
|
|
|
|
|
|
case YON_PAGE_INSTALLATION_BEGIN:{
|
|
|
|
|
pthread_t tid;
|
|
|
|
|
pthread_create(&tid,NULL,on_config_save,widgets);
|
|
|
|
|
pthread_create(main_config.install_thread,NULL,on_config_save,widgets);
|
|
|
|
|
gtk_notebook_set_current_page(GTK_NOTEBOOK(widgets->Notebook),YON_PAGE_INSTALLATION);
|
|
|
|
|
} break;
|
|
|
|
|
|
|
|
|
|
@ -2087,6 +2086,27 @@ void on_gparted_open(){
|
|
|
|
|
yon_launch_app_with_arguments(open_gparted_command,NULL);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
gboolean on_yon_exit(GtkWidget *,GdkEvent*, main_window *widgets);
|
|
|
|
|
gboolean on_yon_exit(GtkWidget *,GdkEvent*, main_window *widgets){
|
|
|
|
|
GtkWidget *dialog = gtk_dialog_new_with_buttons(TITLE_LABEL,GTK_WINDOW(widgets->MainWindow),0,CANCEL_LABEL,GTK_RESPONSE_CANCEL,ACCEPT_LABEL,GTK_RESPONSE_ACCEPT,NULL);
|
|
|
|
|
|
|
|
|
|
GtkWidget *box = gtk_dialog_get_content_area(GTK_DIALOG(dialog));
|
|
|
|
|
GtkWidget *HeadLabel = gtk_label_new(EXIT_WARNING_LABEL);
|
|
|
|
|
gtk_widget_show(HeadLabel);
|
|
|
|
|
gtk_box_pack_start(GTK_BOX(box),HeadLabel,0,0,5);
|
|
|
|
|
|
|
|
|
|
int resp = gtk_dialog_run(GTK_DIALOG(dialog));
|
|
|
|
|
if (resp == GTK_RESPONSE_ACCEPT){
|
|
|
|
|
if (main_config.install_thread)
|
|
|
|
|
pthread_cancel(*main_config.install_thread);
|
|
|
|
|
return 0;
|
|
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
gtk_widget_destroy(dialog);
|
|
|
|
|
}
|
|
|
|
|
return 1;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**yon_main_window_complete(main_window *widgets)
|
|
|
|
|
* [EN]
|
|
|
|
|
*
|
|
|
|
|
@ -2260,6 +2280,7 @@ main_window *yon_main_window_complete(){
|
|
|
|
|
widgets->SameFSTypeSensitiveCheck = yon_gtk_builder_get_widget(builder,"SameFSTypeSensitiveCheck");
|
|
|
|
|
widgets->SameLabelSensitiveCheck = yon_gtk_builder_get_widget(builder,"SameLabelSensitiveCheck");
|
|
|
|
|
|
|
|
|
|
g_signal_connect(G_OBJECT(widgets->MainWindow),"delete-event",G_CALLBACK(on_yon_exit),widgets);
|
|
|
|
|
GtkWidget *menu = yon_gtk_builder_get_widget(builder,"menu2");
|
|
|
|
|
gtk_style_context_add_class(gtk_widget_get_style_context(widgets->DocumentationMenuItem),"menuitemmiddle");
|
|
|
|
|
gtk_style_context_remove_class(gtk_widget_get_style_context(widgets->DocumentationMenuItem),"menuitemtop");
|
|
|
|
|
|