From 3d386b57d1682ad0f5fb0b9a60f0d65906f578b7 Mon Sep 17 00:00:00 2001 From: Ettore Perazzoli Date: Wed, 15 May 2002 21:41:51 +0000 Subject: Check with e_shell_prepare_for_quit() before quitting. * e-shell-view-menu.c (command_quit): Check with e_shell_prepare_for_quit() before quitting. * e-shell.c (e_shell_prepare_for_quit): New. * evolution-test-component.c (request_quit_fn): New function asking for confirmation to quit. * evolution-shell-component.c (evolution_shell_component_new): New arg @request_quit_fn. (impl_requestQuit): New, implementation for EvolutionShellComponent::requestQuit. (evolution_shell_component_result_to_string): Handle EVOLUTION_SHELL_COMPONENT_CANCEL. (evolution_shell_component_client_request_quit): New. * Evolution-ShellComponent.idl (requestQuit): New. * component-factory.c (create_component): Pass NULL as @request_quit_fn. * component-factory.c (create_component): Pass NULL as @request_quit_fn. * gui/component-factory.c (create_object): Pass NULL as @request_quit_fn. * gui/component/addressbook-component.c (create_component): Pass NULL as @request_quit_fn. svn path=/trunk/; revision=16925 --- shell/Evolution-ShellComponent.idl | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'shell/Evolution-ShellComponent.idl') diff --git a/shell/Evolution-ShellComponent.idl b/shell/Evolution-ShellComponent.idl index 495553e8f7..e450aa719f 100644 --- a/shell/Evolution-ShellComponent.idl +++ b/shell/Evolution-ShellComponent.idl @@ -137,11 +137,19 @@ module Evolution { @show_dialog is true, display a progress dialog for the operation as well. */ void sendReceive (in boolean show_dialog); + + /* Request the component to quit. The component should report + through the listener (through OK or CANCEL) whether the + shell can quit safely. (This is meant to be used for + confirmations before quitting.) */ + oneway void requestQuit (in ShellComponentListener listener) + raises (Busy); }; interface ShellComponentListener { enum Result { OK, + CANCEL, UNSUPPORTED_OPERATION, UNSUPPORTED_TYPE, EXISTS, -- cgit v1.2.3