From af4b3a1ee957a61f72546ade18b2b3717915ad34 Mon Sep 17 00:00:00 2001 From: Ettore Perazzoli Date: Fri, 4 Apr 2003 20:45:27 +0000 Subject: Define RESPONSE_NEW for the "New" button in the dialog. (impl_response): Handle RESPONSE_NEW. (e_shell_folder_selection_dialog_construct): Add the "new" button with RESPONSE_NEW response_id. svn path=/trunk/; revision=20675 --- shell/e-shell-folder-selection-dialog.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 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 56b993ccf1..69b3f5cb0d 100644 --- a/shell/e-shell-folder-selection-dialog.c +++ b/shell/e-shell-folder-selection-dialog.c @@ -66,6 +66,10 @@ enum { static guint signals[LAST_SIGNAL] = { 0 }; +enum { + RESPONSE_NEW +}; + /* Utility functions. */ @@ -234,11 +238,13 @@ impl_response (GtkDialog *dialog, gtk_widget_destroy (GTK_WIDGET (dialog)); } break; + case GTK_RESPONSE_CANCEL: g_signal_emit (folder_selection_dialog, signals[CANCELLED], 0); gtk_widget_destroy (GTK_WIDGET (dialog)); break; - default: /* New... */ + + case RESPONSE_NEW: storage_set_view = E_STORAGE_SET_VIEW (priv->storage_set_view); default_parent_folder = e_storage_set_view_get_current_folder (storage_set_view); @@ -261,6 +267,9 @@ impl_response (GtkDialog *dialog, g_free (default_type); break; + + default: /* WM close button */ + gtk_widget_destroy (GTK_WIDGET (dialog)); } } @@ -407,7 +416,7 @@ e_shell_folder_selection_dialog_construct (EShellFolderSelectionDialog *folder_s if (allow_creation) gtk_dialog_add_buttons (GTK_DIALOG (folder_selection_dialog), - GTK_STOCK_NEW, 1, + GTK_STOCK_NEW, RESPONSE_NEW, NULL); gtk_dialog_add_buttons (GTK_DIALOG (folder_selection_dialog), -- cgit v1.2.3