From 73f3bc0bd4680f3e4d4fd77d5b9f5d598ffca209 Mon Sep 17 00:00:00 2001 From: Chris Toshok Date: Wed, 11 Oct 2000 02:05:29 +0000 Subject: add a ref to input->storage here so that the ref/unref pattern more 2000-10-10 Chris Toshok * mail-ops.c (setup_scan_subfolders): add a ref to input->storage here so that the ref/unref pattern more closely matches other mail-ops. also, this keeps the storage from being freed when we hit the unref in cleanup_scan_subfolders, which is important because we maintain a reference to it in the storage_hash in component-factory.c * subscribe-dialog.h: add storage field. * subscribe-dialog.c (subscribe_folder_info): new function, subscribe to a folder given it's CamelFolderInfo, and add it to the shell - we're generating a path from the name of the folder which is bad. (unsubscribe_folder_info): same (except we unsubscribe and remove from the shell). (storage_selected_cb): unref the currently selected storage. (subscribe_dialog_destroy): unref the currently selected storage. (subscribe_dialog_construct): sc->storage = NULL. * component-factory.c (mail_lookup_storage): new function, to look up a EvolutionStorage corresponding to a CamelService. we ref the EvolutionStorage before passing it back. (mail_add_new_storage): insert the storage into storages_hash if result is EVOLUTION_STORAGE_OK. * mail.h: add prototype for mail_lookup_storage. svn path=/trunk/; revision=5830 --- mail/mail.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'mail/mail.h') diff --git a/mail/mail.h b/mail/mail.h index 8f548945f3..3b4b7b81df 100644 --- a/mail/mail.h +++ b/mail/mail.h @@ -26,6 +26,7 @@ #include "mail-config.h" #include "mail-config-gui.h" #include "folder-browser.h" +#include "shell/evolution-storage.h" extern char *evolution_dir; @@ -116,6 +117,8 @@ GtkWidget *mail_view_create (CamelFolder *source, const char *uid, CamelMimeMess /*takes a GSList of MailConfigServices */ void mail_load_storages (Evolution_Shell corba_shell, GSList *sources); void mail_add_new_storage (const char *uri, Evolution_Shell corba_shell, CamelException *ex); +/* used in the subscribe dialog code */ +EvolutionStorage* mail_lookup_storage (CamelService *service); /* session */ void session_init (void); -- cgit v1.2.3