aboutsummaryrefslogtreecommitdiffstats
path: root/shell/evolution-shell-component.h
diff options
context:
space:
mode:
authorEttore Perazzoli <ettore@src.gnome.org>2002-05-16 05:41:51 +0800
committerEttore Perazzoli <ettore@src.gnome.org>2002-05-16 05:41:51 +0800
commit3d386b57d1682ad0f5fb0b9a60f0d65906f578b7 (patch)
tree67f79ba63a89ee7f5e1e463b8b4e082bfca83620 /shell/evolution-shell-component.h
parentc1ce3633db69de57b4a589587627fa088f9a3e5f (diff)
downloadgsoc2013-evolution-3d386b57d1682ad0f5fb0b9a60f0d65906f578b7.tar.gz
gsoc2013-evolution-3d386b57d1682ad0f5fb0b9a60f0d65906f578b7.tar.zst
gsoc2013-evolution-3d386b57d1682ad0f5fb0b9a60f0d65906f578b7.zip
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
Diffstat (limited to 'shell/evolution-shell-component.h')
-rw-r--r--shell/evolution-shell-component.h46
1 files changed, 26 insertions, 20 deletions
diff --git a/shell/evolution-shell-component.h b/shell/evolution-shell-component.h
index b10613cb34..8cd1f98d96 100644
--- a/shell/evolution-shell-component.h
+++ b/shell/evolution-shell-component.h
@@ -52,6 +52,7 @@ typedef struct _EvolutionShellComponentClass EvolutionShellComponentClass;
enum _EvolutionShellComponentResult {
EVOLUTION_SHELL_COMPONENT_OK,
+ EVOLUTION_SHELL_COMPONENT_CANCEL,
EVOLUTION_SHELL_COMPONENT_CORBAERROR,
EVOLUTION_SHELL_COMPONENT_INTERRUPTED,
EVOLUTION_SHELL_COMPONENT_INVALIDARG,
@@ -110,6 +111,9 @@ typedef char * (* EvolutionShellComponentGetDndSelectionFn) (EvolutionShellCompo
int *selection_length_return,
void *closure);
+typedef gboolean (* EvolutionShellComponentRequestQuitFn) (EvolutionShellComponent *shell_component,
+ void *closure);
+
struct _EvolutionShellComponentFolderType {
char *name;
char *icon_name;
@@ -161,26 +165,28 @@ struct _EvolutionShellComponentClass {
};
-GtkType evolution_shell_component_get_type (void);
-void evolution_shell_component_construct (EvolutionShellComponent *shell_component,
- const EvolutionShellComponentFolderType folder_types[],
- const char *external_uri_schemas[],
- EvolutionShellComponentCreateViewFn create_view_fn,
- EvolutionShellComponentCreateFolderFn create_folder_fn,
- EvolutionShellComponentRemoveFolderFn remove_folder_fn,
- EvolutionShellComponentXferFolderFn xfer_folder_fn,
- EvolutionShellComponentPopulateFolderContextMenuFn populate_folder_context_menu_fn,
- EvolutionShellComponentGetDndSelectionFn get_dnd_selection_fn,
- void *closure);
-EvolutionShellComponent *evolution_shell_component_new (const EvolutionShellComponentFolderType folder_types[],
- const char *external_uri_schemas[],
- EvolutionShellComponentCreateViewFn create_view_fn,
- EvolutionShellComponentCreateFolderFn create_folder_fn,
- EvolutionShellComponentRemoveFolderFn remove_folder_fn,
- EvolutionShellComponentXferFolderFn xfer_folder_fn,
- EvolutionShellComponentPopulateFolderContextMenuFn populate_folder_context_menu_fn,
- EvolutionShellComponentGetDndSelectionFn get_dnd_selection_fn,
- void *closure);
+GtkType evolution_shell_component_get_type (void);
+void evolution_shell_component_construct (EvolutionShellComponent *shell_component,
+ const EvolutionShellComponentFolderType folder_types[],
+ const char *external_uri_schemas[],
+ EvolutionShellComponentCreateViewFn create_view_fn,
+ EvolutionShellComponentCreateFolderFn create_folder_fn,
+ EvolutionShellComponentRemoveFolderFn remove_folder_fn,
+ EvolutionShellComponentXferFolderFn xfer_folder_fn,
+ EvolutionShellComponentPopulateFolderContextMenuFn populate_folder_context_menu_fn,
+ EvolutionShellComponentGetDndSelectionFn get_dnd_selection_fn,
+ EvolutionShellComponentRequestQuitFn request_quit_fn,
+ void *closure);
+EvolutionShellComponent *evolution_shell_component_new (const EvolutionShellComponentFolderType folder_types[],
+ const char *external_uri_schemas[],
+ EvolutionShellComponentCreateViewFn create_view_fn,
+ EvolutionShellComponentCreateFolderFn create_folder_fn,
+ EvolutionShellComponentRemoveFolderFn remove_folder_fn,
+ EvolutionShellComponentXferFolderFn xfer_folder_fn,
+ EvolutionShellComponentPopulateFolderContextMenuFn populate_folder_context_menu_fn,
+ EvolutionShellComponentGetDndSelectionFn get_dnd_selection_fn,
+ EvolutionShellComponentRequestQuitFn request_quit_fn,
+ void *closure);
EvolutionShellClient *evolution_shell_component_get_owner (EvolutionShellComponent *shell_component);
void evolution_shell_component_add_user_creatable_item (EvolutionShellComponent *shell_component,