From 38a2779f97b7558a2eb01bf8a949a3cc64f5af80 Mon Sep 17 00:00:00 2001 From: Jason Leach Date: Wed, 25 Jul 2001 22:04:44 +0000 Subject: New function. When a folder is selected set the OK button to be sensitive 2001-07-25 Jason Leach * e-shell-folder-selection-dialog.c (folder_selected_cb): New function. When a folder is selected set the OK button to be sensitive (but before that have it desensitized). Bug #5483. svn path=/trunk/; revision=11414 --- shell/e-shell-folder-selection-dialog.c | 19 +++++++++++++++++-- 1 file changed, 17 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 8ef598c50b..a07fac65e7 100644 --- a/shell/e-shell-folder-selection-dialog.c +++ b/shell/e-shell-folder-selection-dialog.c @@ -286,6 +286,17 @@ set_default_folder (EShellFolderSelectionDialog *shell_folder_selection_dialog, g_free (default_path); } +static void +folder_selected_cb (EStorageSetView *storage_set_view, + const char *path, + void *data) +{ + GnomeDialog *dialog; + + dialog = GNOME_DIALOG (data); + + gnome_dialog_set_sensitive (dialog, 0, TRUE); +} /** * e_shell_folder_selection_dialog_construct: @@ -332,6 +343,7 @@ e_shell_folder_selection_dialog_construct (EShellFolderSelectionDialog *folder_s _("New..."), NULL); gnome_dialog_set_default (GNOME_DIALOG (folder_selection_dialog), 0); + gnome_dialog_set_sensitive (GNOME_DIALOG (folder_selection_dialog), 0, FALSE); /* Make sure we get destroyed if the shell gets destroyed. */ @@ -367,8 +379,11 @@ e_shell_folder_selection_dialog_construct (EShellFolderSelectionDialog *folder_s g_free (filename); GTK_WIDGET_SET_FLAGS (priv->storage_set_view, GTK_CAN_FOCUS); - gtk_signal_connect (GTK_OBJECT (priv->storage_set_view), - "double_click", GTK_SIGNAL_FUNC (dbl_click_cb), + gtk_signal_connect (GTK_OBJECT (priv->storage_set_view), "double_click", + GTK_SIGNAL_FUNC (dbl_click_cb), + folder_selection_dialog); + gtk_signal_connect (GTK_OBJECT (priv->storage_set_view), "folder_selected", + GTK_SIGNAL_FUNC (folder_selected_cb), folder_selection_dialog); g_assert (priv->allowed_types == NULL); -- cgit v1.2.3