From 320484b37fb316e369b66d3bf11484854d8911ca Mon Sep 17 00:00:00 2001 From: Dan Winship Date: Mon, 7 Apr 2003 20:20:00 +0000 Subject: Desensitize the window's top-level container rather than desensitizing the * evolution-folder-selector-button.c (clicked): Desensitize the window's top-level container rather than desensitizing the window itself, which causes strange problems [#40854]. Also fix up the code that tries to watch for the parent window being destroyed. * e-shell.c (impl_Shell_selectUserFolder): Use e_dialog_set_transient_for_xid. * e-shell-folder-selection-dialog.c (impl_response): Treat GTK_RESPONSE_DELETE_EVENT the same as GTK_RESPONSE_CANCEL. (e_shell_folder_selection_dialog_construct): No need to catch "delete_event" signal. svn path=/trunk/; revision=20729 --- shell/e-shell-folder-selection-dialog.c | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) (limited to 'shell/e-shell-folder-selection-dialog.c') diff --git a/shell/e-shell-folder-selection-dialog.c b/shell/e-shell-folder-selection-dialog.c index 69b3f5cb0d..962d145ca3 100644 --- a/shell/e-shell-folder-selection-dialog.c +++ b/shell/e-shell-folder-selection-dialog.c @@ -240,6 +240,7 @@ impl_response (GtkDialog *dialog, break; case GTK_RESPONSE_CANCEL: + case GTK_RESPONSE_DELETE_EVENT: g_signal_emit (folder_selection_dialog, signals[CANCELLED], 0); gtk_widget_destroy (GTK_WIDGET (dialog)); break; @@ -267,9 +268,6 @@ impl_response (GtkDialog *dialog, g_free (default_type); break; - - default: /* WM close button */ - gtk_widget_destroy (GTK_WIDGET (dialog)); } } @@ -344,16 +342,6 @@ folder_selected_cb (EStorageSetView *storage_set_view, gtk_dialog_set_response_sensitive (GTK_DIALOG (dialog), GTK_RESPONSE_OK, FALSE); } -static gint -delete_event_cb (GtkWidget *w, GdkEvent *event, gpointer data) -{ - EShellFolderSelectionDialog *dialog = data; - - g_signal_emit (dialog, signals[CANCELLED], 0); - - return TRUE; -} - static void double_click_cb (EStorageSetView *essv, int row, @@ -411,9 +399,6 @@ e_shell_folder_selection_dialog_construct (EShellFolderSelectionDialog *folder_s gtk_window_set_modal (GTK_WINDOW (folder_selection_dialog), TRUE); gtk_window_set_title (GTK_WINDOW (folder_selection_dialog), title); - g_signal_connect (folder_selection_dialog, "delete_event", - G_CALLBACK (delete_event_cb), folder_selection_dialog); - if (allow_creation) gtk_dialog_add_buttons (GTK_DIALOG (folder_selection_dialog), GTK_STOCK_NEW, RESPONSE_NEW, -- cgit v1.2.3