From 2b52f8a86420c44a94b014e331c79ad281185b25 Mon Sep 17 00:00:00 2001 From: Tim Janik Date: Thu, 12 Mar 1998 22:01:43 +0000 Subject: [PATCH] fixed a lot of the destroy handlers and delete_event handlers, still not everything perfect, though. -timj --- app/about_dialog.c | 2 - app/actions/help-commands.c | 6 +-- app/app_procs.c | 5 ++- app/base/color-balance.c | 2 +- app/base/curves.c | 2 +- app/base/hue-saturation.c | 2 +- app/base/threshold.c | 2 +- app/brightness_contrast.c | 2 +- app/brush_select.c | 2 +- app/by_color_select.c | 2 +- app/channel_ops.c | 2 +- app/channels_dialog.c | 4 +- app/color_balance.c | 2 +- app/color_select.c | 2 +- app/commands.c | 6 +-- app/convert.c | 4 +- app/core/gimp-edit.c | 2 +- app/core/gimpdrawable-offset.c | 2 +- app/core/gimpedit.c | 2 +- app/core/gimpimage-convert.c | 4 +- app/core/gimpimage-duplicate.c | 2 +- app/curves.c | 2 +- app/dialogs/about-dialog.c | 2 - app/dialogs/info-dialog.c | 6 +-- app/dialogs/tips-dialog.c | 4 +- app/dialogs/user-install-dialog.c | 6 +++ app/display/gimpdisplay-ops.c | 2 +- app/display/gimpdisplayshell-draw.c | 4 +- app/display/gimpdisplayshell.c | 4 +- app/fileops.c | 54 ++++++++++---------------- app/gdisplay_ops.c | 2 +- app/gimpdrawable-offset.c | 2 +- app/gimpimage-convert.c | 4 +- app/gimpimage-duplicate.c | 2 +- app/global_edit.c | 2 +- app/gradient.c | 2 +- app/gradient_editor.c | 2 +- app/gui/about-dialog.c | 2 - app/gui/brush-select.c | 2 +- app/gui/channels-dialog.c | 4 +- app/gui/color-select.c | 2 +- app/gui/commands.c | 6 +-- app/gui/gradient-editor.c | 2 +- app/gui/help-commands.c | 6 +-- app/gui/info-dialog.c | 6 +-- app/gui/layers-dialog.c | 18 ++++----- app/gui/palette-editor.c | 2 +- app/gui/pattern-select.c | 2 +- app/gui/tips-dialog.c | 4 +- app/gui/user-install-dialog.c | 6 +++ app/histogram_tool.c | 2 +- app/hue_saturation.c | 2 +- app/indexed_palette.c | 22 ++++------- app/info_dialog.c | 6 +-- app/install.c | 6 +++ app/interface.c | 4 +- app/layers_dialog.c | 18 ++++----- app/levels.c | 2 +- app/palette.c | 2 +- app/pattern_select.c | 2 +- app/posterize.c | 2 +- app/text_tool.c | 2 +- app/threshold.c | 2 +- app/tips_dialog.c | 4 +- app/tools.c | 2 +- app/tools/brightness_contrast.c | 2 +- app/tools/by_color_select.c | 2 +- app/tools/color_balance.c | 2 +- app/tools/curves.c | 2 +- app/tools/gimpbrightnesscontrasttool.c | 2 +- app/tools/gimpbycolorselecttool.c | 2 +- app/tools/gimpcolorbalancetool.c | 2 +- app/tools/gimpcurvestool.c | 2 +- app/tools/gimphistogramtool.c | 2 +- app/tools/gimphuesaturationtool.c | 2 +- app/tools/gimplevelstool.c | 2 +- app/tools/gimpposterizetool.c | 2 +- app/tools/gimptexttool.c | 2 +- app/tools/gimpthresholdtool.c | 2 +- app/tools/histogram_tool.c | 2 +- app/tools/hue_saturation.c | 2 +- app/tools/levels.c | 2 +- app/tools/posterize.c | 2 +- app/tools/text_tool.c | 2 +- app/tools/threshold.c | 2 +- app/tools/tools.c | 2 +- app/user_install.c | 6 +++ app/widgets/gimpgradienteditor.c | 2 +- app/widgets/gimppaletteeditor.c | 2 +- libgimpwidgets/gimpcolorselect.c | 2 +- 90 files changed, 183 insertions(+), 170 deletions(-) diff --git a/app/about_dialog.c b/app/about_dialog.c index 28a683d480..2644332963 100644 --- a/app/about_dialog.c +++ b/app/about_dialog.c @@ -122,8 +122,6 @@ about_dialog_create (int timeout) gtk_window_position (GTK_WINDOW (about_dialog), GTK_WIN_POS_CENTER); gtk_signal_connect (GTK_OBJECT (about_dialog), "destroy", (GtkSignalFunc) about_dialog_destroy, NULL); - gtk_signal_connect (GTK_OBJECT (about_dialog), "delete_event", - (GtkSignalFunc) about_dialog_destroy, NULL); gtk_signal_connect (GTK_OBJECT (about_dialog), "unmap_event", (GtkSignalFunc) about_dialog_unmap, NULL); gtk_signal_connect (GTK_OBJECT (about_dialog), "button_press_event", diff --git a/app/actions/help-commands.c b/app/actions/help-commands.c index 9a70844e0b..3522d51994 100644 --- a/app/actions/help-commands.c +++ b/app/actions/help-commands.c @@ -232,7 +232,7 @@ file_new_delete_callback (GtkWidget *widget, { file_new_cancel_callback (widget, data); - return FALSE; + return TRUE; } @@ -751,7 +751,7 @@ file_prefs_delete_callback (GtkWidget *widget, file_prefs_cancel_callback (widget, dlg); /* the widget is already destroyed here no need to try again */ - return FALSE; + return TRUE; } static void @@ -2457,7 +2457,7 @@ image_delete_callback (GtkWidget *w, { image_cancel_callback (w, client_data); - return FALSE; + return TRUE; } diff --git a/app/app_procs.c b/app/app_procs.c index a0dedc8314..e64db71c60 100644 --- a/app/app_procs.c +++ b/app/app_procs.c @@ -318,6 +318,9 @@ make_initialization_status_window(void) GtkWidget *vbox; win_initstatus = gtk_window_new(GTK_WINDOW_DIALOG); + gtk_signal_connect (GTK_OBJECT (win_initstatus), "delete_event", + GTK_SIGNAL_FUNC (gtk_true), + NULL); gtk_window_set_wmclass (GTK_WINDOW(win_initstatus), "gimp_startup", "Gimp"); gtk_window_set_title(GTK_WINDOW(win_initstatus), "GIMP Startup"); @@ -584,7 +587,7 @@ really_quit_delete_callback (GtkWidget *widget, { really_quit_cancel_callback (GTK_BUTTON(widget), (GtkWidget *) client_data); - return FALSE; + return TRUE; } static void diff --git a/app/base/color-balance.c b/app/base/color-balance.c index 5046f0d3e8..59f3fd528b 100644 --- a/app/base/color-balance.c +++ b/app/base/color-balance.c @@ -643,7 +643,7 @@ color_balance_delete_callback (GtkWidget *w, { color_balance_cancel_callback (w, client_data); - return FALSE; + return TRUE; } static void diff --git a/app/base/curves.c b/app/base/curves.c index cb62b26616..ad89a08e44 100644 --- a/app/base/curves.c +++ b/app/base/curves.c @@ -1001,7 +1001,7 @@ curves_delete_callback (GtkWidget *w, { curves_cancel_callback (w, data); - return FALSE; + return TRUE; } static void curves_preview_update (GtkWidget *w, diff --git a/app/base/hue-saturation.c b/app/base/hue-saturation.c index 4237f1987a..70f85e1f9d 100644 --- a/app/base/hue-saturation.c +++ b/app/base/hue-saturation.c @@ -754,7 +754,7 @@ hue_saturation_delete_callback (GtkWidget *w, { hue_saturation_cancel_callback (w, client_data); - return FALSE; + return TRUE; } static void diff --git a/app/base/threshold.c b/app/base/threshold.c index 849f780e37..6a913c3082 100644 --- a/app/base/threshold.c +++ b/app/base/threshold.c @@ -512,7 +512,7 @@ threshold_delete_callback (GtkWidget *w, { threshold_cancel_callback (w, client_data); - return FALSE; + return TRUE; } static void diff --git a/app/brightness_contrast.c b/app/brightness_contrast.c index ef92f7f591..38b651aafe 100644 --- a/app/brightness_contrast.c +++ b/app/brightness_contrast.c @@ -505,7 +505,7 @@ brightness_contrast_delete_callback (GtkWidget *w, { brightness_contrast_cancel_callback (w, d); - return FALSE; + return TRUE; } static void diff --git a/app/brush_select.c b/app/brush_select.c index 601ad65d6f..1fc094d4a5 100644 --- a/app/brush_select.c +++ b/app/brush_select.c @@ -734,7 +734,7 @@ brush_select_delete_callback (GtkWidget *w, GdkEvent *e, gpointer data) { brush_select_close_callback (w, data); - return FALSE; + return TRUE; } static void diff --git a/app/by_color_select.c b/app/by_color_select.c index 57993f5fb3..08cb343515 100644 --- a/app/by_color_select.c +++ b/app/by_color_select.c @@ -852,7 +852,7 @@ by_color_select_delete_callback (GtkWidget *w, { by_color_select_close_callback (w, client_data); - return FALSE; + return TRUE; } static void diff --git a/app/channel_ops.c b/app/channel_ops.c index 5b9c83e189..05159d2711 100644 --- a/app/channel_ops.c +++ b/app/channel_ops.c @@ -485,7 +485,7 @@ offset_delete_callback (GtkWidget *widget, { offset_cancel_callback (widget, data); - return FALSE; + return TRUE; } static void diff --git a/app/channels_dialog.c b/app/channels_dialog.c index 5a9fc910d6..1afdd4a68c 100644 --- a/app/channels_dialog.c +++ b/app/channels_dialog.c @@ -1689,7 +1689,7 @@ new_channel_query_delete_callback (GtkWidget *w, { new_channel_query_cancel_callback (w, client_data); - return FALSE; + return TRUE; } static void @@ -1868,7 +1868,7 @@ edit_channel_query_delete_callback (GtkWidget *w, { edit_channel_query_cancel_callback (w, client_data); - return FALSE; + return TRUE; } static void diff --git a/app/color_balance.c b/app/color_balance.c index 5046f0d3e8..59f3fd528b 100644 --- a/app/color_balance.c +++ b/app/color_balance.c @@ -643,7 +643,7 @@ color_balance_delete_callback (GtkWidget *w, { color_balance_cancel_callback (w, client_data); - return FALSE; + return TRUE; } static void diff --git a/app/color_select.c b/app/color_select.c index 7934cb153b..3a23c88cc2 100644 --- a/app/color_select.c +++ b/app/color_select.c @@ -788,7 +788,7 @@ color_select_delete_callback (GtkWidget *w, { color_select_cancel_callback (w, client_data); - return FALSE; + return TRUE; } diff --git a/app/commands.c b/app/commands.c index 9a70844e0b..3522d51994 100644 --- a/app/commands.c +++ b/app/commands.c @@ -232,7 +232,7 @@ file_new_delete_callback (GtkWidget *widget, { file_new_cancel_callback (widget, data); - return FALSE; + return TRUE; } @@ -751,7 +751,7 @@ file_prefs_delete_callback (GtkWidget *widget, file_prefs_cancel_callback (widget, dlg); /* the widget is already destroyed here no need to try again */ - return FALSE; + return TRUE; } static void @@ -2457,7 +2457,7 @@ image_delete_callback (GtkWidget *w, { image_cancel_callback (w, client_data); - return FALSE; + return TRUE; } diff --git a/app/convert.c b/app/convert.c index 86a7056453..730949b1ff 100644 --- a/app/convert.c +++ b/app/convert.c @@ -529,6 +529,7 @@ indexed_ok_callback (GtkWidget *widget, gtk_widget_destroy (dialog->shell); g_free (dialog); + dialog = NULL; } static gint @@ -538,7 +539,7 @@ indexed_delete_callback (GtkWidget *w, { indexed_cancel_callback (w, client_data); - return FALSE; + return TRUE; } static void @@ -550,6 +551,7 @@ indexed_cancel_callback (GtkWidget *widget, dialog = (IndexedDialog *) client_data; gtk_widget_destroy (dialog->shell); g_free (dialog); + dialog = NULL; } static void diff --git a/app/core/gimp-edit.c b/app/core/gimp-edit.c index 1acce0f94a..9a20279a9f 100644 --- a/app/core/gimp-edit.c +++ b/app/core/gimp-edit.c @@ -552,7 +552,7 @@ named_buffer_dialog_delete_callback (GtkWidget *w, { named_buffer_cancel_callback (w, client_data); - return FALSE; + return TRUE; } static void diff --git a/app/core/gimpdrawable-offset.c b/app/core/gimpdrawable-offset.c index 5b9c83e189..05159d2711 100644 --- a/app/core/gimpdrawable-offset.c +++ b/app/core/gimpdrawable-offset.c @@ -485,7 +485,7 @@ offset_delete_callback (GtkWidget *widget, { offset_cancel_callback (widget, data); - return FALSE; + return TRUE; } static void diff --git a/app/core/gimpedit.c b/app/core/gimpedit.c index 1acce0f94a..9a20279a9f 100644 --- a/app/core/gimpedit.c +++ b/app/core/gimpedit.c @@ -552,7 +552,7 @@ named_buffer_dialog_delete_callback (GtkWidget *w, { named_buffer_cancel_callback (w, client_data); - return FALSE; + return TRUE; } static void diff --git a/app/core/gimpimage-convert.c b/app/core/gimpimage-convert.c index 86a7056453..730949b1ff 100644 --- a/app/core/gimpimage-convert.c +++ b/app/core/gimpimage-convert.c @@ -529,6 +529,7 @@ indexed_ok_callback (GtkWidget *widget, gtk_widget_destroy (dialog->shell); g_free (dialog); + dialog = NULL; } static gint @@ -538,7 +539,7 @@ indexed_delete_callback (GtkWidget *w, { indexed_cancel_callback (w, client_data); - return FALSE; + return TRUE; } static void @@ -550,6 +551,7 @@ indexed_cancel_callback (GtkWidget *widget, dialog = (IndexedDialog *) client_data; gtk_widget_destroy (dialog->shell); g_free (dialog); + dialog = NULL; } static void diff --git a/app/core/gimpimage-duplicate.c b/app/core/gimpimage-duplicate.c index 5b9c83e189..05159d2711 100644 --- a/app/core/gimpimage-duplicate.c +++ b/app/core/gimpimage-duplicate.c @@ -485,7 +485,7 @@ offset_delete_callback (GtkWidget *widget, { offset_cancel_callback (widget, data); - return FALSE; + return TRUE; } static void diff --git a/app/curves.c b/app/curves.c index cb62b26616..ad89a08e44 100644 --- a/app/curves.c +++ b/app/curves.c @@ -1001,7 +1001,7 @@ curves_delete_callback (GtkWidget *w, { curves_cancel_callback (w, data); - return FALSE; + return TRUE; } static void curves_preview_update (GtkWidget *w, diff --git a/app/dialogs/about-dialog.c b/app/dialogs/about-dialog.c index 28a683d480..2644332963 100644 --- a/app/dialogs/about-dialog.c +++ b/app/dialogs/about-dialog.c @@ -122,8 +122,6 @@ about_dialog_create (int timeout) gtk_window_position (GTK_WINDOW (about_dialog), GTK_WIN_POS_CENTER); gtk_signal_connect (GTK_OBJECT (about_dialog), "destroy", (GtkSignalFunc) about_dialog_destroy, NULL); - gtk_signal_connect (GTK_OBJECT (about_dialog), "delete_event", - (GtkSignalFunc) about_dialog_destroy, NULL); gtk_signal_connect (GTK_OBJECT (about_dialog), "unmap_event", (GtkSignalFunc) about_dialog_unmap, NULL); gtk_signal_connect (GTK_OBJECT (about_dialog), "button_press_event", diff --git a/app/dialogs/info-dialog.c b/app/dialogs/info-dialog.c index 77eef26c0c..5541057505 100644 --- a/app/dialogs/info-dialog.c +++ b/app/dialogs/info-dialog.c @@ -200,11 +200,11 @@ info_dialog_update (InfoDialog *idialog) static gint info_dialog_delete_callback (GtkWidget *w, GdkEvent *e, - gpointer client_data) { - + gpointer client_data) +{ info_dialog_popdown ((InfoDialog *) client_data); - return FALSE; + return TRUE; } diff --git a/app/dialogs/tips-dialog.c b/app/dialogs/tips-dialog.c index 75a013c0c4..9771ff873e 100644 --- a/app/dialogs/tips-dialog.c +++ b/app/dialogs/tips-dialog.c @@ -57,6 +57,8 @@ tips_dialog_create () gtk_window_position (GTK_WINDOW (tips_dialog), GTK_WIN_POS_CENTER); gtk_signal_connect (GTK_OBJECT (tips_dialog), "delete_event", GTK_SIGNAL_FUNC (tips_dialog_hide), NULL); + /* destroy the tips window if the mainlevel gtk_main() function is left */ + gtk_quit_add (1, (GtkFunction) gtk_widget_destroy, tips_dialog); vbox = gtk_vbox_new (FALSE, 0); gtk_container_add (GTK_CONTAINER (tips_dialog), vbox); @@ -160,7 +162,7 @@ tips_dialog_hide (GtkWidget *widget, g_list_free (update); g_list_free (remove); - return FALSE; + return TRUE; } static int diff --git a/app/dialogs/user-install-dialog.c b/app/dialogs/user-install-dialog.c index e0c520ebc0..13d7a22356 100644 --- a/app/dialogs/user-install-dialog.c +++ b/app/dialogs/user-install-dialog.c @@ -97,6 +97,9 @@ install_help (InstallCallback callback) GdkFont *font; help_widget = gtk_dialog_new (); + gtk_signal_connect (GTK_OBJECT (help_widget), "delete_event", + GTK_SIGNAL_FUNC (gtk_true), + NULL); gtk_window_set_wmclass (GTK_WINDOW (help_widget), "gimp_installation", "Gimp"); gtk_window_set_title (GTK_WINDOW (help_widget), "GIMP Installation"); gtk_window_position (GTK_WINDOW (help_widget), GTK_WIN_POS_CENTER); @@ -340,6 +343,9 @@ install_run (InstallCallback callback) int executable = TRUE; install_widget = gtk_dialog_new (); + gtk_signal_connect (GTK_OBJECT (install_widget), "delete_event", + GTK_SIGNAL_FUNC (gtk_true), + NULL); gtk_window_set_wmclass (GTK_WINDOW (install_widget), "installation_log", "Gimp"); gtk_window_set_title (GTK_WINDOW (install_widget), "Installation Log"); gtk_window_position (GTK_WINDOW (install_widget), GTK_WIN_POS_CENTER); diff --git a/app/display/gimpdisplay-ops.c b/app/display/gimpdisplay-ops.c index 1d0ba2c2f5..0d305eee81 100644 --- a/app/display/gimpdisplay-ops.c +++ b/app/display/gimpdisplay-ops.c @@ -289,7 +289,7 @@ gdisplay_delete_warning_callback (GtkWidget *widget, { gdisplay_cancel_warning_callback (widget, client_data); - return FALSE; + return TRUE; } static void diff --git a/app/display/gimpdisplayshell-draw.c b/app/display/gimpdisplayshell-draw.c index a3c63a55cb..fa806744a9 100644 --- a/app/display/gimpdisplayshell-draw.c +++ b/app/display/gimpdisplayshell-draw.c @@ -820,7 +820,7 @@ query_box_delete_callback (GtkWidget *w, { query_box_cancel_callback (w, client_data); - return FALSE; + return TRUE; } static void @@ -957,7 +957,7 @@ message_box_delete_callback (GtkWidget *w, GdkEvent *e, gpointer client_data) { message_box_close_callback (w, client_data); - return FALSE; + return TRUE; } diff --git a/app/display/gimpdisplayshell.c b/app/display/gimpdisplayshell.c index a3c63a55cb..fa806744a9 100644 --- a/app/display/gimpdisplayshell.c +++ b/app/display/gimpdisplayshell.c @@ -820,7 +820,7 @@ query_box_delete_callback (GtkWidget *w, { query_box_cancel_callback (w, client_data); - return FALSE; + return TRUE; } static void @@ -957,7 +957,7 @@ message_box_delete_callback (GtkWidget *w, GdkEvent *e, gpointer client_data) { message_box_close_callback (w, client_data); - return FALSE; + return TRUE; } diff --git a/app/fileops.c b/app/fileops.c index 6889b4103a..15c2e6f8e9 100644 --- a/app/fileops.c +++ b/app/fileops.c @@ -68,12 +68,6 @@ static void file_open_ok_callback (GtkWidget *w, gpointer client_data); static void file_save_ok_callback (GtkWidget *w, gpointer client_data); -static void file_cancel_callback (GtkWidget *w, - gpointer client_data); - -static gint file_delete_callback (GtkWidget *w, - GdkEvent *e, - gpointer client_data); static void file_dialog_show (GtkWidget *filesel); static void file_dialog_hide (GtkWidget *filesel); @@ -478,10 +472,14 @@ file_open_callback (GtkWidget *w, fileload = gtk_file_selection_new ("Load Image"); gtk_window_position (GTK_WINDOW (fileload), GTK_WIN_POS_MOUSE); gtk_window_set_wmclass (GTK_WINDOW (fileload), "load_image", "Gimp"); - gtk_signal_connect (GTK_OBJECT (GTK_FILE_SELECTION (fileload)->cancel_button), "clicked", - (GtkSignalFunc) file_cancel_callback, fileload); - gtk_signal_connect (GTK_OBJECT (fileload), "delete_event", - (GtkSignalFunc) file_delete_callback, fileload); + gtk_signal_connect_object (GTK_OBJECT (GTK_FILE_SELECTION (fileload)->cancel_button), + "clicked", + GTK_SIGNAL_FUNC (gtk_widget_hide), + GTK_OBJECT (fileload)); + gtk_signal_connect (GTK_OBJECT (fileload), + "delete_event", + GTK_SIGNAL_FUNC (gtk_widget_delete_hides), + NULL); gtk_signal_connect (GTK_OBJECT (GTK_FILE_SELECTION (fileload)->ok_button), "clicked", (GtkSignalFunc) file_open_ok_callback, fileload); } else @@ -563,10 +561,14 @@ file_save_as_callback (GtkWidget *w, filesave = gtk_file_selection_new ("Save Image"); gtk_window_set_wmclass (GTK_WINDOW (filesave), "save_image", "Gimp"); gtk_window_position (GTK_WINDOW (filesave), GTK_WIN_POS_MOUSE); - gtk_signal_connect (GTK_OBJECT (GTK_FILE_SELECTION (filesave)->cancel_button), "clicked", - (GtkSignalFunc) file_cancel_callback, filesave); - gtk_signal_connect (GTK_OBJECT (filesave), "delete_event", - (GtkSignalFunc) file_delete_callback, filesave); + gtk_signal_connect (GTK_OBJECT (GTK_FILE_SELECTION (filesave)->cancel_button), + "clicked", + GTK_SIGNAL_FUNC (gtk_widget_hide), + GTK_OBJECT (filesave)); + gtk_signal_connect (GTK_OBJECT (filesave), + "delete_event", + GTK_SIGNAL_FUNC (gtk_widget_delete_hides), + NULL); gtk_signal_connect (GTK_OBJECT (GTK_FILE_SELECTION (filesave)->ok_button), "clicked", (GtkSignalFunc) file_save_ok_callback, filesave); } else @@ -882,7 +884,7 @@ file_save_ok_callback (GtkWidget *w, else { s = g_string_new (NULL); - g_string_sprintf (s, "%s is an irregular file", raw_filename, g_strerror(errno)); + g_string_sprintf (s, "%s is an irregular file (%s)", raw_filename, g_strerror(errno)); } } else if (file_save (image_ID, filename, raw_filename)) @@ -901,23 +903,6 @@ file_save_ok_callback (GtkWidget *w, g_string_free (s, TRUE); } -static gint -file_delete_callback (GtkWidget *w, - GdkEvent *e, - gpointer client_data) -{ - file_cancel_callback (w, client_data); - - return FALSE; -} - -static void -file_cancel_callback (GtkWidget *w, - gpointer client_data) -{ - file_dialog_hide (client_data); -} - static void file_dialog_show (GtkWidget *filesel) { @@ -965,7 +950,8 @@ file_overwrite (char *filename, char* raw_filename) gtk_window_set_title (GTK_WINDOW (overwrite_box->obox), "File Exists!"); gtk_window_position (GTK_WINDOW (overwrite_box->obox), GTK_WIN_POS_MOUSE); - gtk_signal_connect (GTK_OBJECT (overwrite_box->obox), "delete_event", + gtk_signal_connect (GTK_OBJECT (overwrite_box->obox), + "delete_event", (GtkSignalFunc) file_overwrite_delete_callback, overwrite_box); @@ -1028,7 +1014,7 @@ file_overwrite_delete_callback (GtkWidget *w, { file_overwrite_no_callback (w, client_data); - return FALSE; + return TRUE; } static void diff --git a/app/gdisplay_ops.c b/app/gdisplay_ops.c index 1d0ba2c2f5..0d305eee81 100644 --- a/app/gdisplay_ops.c +++ b/app/gdisplay_ops.c @@ -289,7 +289,7 @@ gdisplay_delete_warning_callback (GtkWidget *widget, { gdisplay_cancel_warning_callback (widget, client_data); - return FALSE; + return TRUE; } static void diff --git a/app/gimpdrawable-offset.c b/app/gimpdrawable-offset.c index 5b9c83e189..05159d2711 100644 --- a/app/gimpdrawable-offset.c +++ b/app/gimpdrawable-offset.c @@ -485,7 +485,7 @@ offset_delete_callback (GtkWidget *widget, { offset_cancel_callback (widget, data); - return FALSE; + return TRUE; } static void diff --git a/app/gimpimage-convert.c b/app/gimpimage-convert.c index 86a7056453..730949b1ff 100644 --- a/app/gimpimage-convert.c +++ b/app/gimpimage-convert.c @@ -529,6 +529,7 @@ indexed_ok_callback (GtkWidget *widget, gtk_widget_destroy (dialog->shell); g_free (dialog); + dialog = NULL; } static gint @@ -538,7 +539,7 @@ indexed_delete_callback (GtkWidget *w, { indexed_cancel_callback (w, client_data); - return FALSE; + return TRUE; } static void @@ -550,6 +551,7 @@ indexed_cancel_callback (GtkWidget *widget, dialog = (IndexedDialog *) client_data; gtk_widget_destroy (dialog->shell); g_free (dialog); + dialog = NULL; } static void diff --git a/app/gimpimage-duplicate.c b/app/gimpimage-duplicate.c index 5b9c83e189..05159d2711 100644 --- a/app/gimpimage-duplicate.c +++ b/app/gimpimage-duplicate.c @@ -485,7 +485,7 @@ offset_delete_callback (GtkWidget *widget, { offset_cancel_callback (widget, data); - return FALSE; + return TRUE; } static void diff --git a/app/global_edit.c b/app/global_edit.c index 1acce0f94a..9a20279a9f 100644 --- a/app/global_edit.c +++ b/app/global_edit.c @@ -552,7 +552,7 @@ named_buffer_dialog_delete_callback (GtkWidget *w, { named_buffer_cancel_callback (w, client_data); - return FALSE; + return TRUE; } static void diff --git a/app/gradient.c b/app/gradient.c index 6ab13641ad..34bf7bf71a 100644 --- a/app/gradient.c +++ b/app/gradient.c @@ -1255,7 +1255,7 @@ ed_close_callback(GtkWidget *widget, gpointer client_data) if (GTK_WIDGET_VISIBLE(g_editor->shell)) gtk_widget_hide(g_editor->shell); - return FALSE; + return TRUE; } /* ed_close_callback */ diff --git a/app/gradient_editor.c b/app/gradient_editor.c index 6ab13641ad..34bf7bf71a 100644 --- a/app/gradient_editor.c +++ b/app/gradient_editor.c @@ -1255,7 +1255,7 @@ ed_close_callback(GtkWidget *widget, gpointer client_data) if (GTK_WIDGET_VISIBLE(g_editor->shell)) gtk_widget_hide(g_editor->shell); - return FALSE; + return TRUE; } /* ed_close_callback */ diff --git a/app/gui/about-dialog.c b/app/gui/about-dialog.c index 28a683d480..2644332963 100644 --- a/app/gui/about-dialog.c +++ b/app/gui/about-dialog.c @@ -122,8 +122,6 @@ about_dialog_create (int timeout) gtk_window_position (GTK_WINDOW (about_dialog), GTK_WIN_POS_CENTER); gtk_signal_connect (GTK_OBJECT (about_dialog), "destroy", (GtkSignalFunc) about_dialog_destroy, NULL); - gtk_signal_connect (GTK_OBJECT (about_dialog), "delete_event", - (GtkSignalFunc) about_dialog_destroy, NULL); gtk_signal_connect (GTK_OBJECT (about_dialog), "unmap_event", (GtkSignalFunc) about_dialog_unmap, NULL); gtk_signal_connect (GTK_OBJECT (about_dialog), "button_press_event", diff --git a/app/gui/brush-select.c b/app/gui/brush-select.c index 601ad65d6f..1fc094d4a5 100644 --- a/app/gui/brush-select.c +++ b/app/gui/brush-select.c @@ -734,7 +734,7 @@ brush_select_delete_callback (GtkWidget *w, GdkEvent *e, gpointer data) { brush_select_close_callback (w, data); - return FALSE; + return TRUE; } static void diff --git a/app/gui/channels-dialog.c b/app/gui/channels-dialog.c index 5a9fc910d6..1afdd4a68c 100644 --- a/app/gui/channels-dialog.c +++ b/app/gui/channels-dialog.c @@ -1689,7 +1689,7 @@ new_channel_query_delete_callback (GtkWidget *w, { new_channel_query_cancel_callback (w, client_data); - return FALSE; + return TRUE; } static void @@ -1868,7 +1868,7 @@ edit_channel_query_delete_callback (GtkWidget *w, { edit_channel_query_cancel_callback (w, client_data); - return FALSE; + return TRUE; } static void diff --git a/app/gui/color-select.c b/app/gui/color-select.c index 7934cb153b..3a23c88cc2 100644 --- a/app/gui/color-select.c +++ b/app/gui/color-select.c @@ -788,7 +788,7 @@ color_select_delete_callback (GtkWidget *w, { color_select_cancel_callback (w, client_data); - return FALSE; + return TRUE; } diff --git a/app/gui/commands.c b/app/gui/commands.c index 9a70844e0b..3522d51994 100644 --- a/app/gui/commands.c +++ b/app/gui/commands.c @@ -232,7 +232,7 @@ file_new_delete_callback (GtkWidget *widget, { file_new_cancel_callback (widget, data); - return FALSE; + return TRUE; } @@ -751,7 +751,7 @@ file_prefs_delete_callback (GtkWidget *widget, file_prefs_cancel_callback (widget, dlg); /* the widget is already destroyed here no need to try again */ - return FALSE; + return TRUE; } static void @@ -2457,7 +2457,7 @@ image_delete_callback (GtkWidget *w, { image_cancel_callback (w, client_data); - return FALSE; + return TRUE; } diff --git a/app/gui/gradient-editor.c b/app/gui/gradient-editor.c index 6ab13641ad..34bf7bf71a 100644 --- a/app/gui/gradient-editor.c +++ b/app/gui/gradient-editor.c @@ -1255,7 +1255,7 @@ ed_close_callback(GtkWidget *widget, gpointer client_data) if (GTK_WIDGET_VISIBLE(g_editor->shell)) gtk_widget_hide(g_editor->shell); - return FALSE; + return TRUE; } /* ed_close_callback */ diff --git a/app/gui/help-commands.c b/app/gui/help-commands.c index 9a70844e0b..3522d51994 100644 --- a/app/gui/help-commands.c +++ b/app/gui/help-commands.c @@ -232,7 +232,7 @@ file_new_delete_callback (GtkWidget *widget, { file_new_cancel_callback (widget, data); - return FALSE; + return TRUE; } @@ -751,7 +751,7 @@ file_prefs_delete_callback (GtkWidget *widget, file_prefs_cancel_callback (widget, dlg); /* the widget is already destroyed here no need to try again */ - return FALSE; + return TRUE; } static void @@ -2457,7 +2457,7 @@ image_delete_callback (GtkWidget *w, { image_cancel_callback (w, client_data); - return FALSE; + return TRUE; } diff --git a/app/gui/info-dialog.c b/app/gui/info-dialog.c index 77eef26c0c..5541057505 100644 --- a/app/gui/info-dialog.c +++ b/app/gui/info-dialog.c @@ -200,11 +200,11 @@ info_dialog_update (InfoDialog *idialog) static gint info_dialog_delete_callback (GtkWidget *w, GdkEvent *e, - gpointer client_data) { - + gpointer client_data) +{ info_dialog_popdown ((InfoDialog *) client_data); - return FALSE; + return TRUE; } diff --git a/app/gui/layers-dialog.c b/app/gui/layers-dialog.c index 7c766bd8da..6ae06bc1db 100644 --- a/app/gui/layers-dialog.c +++ b/app/gui/layers-dialog.c @@ -1809,7 +1809,7 @@ lc_dialog_close_callback (GtkWidget *w, gpointer client_data) { if (!lc_shell) - return TRUE; + return FALSE; if (GTK_WIDGET_VISIBLE (lc_shell)) gtk_widget_hide (lc_shell); @@ -1817,7 +1817,7 @@ lc_dialog_close_callback (GtkWidget *w, if (layersD) layersD->gimage_id = -1; - return FALSE; + return TRUE; } @@ -2910,7 +2910,7 @@ new_layer_query_delete_callback (GtkWidget *w, { new_layer_query_cancel_callback (w, client_data); - return FALSE; + return TRUE; } @@ -3142,7 +3142,7 @@ edit_layer_query_delete_callback (GtkWidget *w, { edit_layer_query_cancel_callback (w, client_data); - return FALSE; + return TRUE; } static void @@ -3253,7 +3253,7 @@ add_mask_query_delete_callback (GtkWidget *w, { add_mask_query_cancel_callback (w, client_data); - return FALSE; + return TRUE; } static void @@ -3428,7 +3428,7 @@ apply_mask_query_delete_callback (GtkWidget *w, { apply_mask_query_cancel_callback (w, client_data); - return FALSE; + return TRUE; } static void @@ -3551,7 +3551,7 @@ scale_layer_query_delete_callback (GtkWidget *w, { scale_layer_query_cancel_callback (w, client_data); - return FALSE; + return TRUE; } static void @@ -3672,7 +3672,7 @@ resize_layer_query_delete_callback (GtkWidget *w, { resize_layer_query_cancel_callback (w, client_data); - return FALSE; + return TRUE; } static void @@ -3772,7 +3772,7 @@ layer_merge_query_delete_callback (GtkWidget *w, { layer_merge_query_cancel_callback (w, client_data); - return FALSE; + return TRUE; } static void diff --git a/app/gui/palette-editor.c b/app/gui/palette-editor.c index 31580e3744..1fa55bc3f9 100644 --- a/app/gui/palette-editor.c +++ b/app/gui/palette-editor.c @@ -883,7 +883,7 @@ palette_dialog_delete_callback (GtkWidget *w, { palette_close_callback (w, client_data); - return FALSE; + return TRUE; } diff --git a/app/gui/pattern-select.c b/app/gui/pattern-select.c index 1dab005deb..9d9a31086a 100644 --- a/app/gui/pattern-select.c +++ b/app/gui/pattern-select.c @@ -653,7 +653,7 @@ pattern_select_delete_callback (GtkWidget *w, { pattern_select_close_callback (w, client_data); - return FALSE; + return TRUE; } static void diff --git a/app/gui/tips-dialog.c b/app/gui/tips-dialog.c index 75a013c0c4..9771ff873e 100644 --- a/app/gui/tips-dialog.c +++ b/app/gui/tips-dialog.c @@ -57,6 +57,8 @@ tips_dialog_create () gtk_window_position (GTK_WINDOW (tips_dialog), GTK_WIN_POS_CENTER); gtk_signal_connect (GTK_OBJECT (tips_dialog), "delete_event", GTK_SIGNAL_FUNC (tips_dialog_hide), NULL); + /* destroy the tips window if the mainlevel gtk_main() function is left */ + gtk_quit_add (1, (GtkFunction) gtk_widget_destroy, tips_dialog); vbox = gtk_vbox_new (FALSE, 0); gtk_container_add (GTK_CONTAINER (tips_dialog), vbox); @@ -160,7 +162,7 @@ tips_dialog_hide (GtkWidget *widget, g_list_free (update); g_list_free (remove); - return FALSE; + return TRUE; } static int diff --git a/app/gui/user-install-dialog.c b/app/gui/user-install-dialog.c index e0c520ebc0..13d7a22356 100644 --- a/app/gui/user-install-dialog.c +++ b/app/gui/user-install-dialog.c @@ -97,6 +97,9 @@ install_help (InstallCallback callback) GdkFont *font; help_widget = gtk_dialog_new (); + gtk_signal_connect (GTK_OBJECT (help_widget), "delete_event", + GTK_SIGNAL_FUNC (gtk_true), + NULL); gtk_window_set_wmclass (GTK_WINDOW (help_widget), "gimp_installation", "Gimp"); gtk_window_set_title (GTK_WINDOW (help_widget), "GIMP Installation"); gtk_window_position (GTK_WINDOW (help_widget), GTK_WIN_POS_CENTER); @@ -340,6 +343,9 @@ install_run (InstallCallback callback) int executable = TRUE; install_widget = gtk_dialog_new (); + gtk_signal_connect (GTK_OBJECT (install_widget), "delete_event", + GTK_SIGNAL_FUNC (gtk_true), + NULL); gtk_window_set_wmclass (GTK_WINDOW (install_widget), "installation_log", "Gimp"); gtk_window_set_title (GTK_WINDOW (install_widget), "Installation Log"); gtk_window_position (GTK_WINDOW (install_widget), GTK_WIN_POS_CENTER); diff --git a/app/histogram_tool.c b/app/histogram_tool.c index 25ab9c633d..bc7462da68 100644 --- a/app/histogram_tool.c +++ b/app/histogram_tool.c @@ -550,7 +550,7 @@ histogram_tool_delete_callback (GtkWidget *widget, { histogram_tool_cancel_callback (widget, client_data); - return FALSE; + return TRUE; } static void diff --git a/app/hue_saturation.c b/app/hue_saturation.c index 4237f1987a..70f85e1f9d 100644 --- a/app/hue_saturation.c +++ b/app/hue_saturation.c @@ -754,7 +754,7 @@ hue_saturation_delete_callback (GtkWidget *w, { hue_saturation_cancel_callback (w, client_data); - return FALSE; + return TRUE; } static void diff --git a/app/indexed_palette.c b/app/indexed_palette.c index aa1e44f751..83adc07e75 100644 --- a/app/indexed_palette.c +++ b/app/indexed_palette.c @@ -73,7 +73,6 @@ static void indexed_palette_update (int); /* indexed palette menu callbacks */ static void indexed_palette_close_callback (GtkWidget *, gpointer); static void indexed_palette_select_callback (int, int, int, ColorSelectState, void *); -static gint indexed_palette_delete_callback (GtkWidget *, GdkEvent *, gpointer); /* event callback */ static gint indexed_palette_area_events (GtkWidget *, GdkEvent *); @@ -137,8 +136,8 @@ indexed_palette_create (int gimage_id) gtk_window_add_accelerator_table (GTK_WINDOW (indexedP->shell), table); gtk_signal_connect (GTK_OBJECT (indexedP->shell), "delete_event", - GTK_SIGNAL_FUNC (indexed_palette_delete_callback), - indexedP); + GTK_SIGNAL_FUNC (gtk_widget_delete_hides), + NULL); indexedP->vbox = vbox = gtk_vbox_new (FALSE, 1); gtk_container_border_width (GTK_CONTAINER (vbox), 1); @@ -153,6 +152,10 @@ indexed_palette_create (int gimage_id) gtk_box_pack_start (GTK_BOX (util_box), label, FALSE, FALSE, 2); indexedP->image_option_menu = gtk_option_menu_new (); indexedP->image_menu = create_image_menu (&gimage_id, &default_index, image_menu_callback); + gtk_signal_connect (GTK_OBJECT (indexedP->image_menu), + "destroy", + GTK_SIGNAL_FUNC (gtk_widget_destroyed), + &indexedP->image_menu); gtk_box_pack_start (GTK_BOX (util_box), indexedP->image_option_menu, TRUE, TRUE, 2); gtk_widget_show (indexedP->image_option_menu); @@ -237,7 +240,8 @@ indexed_palette_update_image_list () return; gtk_option_menu_remove_menu (GTK_OPTION_MENU (indexedP->image_option_menu)); - gtk_widget_destroy (indexedP->image_menu); + if (indexedP->image_menu) + g_warning ("indexedP->image_menu still exists?"); default_id = indexedP->gimage_id; indexedP->image_menu = create_image_menu (&default_id, &default_index, image_menu_callback); @@ -343,16 +347,6 @@ indexed_palette_update (int gimage_id) } } -static gint -indexed_palette_delete_callback (GtkWidget *w, - GdkEvent *e, - gpointer client_data) -{ - indexed_palette_close_callback (w, client_data); - - return FALSE; -} - static void indexed_palette_close_callback (GtkWidget *w, gpointer client_data) diff --git a/app/info_dialog.c b/app/info_dialog.c index 77eef26c0c..5541057505 100644 --- a/app/info_dialog.c +++ b/app/info_dialog.c @@ -200,11 +200,11 @@ info_dialog_update (InfoDialog *idialog) static gint info_dialog_delete_callback (GtkWidget *w, GdkEvent *e, - gpointer client_data) { - + gpointer client_data) +{ info_dialog_popdown ((InfoDialog *) client_data); - return FALSE; + return TRUE; } diff --git a/app/install.c b/app/install.c index e0c520ebc0..13d7a22356 100644 --- a/app/install.c +++ b/app/install.c @@ -97,6 +97,9 @@ install_help (InstallCallback callback) GdkFont *font; help_widget = gtk_dialog_new (); + gtk_signal_connect (GTK_OBJECT (help_widget), "delete_event", + GTK_SIGNAL_FUNC (gtk_true), + NULL); gtk_window_set_wmclass (GTK_WINDOW (help_widget), "gimp_installation", "Gimp"); gtk_window_set_title (GTK_WINDOW (help_widget), "GIMP Installation"); gtk_window_position (GTK_WINDOW (help_widget), GTK_WIN_POS_CENTER); @@ -340,6 +343,9 @@ install_run (InstallCallback callback) int executable = TRUE; install_widget = gtk_dialog_new (); + gtk_signal_connect (GTK_OBJECT (install_widget), "delete_event", + GTK_SIGNAL_FUNC (gtk_true), + NULL); gtk_window_set_wmclass (GTK_WINDOW (install_widget), "installation_log", "Gimp"); gtk_window_set_title (GTK_WINDOW (install_widget), "Installation Log"); gtk_window_position (GTK_WINDOW (install_widget), GTK_WIN_POS_CENTER); diff --git a/app/interface.c b/app/interface.c index a3c63a55cb..fa806744a9 100644 --- a/app/interface.c +++ b/app/interface.c @@ -820,7 +820,7 @@ query_box_delete_callback (GtkWidget *w, { query_box_cancel_callback (w, client_data); - return FALSE; + return TRUE; } static void @@ -957,7 +957,7 @@ message_box_delete_callback (GtkWidget *w, GdkEvent *e, gpointer client_data) { message_box_close_callback (w, client_data); - return FALSE; + return TRUE; } diff --git a/app/layers_dialog.c b/app/layers_dialog.c index 7c766bd8da..6ae06bc1db 100644 --- a/app/layers_dialog.c +++ b/app/layers_dialog.c @@ -1809,7 +1809,7 @@ lc_dialog_close_callback (GtkWidget *w, gpointer client_data) { if (!lc_shell) - return TRUE; + return FALSE; if (GTK_WIDGET_VISIBLE (lc_shell)) gtk_widget_hide (lc_shell); @@ -1817,7 +1817,7 @@ lc_dialog_close_callback (GtkWidget *w, if (layersD) layersD->gimage_id = -1; - return FALSE; + return TRUE; } @@ -2910,7 +2910,7 @@ new_layer_query_delete_callback (GtkWidget *w, { new_layer_query_cancel_callback (w, client_data); - return FALSE; + return TRUE; } @@ -3142,7 +3142,7 @@ edit_layer_query_delete_callback (GtkWidget *w, { edit_layer_query_cancel_callback (w, client_data); - return FALSE; + return TRUE; } static void @@ -3253,7 +3253,7 @@ add_mask_query_delete_callback (GtkWidget *w, { add_mask_query_cancel_callback (w, client_data); - return FALSE; + return TRUE; } static void @@ -3428,7 +3428,7 @@ apply_mask_query_delete_callback (GtkWidget *w, { apply_mask_query_cancel_callback (w, client_data); - return FALSE; + return TRUE; } static void @@ -3551,7 +3551,7 @@ scale_layer_query_delete_callback (GtkWidget *w, { scale_layer_query_cancel_callback (w, client_data); - return FALSE; + return TRUE; } static void @@ -3672,7 +3672,7 @@ resize_layer_query_delete_callback (GtkWidget *w, { resize_layer_query_cancel_callback (w, client_data); - return FALSE; + return TRUE; } static void @@ -3772,7 +3772,7 @@ layer_merge_query_delete_callback (GtkWidget *w, { layer_merge_query_cancel_callback (w, client_data); - return FALSE; + return TRUE; } static void diff --git a/app/levels.c b/app/levels.c index ceb182c7fa..80cb9c70e8 100644 --- a/app/levels.c +++ b/app/levels.c @@ -1090,7 +1090,7 @@ levels_delete_callback (GtkWidget *w, { levels_cancel_callback (w, client_data); - return FALSE; + return TRUE; } static void diff --git a/app/palette.c b/app/palette.c index 31580e3744..1fa55bc3f9 100644 --- a/app/palette.c +++ b/app/palette.c @@ -883,7 +883,7 @@ palette_dialog_delete_callback (GtkWidget *w, { palette_close_callback (w, client_data); - return FALSE; + return TRUE; } diff --git a/app/pattern_select.c b/app/pattern_select.c index 1dab005deb..9d9a31086a 100644 --- a/app/pattern_select.c +++ b/app/pattern_select.c @@ -653,7 +653,7 @@ pattern_select_delete_callback (GtkWidget *w, { pattern_select_close_callback (w, client_data); - return FALSE; + return TRUE; } static void diff --git a/app/posterize.c b/app/posterize.c index 816427f2a0..d562fefe0e 100644 --- a/app/posterize.c +++ b/app/posterize.c @@ -376,7 +376,7 @@ posterize_delete_callback (GtkWidget *w, GdkEvent *e, gpointer data) { posterize_cancel_callback (w, data); - return FALSE; + return TRUE; } static void diff --git a/app/text_tool.c b/app/text_tool.c index 0ca3e6de41..fec1ee5dae 100644 --- a/app/text_tool.c +++ b/app/text_tool.c @@ -615,7 +615,7 @@ text_delete_callback (GtkWidget *w, { text_cancel_callback (w, client_data); - return FALSE; + return TRUE; } static void diff --git a/app/threshold.c b/app/threshold.c index 849f780e37..6a913c3082 100644 --- a/app/threshold.c +++ b/app/threshold.c @@ -512,7 +512,7 @@ threshold_delete_callback (GtkWidget *w, { threshold_cancel_callback (w, client_data); - return FALSE; + return TRUE; } static void diff --git a/app/tips_dialog.c b/app/tips_dialog.c index 75a013c0c4..9771ff873e 100644 --- a/app/tips_dialog.c +++ b/app/tips_dialog.c @@ -57,6 +57,8 @@ tips_dialog_create () gtk_window_position (GTK_WINDOW (tips_dialog), GTK_WIN_POS_CENTER); gtk_signal_connect (GTK_OBJECT (tips_dialog), "delete_event", GTK_SIGNAL_FUNC (tips_dialog_hide), NULL); + /* destroy the tips window if the mainlevel gtk_main() function is left */ + gtk_quit_add (1, (GtkFunction) gtk_widget_destroy, tips_dialog); vbox = gtk_vbox_new (FALSE, 0); gtk_container_add (GTK_CONTAINER (tips_dialog), vbox); @@ -160,7 +162,7 @@ tips_dialog_hide (GtkWidget *widget, g_list_free (update); g_list_free (remove); - return FALSE; + return TRUE; } static int diff --git a/app/tools.c b/app/tools.c index 426c6e4c53..6ad99b2ea4 100644 --- a/app/tools.c +++ b/app/tools.c @@ -533,7 +533,7 @@ tools_options_delete_callback (GtkWidget *w, { tools_options_dialog_callback (w, client_data); - return FALSE; + return TRUE; } static void diff --git a/app/tools/brightness_contrast.c b/app/tools/brightness_contrast.c index ef92f7f591..38b651aafe 100644 --- a/app/tools/brightness_contrast.c +++ b/app/tools/brightness_contrast.c @@ -505,7 +505,7 @@ brightness_contrast_delete_callback (GtkWidget *w, { brightness_contrast_cancel_callback (w, d); - return FALSE; + return TRUE; } static void diff --git a/app/tools/by_color_select.c b/app/tools/by_color_select.c index 57993f5fb3..08cb343515 100644 --- a/app/tools/by_color_select.c +++ b/app/tools/by_color_select.c @@ -852,7 +852,7 @@ by_color_select_delete_callback (GtkWidget *w, { by_color_select_close_callback (w, client_data); - return FALSE; + return TRUE; } static void diff --git a/app/tools/color_balance.c b/app/tools/color_balance.c index 5046f0d3e8..59f3fd528b 100644 --- a/app/tools/color_balance.c +++ b/app/tools/color_balance.c @@ -643,7 +643,7 @@ color_balance_delete_callback (GtkWidget *w, { color_balance_cancel_callback (w, client_data); - return FALSE; + return TRUE; } static void diff --git a/app/tools/curves.c b/app/tools/curves.c index cb62b26616..ad89a08e44 100644 --- a/app/tools/curves.c +++ b/app/tools/curves.c @@ -1001,7 +1001,7 @@ curves_delete_callback (GtkWidget *w, { curves_cancel_callback (w, data); - return FALSE; + return TRUE; } static void curves_preview_update (GtkWidget *w, diff --git a/app/tools/gimpbrightnesscontrasttool.c b/app/tools/gimpbrightnesscontrasttool.c index ef92f7f591..38b651aafe 100644 --- a/app/tools/gimpbrightnesscontrasttool.c +++ b/app/tools/gimpbrightnesscontrasttool.c @@ -505,7 +505,7 @@ brightness_contrast_delete_callback (GtkWidget *w, { brightness_contrast_cancel_callback (w, d); - return FALSE; + return TRUE; } static void diff --git a/app/tools/gimpbycolorselecttool.c b/app/tools/gimpbycolorselecttool.c index 57993f5fb3..08cb343515 100644 --- a/app/tools/gimpbycolorselecttool.c +++ b/app/tools/gimpbycolorselecttool.c @@ -852,7 +852,7 @@ by_color_select_delete_callback (GtkWidget *w, { by_color_select_close_callback (w, client_data); - return FALSE; + return TRUE; } static void diff --git a/app/tools/gimpcolorbalancetool.c b/app/tools/gimpcolorbalancetool.c index 5046f0d3e8..59f3fd528b 100644 --- a/app/tools/gimpcolorbalancetool.c +++ b/app/tools/gimpcolorbalancetool.c @@ -643,7 +643,7 @@ color_balance_delete_callback (GtkWidget *w, { color_balance_cancel_callback (w, client_data); - return FALSE; + return TRUE; } static void diff --git a/app/tools/gimpcurvestool.c b/app/tools/gimpcurvestool.c index cb62b26616..ad89a08e44 100644 --- a/app/tools/gimpcurvestool.c +++ b/app/tools/gimpcurvestool.c @@ -1001,7 +1001,7 @@ curves_delete_callback (GtkWidget *w, { curves_cancel_callback (w, data); - return FALSE; + return TRUE; } static void curves_preview_update (GtkWidget *w, diff --git a/app/tools/gimphistogramtool.c b/app/tools/gimphistogramtool.c index 25ab9c633d..bc7462da68 100644 --- a/app/tools/gimphistogramtool.c +++ b/app/tools/gimphistogramtool.c @@ -550,7 +550,7 @@ histogram_tool_delete_callback (GtkWidget *widget, { histogram_tool_cancel_callback (widget, client_data); - return FALSE; + return TRUE; } static void diff --git a/app/tools/gimphuesaturationtool.c b/app/tools/gimphuesaturationtool.c index 4237f1987a..70f85e1f9d 100644 --- a/app/tools/gimphuesaturationtool.c +++ b/app/tools/gimphuesaturationtool.c @@ -754,7 +754,7 @@ hue_saturation_delete_callback (GtkWidget *w, { hue_saturation_cancel_callback (w, client_data); - return FALSE; + return TRUE; } static void diff --git a/app/tools/gimplevelstool.c b/app/tools/gimplevelstool.c index ceb182c7fa..80cb9c70e8 100644 --- a/app/tools/gimplevelstool.c +++ b/app/tools/gimplevelstool.c @@ -1090,7 +1090,7 @@ levels_delete_callback (GtkWidget *w, { levels_cancel_callback (w, client_data); - return FALSE; + return TRUE; } static void diff --git a/app/tools/gimpposterizetool.c b/app/tools/gimpposterizetool.c index 816427f2a0..d562fefe0e 100644 --- a/app/tools/gimpposterizetool.c +++ b/app/tools/gimpposterizetool.c @@ -376,7 +376,7 @@ posterize_delete_callback (GtkWidget *w, GdkEvent *e, gpointer data) { posterize_cancel_callback (w, data); - return FALSE; + return TRUE; } static void diff --git a/app/tools/gimptexttool.c b/app/tools/gimptexttool.c index 0ca3e6de41..fec1ee5dae 100644 --- a/app/tools/gimptexttool.c +++ b/app/tools/gimptexttool.c @@ -615,7 +615,7 @@ text_delete_callback (GtkWidget *w, { text_cancel_callback (w, client_data); - return FALSE; + return TRUE; } static void diff --git a/app/tools/gimpthresholdtool.c b/app/tools/gimpthresholdtool.c index 849f780e37..6a913c3082 100644 --- a/app/tools/gimpthresholdtool.c +++ b/app/tools/gimpthresholdtool.c @@ -512,7 +512,7 @@ threshold_delete_callback (GtkWidget *w, { threshold_cancel_callback (w, client_data); - return FALSE; + return TRUE; } static void diff --git a/app/tools/histogram_tool.c b/app/tools/histogram_tool.c index 25ab9c633d..bc7462da68 100644 --- a/app/tools/histogram_tool.c +++ b/app/tools/histogram_tool.c @@ -550,7 +550,7 @@ histogram_tool_delete_callback (GtkWidget *widget, { histogram_tool_cancel_callback (widget, client_data); - return FALSE; + return TRUE; } static void diff --git a/app/tools/hue_saturation.c b/app/tools/hue_saturation.c index 4237f1987a..70f85e1f9d 100644 --- a/app/tools/hue_saturation.c +++ b/app/tools/hue_saturation.c @@ -754,7 +754,7 @@ hue_saturation_delete_callback (GtkWidget *w, { hue_saturation_cancel_callback (w, client_data); - return FALSE; + return TRUE; } static void diff --git a/app/tools/levels.c b/app/tools/levels.c index ceb182c7fa..80cb9c70e8 100644 --- a/app/tools/levels.c +++ b/app/tools/levels.c @@ -1090,7 +1090,7 @@ levels_delete_callback (GtkWidget *w, { levels_cancel_callback (w, client_data); - return FALSE; + return TRUE; } static void diff --git a/app/tools/posterize.c b/app/tools/posterize.c index 816427f2a0..d562fefe0e 100644 --- a/app/tools/posterize.c +++ b/app/tools/posterize.c @@ -376,7 +376,7 @@ posterize_delete_callback (GtkWidget *w, GdkEvent *e, gpointer data) { posterize_cancel_callback (w, data); - return FALSE; + return TRUE; } static void diff --git a/app/tools/text_tool.c b/app/tools/text_tool.c index 0ca3e6de41..fec1ee5dae 100644 --- a/app/tools/text_tool.c +++ b/app/tools/text_tool.c @@ -615,7 +615,7 @@ text_delete_callback (GtkWidget *w, { text_cancel_callback (w, client_data); - return FALSE; + return TRUE; } static void diff --git a/app/tools/threshold.c b/app/tools/threshold.c index 849f780e37..6a913c3082 100644 --- a/app/tools/threshold.c +++ b/app/tools/threshold.c @@ -512,7 +512,7 @@ threshold_delete_callback (GtkWidget *w, { threshold_cancel_callback (w, client_data); - return FALSE; + return TRUE; } static void diff --git a/app/tools/tools.c b/app/tools/tools.c index 426c6e4c53..6ad99b2ea4 100644 --- a/app/tools/tools.c +++ b/app/tools/tools.c @@ -533,7 +533,7 @@ tools_options_delete_callback (GtkWidget *w, { tools_options_dialog_callback (w, client_data); - return FALSE; + return TRUE; } static void diff --git a/app/user_install.c b/app/user_install.c index e0c520ebc0..13d7a22356 100644 --- a/app/user_install.c +++ b/app/user_install.c @@ -97,6 +97,9 @@ install_help (InstallCallback callback) GdkFont *font; help_widget = gtk_dialog_new (); + gtk_signal_connect (GTK_OBJECT (help_widget), "delete_event", + GTK_SIGNAL_FUNC (gtk_true), + NULL); gtk_window_set_wmclass (GTK_WINDOW (help_widget), "gimp_installation", "Gimp"); gtk_window_set_title (GTK_WINDOW (help_widget), "GIMP Installation"); gtk_window_position (GTK_WINDOW (help_widget), GTK_WIN_POS_CENTER); @@ -340,6 +343,9 @@ install_run (InstallCallback callback) int executable = TRUE; install_widget = gtk_dialog_new (); + gtk_signal_connect (GTK_OBJECT (install_widget), "delete_event", + GTK_SIGNAL_FUNC (gtk_true), + NULL); gtk_window_set_wmclass (GTK_WINDOW (install_widget), "installation_log", "Gimp"); gtk_window_set_title (GTK_WINDOW (install_widget), "Installation Log"); gtk_window_position (GTK_WINDOW (install_widget), GTK_WIN_POS_CENTER); diff --git a/app/widgets/gimpgradienteditor.c b/app/widgets/gimpgradienteditor.c index 6ab13641ad..34bf7bf71a 100644 --- a/app/widgets/gimpgradienteditor.c +++ b/app/widgets/gimpgradienteditor.c @@ -1255,7 +1255,7 @@ ed_close_callback(GtkWidget *widget, gpointer client_data) if (GTK_WIDGET_VISIBLE(g_editor->shell)) gtk_widget_hide(g_editor->shell); - return FALSE; + return TRUE; } /* ed_close_callback */ diff --git a/app/widgets/gimppaletteeditor.c b/app/widgets/gimppaletteeditor.c index 31580e3744..1fa55bc3f9 100644 --- a/app/widgets/gimppaletteeditor.c +++ b/app/widgets/gimppaletteeditor.c @@ -883,7 +883,7 @@ palette_dialog_delete_callback (GtkWidget *w, { palette_close_callback (w, client_data); - return FALSE; + return TRUE; } diff --git a/libgimpwidgets/gimpcolorselect.c b/libgimpwidgets/gimpcolorselect.c index 7934cb153b..3a23c88cc2 100644 --- a/libgimpwidgets/gimpcolorselect.c +++ b/libgimpwidgets/gimpcolorselect.c @@ -788,7 +788,7 @@ color_select_delete_callback (GtkWidget *w, { color_select_cancel_callback (w, client_data); - return FALSE; + return TRUE; }