|
|
|
@ -2185,36 +2185,39 @@ void on_gparted_open(){
|
|
|
|
yon_launch_app_with_arguments(open_gparted_command,NULL);
|
|
|
|
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);
|
|
|
|
// void on_exit_accepted(GtkWidget *,main_window *widgets);
|
|
|
|
|
|
|
|
// void on_exit_accepted(GtkWidget *,main_window *widgets){
|
|
|
|
void on_exit_accepted(GtkWidget *,main_window *widgets);
|
|
|
|
// if (main_config.install_thread){
|
|
|
|
void on_exit_accepted(GtkWidget *,main_window *widgets){
|
|
|
|
// pthread_cancel((pthread_t)main_config.install_thread);
|
|
|
|
if (main_config.install_thread){
|
|
|
|
// }
|
|
|
|
pthread_cancel((pthread_t)main_config.install_thread);
|
|
|
|
// main_config.exit_accepted=1;
|
|
|
|
}
|
|
|
|
// g_signal_emit_by_name(G_OBJECT(widgets->MainWindow),"destroy",widgets->MainWindow,NULL);
|
|
|
|
main_config.exit_accepted=1;
|
|
|
|
// }
|
|
|
|
g_signal_emit_by_name(G_OBJECT(widgets->MainWindow),"delete-event",widgets->MainWindow,NULL);
|
|
|
|
|
|
|
|
gtk_widget_destroy(widgets->MainWindow);
|
|
|
|
// gboolean on_yon_exit(GtkWidget *,GdkEvent*, main_window *widgets){
|
|
|
|
}
|
|
|
|
// if (!main_config.exit_accepted){
|
|
|
|
|
|
|
|
// if (widgets){};
|
|
|
|
gboolean on_yon_exit(GtkWidget *,GdkEvent*, main_window *widgets){
|
|
|
|
// confirmation_window *window = malloc(sizeof(confirmation_window));
|
|
|
|
if (!main_config.exit_accepted){
|
|
|
|
// GtkBuilder *builder = gtk_builder_new_from_resource(glade_path_confirmation);
|
|
|
|
if (widgets){};
|
|
|
|
// window->Window = yon_gtk_builder_get_widget(builder,"MainWindow");
|
|
|
|
confirmation_window *window = malloc(sizeof(confirmation_window));
|
|
|
|
// window->AcceptButton = yon_gtk_builder_get_widget(builder,"AcceptButton");
|
|
|
|
GtkBuilder *builder = gtk_builder_new_from_resource(glade_path_confirmation);
|
|
|
|
// window->CancelButton = yon_gtk_builder_get_widget(builder,"CancelButton");
|
|
|
|
window->Window = yon_gtk_builder_get_widget(builder,"MainWindow");
|
|
|
|
// g_signal_connect(G_OBJECT(window->AcceptButton),"clicked",G_CALLBACK(on_exit_accepted),widgets);
|
|
|
|
window->AcceptButton = yon_gtk_builder_get_widget(builder,"AcceptButton");
|
|
|
|
// g_signal_connect(G_OBJECT(window->AcceptButton),"clicked",G_CALLBACK(on_subwindow_close),NULL);
|
|
|
|
window->CancelButton = yon_gtk_builder_get_widget(builder,"CancelButton");
|
|
|
|
// gtk_window_set_transient_for(GTK_WINDOW(window->Window),GTK_WINDOW(widgets->MainWindow));
|
|
|
|
g_signal_connect(G_OBJECT(window->AcceptButton),"clicked",G_CALLBACK(on_exit_accepted),widgets);
|
|
|
|
// gtk_window_set_title(GTK_WINDOW(window->Window),TITLE_LABEL);
|
|
|
|
g_signal_connect(G_OBJECT(window->AcceptButton),"clicked",G_CALLBACK(on_subwindow_close),NULL);
|
|
|
|
// gtk_window_set_icon_name(GTK_WINDOW(window->Window),icon_path);
|
|
|
|
gtk_window_set_transient_for(GTK_WINDOW(window->Window),GTK_WINDOW(widgets->MainWindow));
|
|
|
|
// gtk_widget_show(window->Window);
|
|
|
|
gtk_window_set_title(GTK_WINDOW(window->Window),TITLE_LABEL);
|
|
|
|
|
|
|
|
gtk_window_set_icon_name(GTK_WINDOW(window->Window),icon_path);
|
|
|
|
// return 1;
|
|
|
|
gtk_widget_show(window->Window);
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// return 0;
|
|
|
|
return 1;
|
|
|
|
// }
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**yon_main_window_complete(main_window *widgets)
|
|
|
|
/**yon_main_window_complete(main_window *widgets)
|
|
|
|
* [EN]
|
|
|
|
* [EN]
|
|
|
|
@ -2389,7 +2392,7 @@ main_window *yon_main_window_complete(){
|
|
|
|
widgets->SameFSTypeSensitiveCheck = yon_gtk_builder_get_widget(builder,"SameFSTypeSensitiveCheck");
|
|
|
|
widgets->SameFSTypeSensitiveCheck = yon_gtk_builder_get_widget(builder,"SameFSTypeSensitiveCheck");
|
|
|
|
widgets->SameLabelSensitiveCheck = yon_gtk_builder_get_widget(builder,"SameLabelSensitiveCheck");
|
|
|
|
widgets->SameLabelSensitiveCheck = yon_gtk_builder_get_widget(builder,"SameLabelSensitiveCheck");
|
|
|
|
|
|
|
|
|
|
|
|
// g_signal_connect(G_OBJECT(widgets->MainWindow),"delete-event",G_CALLBACK(on_yon_exit),widgets);
|
|
|
|
g_signal_connect(G_OBJECT(widgets->MainWindow),"delete-event",G_CALLBACK(on_yon_exit),widgets);
|
|
|
|
GtkWidget *menu = yon_gtk_builder_get_widget(builder,"menu2");
|
|
|
|
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_add_class(gtk_widget_get_style_context(widgets->DocumentationMenuItem),"menuitemmiddle");
|
|
|
|
gtk_style_context_remove_class(gtk_widget_get_style_context(widgets->DocumentationMenuItem),"menuitemtop");
|
|
|
|
gtk_style_context_remove_class(gtk_widget_get_style_context(widgets->DocumentationMenuItem),"menuitemtop");
|
|
|
|
|