diff options
author | Dan Winship <danw@src.gnome.org> | 2000-07-01 03:04:42 +0800 |
---|---|---|
committer | Dan Winship <danw@src.gnome.org> | 2000-07-01 03:04:42 +0800 |
commit | 83387a7fddc83a28a04c7a649762474ac591b961 (patch) | |
tree | 9773116b63a89601f575be798427d59233854eb0 /shell/e-shell.c | |
parent | effe256583bbb6ad82e969070749a859429fd9ff (diff) | |
download | gsoc2013-evolution-83387a7fddc83a28a04c7a649762474ac591b961.tar.gz gsoc2013-evolution-83387a7fddc83a28a04c7a649762474ac591b961.tar.zst gsoc2013-evolution-83387a7fddc83a28a04c7a649762474ac591b961.zip |
add "cancel" to FolderSelectionListener.
* Evolution-Shell.idl: add "cancel" to FolderSelectionListener.
* evolution-shell-client.c (impl_FolderSelectionListener_cancel):
Implement cancel (set *uri and *physical_uri to NULL).
(evolution_shell_client_user_select_folder): document %NULL uri
and physical_uri return values.
* e-shell.c (folder_selection_dialog_clicked_cb): If the user
clicked "Cancel" or used the wm to close the dialog, call _cancel
instead of _selected.
svn path=/trunk/; revision=3831
Diffstat (limited to 'shell/e-shell.c')
-rw-r--r-- | shell/e-shell.c | 27 |
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); } |