From 073927075b22b5a2988e299e91d2ccb7ec58c1c8 Mon Sep 17 00:00:00 2001 From: Ettore Perazzoli Date: Thu, 16 May 2002 18:48:59 +0000 Subject: New, quit handler for the EvolutionShellComponent. (add_creatable_item): * gui/component/addressbook-component.c (request_quit): New, quit handler for the EvolutionShellComponent. (add_creatable_item): Set it up. * gui/contact-editor/e-contact-list-editor.c (e_contact_list_editor_request_close_all): New. (e_contact_list_editor_new): Put the contact editor in a static list and gtk_object_weakref() it. (contact_list_editor_destroy_notify): New, GtkDestroyNotify function for the contact editors. * gui/contact-editor/e-contact-editor.c (e_contact_editor_request_close_all): New. (e_contact_editor_new): Put the contact editor in a static list and gtk_object_weakref() it. (contact_editor_destroy_notify): New, GtkDestroyNotify function for the contact editors. svn path=/trunk/; revision=16934 --- addressbook/gui/component/addressbook-component.c | 17 ++++++++++++++++- addressbook/gui/component/addressbook-storage.c | 2 +- 2 files changed, 17 insertions(+), 2 deletions(-) (limited to 'addressbook/gui/component') diff --git a/addressbook/gui/component/addressbook-component.c b/addressbook/gui/component/addressbook-component.c index 2979d211eb..54940faeab 100644 --- a/addressbook/gui/component/addressbook-component.c +++ b/addressbook/gui/component/addressbook-component.c @@ -504,6 +504,20 @@ destination_folder_handle_drop (EvolutionShellComponentDndDestinationFolder *fol return TRUE; } + +/* Quitting. */ + +static gboolean +request_quit (EvolutionShellComponent *shell_component, + void *data) +{ + if (! e_contact_editor_request_close_all () + || ! e_contact_list_editor_request_close_all ()) + return FALSE; + else + return TRUE; +} + /* The factory function. */ @@ -549,7 +563,8 @@ create_component (void) remove_folder, xfer_folder, NULL, get_dnd_selection, - NULL, NULL); + request_quit, + NULL); destination_interface = evolution_shell_component_dnd_destination_folder_new (destination_folder_handle_motion, destination_folder_handle_drop, diff --git a/addressbook/gui/component/addressbook-storage.c b/addressbook/gui/component/addressbook-storage.c index d3430dd476..358c3e8245 100644 --- a/addressbook/gui/component/addressbook-storage.c +++ b/addressbook/gui/component/addressbook-storage.c @@ -165,7 +165,7 @@ addressbook_get_other_contact_storage (void) EvolutionStorageResult result; if (storage == NULL) { - storage = evolution_storage_new (U_("Other Contacts"), FALSE); + storage = evolution_storage_new (U_("Other Contacts"), TRUE); gtk_signal_connect (GTK_OBJECT (storage), "remove_folder", GTK_SIGNAL_FUNC(remove_ldap_folder), NULL); -- cgit v1.2.3