From 83387a7fddc83a28a04c7a649762474ac591b961 Mon Sep 17 00:00:00 2001 From: Dan Winship Date: Fri, 30 Jun 2000 19:04:42 +0000 Subject: 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 --- shell/evolution-shell-client.c | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) (limited to 'shell/evolution-shell-client.c') diff --git a/shell/evolution-shell-client.c b/shell/evolution-shell-client.c index bf46e65eab..10ba9ced93 100644 --- a/shell/evolution-shell-client.c +++ b/shell/evolution-shell-client.c @@ -74,6 +74,23 @@ impl_FolderSelectionListener_selected (PortableServer_Servant servant, g_main_quit (listener_servant->main_loop); } +static void +impl_FolderSelectionListener_cancel (PortableServer_Servant servant, + CORBA_Environment *ev) +{ + FolderSelectionListenerServant *listener_servant; + + listener_servant = (FolderSelectionListenerServant *) servant; + + if (listener_servant->uri_return != NULL) + * (listener_servant->uri_return) = NULL; + + if (listener_servant->physical_uri_return != NULL) + * (listener_servant->physical_uri_return) = NULL; + + g_main_quit (listener_servant->main_loop); +} + static void init_FolderSelectionListener_vtables (void) { @@ -82,6 +99,7 @@ init_FolderSelectionListener_vtables (void) FolderSelectionListener_base_epv.default_POA = NULL; FolderSelectionListener_epv.selected = impl_FolderSelectionListener_selected; + FolderSelectionListener_epv.cancel = impl_FolderSelectionListener_cancel; FolderSelectionListener_vepv._base_epv = &FolderSelectionListener_base_epv; FolderSelectionListener_vepv.Evolution_FolderSelectionListener_epv = &FolderSelectionListener_epv; @@ -274,10 +292,10 @@ evolution_shell_client_new (Evolution_Shell corba_shell) * @uri_return: * @physical_uri_return: * - * Pop up the shell's folder selection dialog with the specified @title and * - * *@default_folder as the initially selected folder. On return, set *@uri and + * Pop up the shell's folder selection dialog with the specified @title and + * @default_folder as the initially selected folder. On return, set *@uri and * *@physical_uri to the evolution: URI and the physical URI of the selected - * *folder. (The dialog is modal.) + * folder (or %NULL if the user cancelled the dialog). (The dialog is modal.) **/ void evolution_shell_client_user_select_folder (EvolutionShellClient *shell_client, -- cgit v1.2.3