aboutsummaryrefslogtreecommitdiffstats
path: root/shell/e-shell.c
diff options
context:
space:
mode:
Diffstat (limited to 'shell/e-shell.c')
-rw-r--r--shell/e-shell.c27
1 files changed, 14 insertions, 13 deletions
diff --git a/shell/e-shell.c b/shell/e-shell.c
index 3cf7043183..46cfcab5e9 100644
--- a/shell/e-shell.c
+++ b/shell/e-shell.c
@@ -112,27 +112,28 @@ folder_selection_dialog_clicked_cb (GnomeDialog *dialog,
shell = E_SHELL (data);
listener = gtk_object_get_data (GTK_OBJECT (dialog), "corba_listener");
- storage_set = e_shell_get_storage_set (shell);
- path = e_shell_folder_selection_dialog_get_selected_path (folder_selection_dialog),
- folder = e_storage_set_get_folder (storage_set, path);
+ CORBA_exception_init (&ev);
- uri = g_strconcat (E_SHELL_URI_PREFIX, path, NULL);
+ if (button_number == 0) {
+ storage_set = e_shell_get_storage_set (shell);
+ path = e_shell_folder_selection_dialog_get_selected_path (folder_selection_dialog),
+ folder = e_storage_set_get_folder (storage_set, path);
- if (folder == NULL || button_number == 1) /* Uh? */
- physical_uri = "";
- else
- physical_uri = e_folder_get_physical_uri (folder);
+ uri = g_strconcat (E_SHELL_URI_PREFIX, path, NULL);
- CORBA_exception_init (&ev);
+ if (folder == NULL || button_number == 1) /* Uh? */
+ physical_uri = "";
+ else
+ physical_uri = e_folder_get_physical_uri (folder);
- Evolution_FolderSelectionListener_selected (listener, uri, physical_uri, &ev);
+ Evolution_FolderSelectionListener_selected (listener, uri, physical_uri, &ev);
+ g_free (uri);
+ } else
+ Evolution_FolderSelectionListener_cancel (listener, &ev);
CORBA_Object_release (listener, &ev);
-
CORBA_exception_free (&ev);
- g_free (uri);
-
if (button_number != -1)
gnome_dialog_close(dialog);
}