From 72be879a2786d992936b8195b328dfca75b22919 Mon Sep 17 00:00:00 2001 From: Dan Winship Date: Wed, 9 May 2001 22:01:42 +0000 Subject: New file, started by Ettore, finished by me, to implement the * mail-offline-handler.c: New file, started by Ettore, finished by me, to implement the GNOME_Evolution_Offline interface. * Makefile.am (evolution_mail_SOURCES): Add mail-offline-handler.[ch] * mail-ops.c (mail_store_set_offline): Set a store online or offline. * mail-send-recv.c (auto_timeout): Don't run auto-check-for-mail while the session is offline. * component-factory.c (component_fn): Set up offline handler. svn path=/trunk/; revision=9739 --- mail/component-factory.c | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) (limited to 'mail/component-factory.c') diff --git a/mail/component-factory.c b/mail/component-factory.c index 759d7294f1..26796201a1 100644 --- a/mail/component-factory.c +++ b/mail/component-factory.c @@ -40,6 +40,7 @@ #include "mail-config.h" #include "mail-tools.h" #include "mail-ops.h" +#include "mail-offline-handler.h" #include "mail-local.h" #include "mail-session.h" #include "mail-mt.h" @@ -287,12 +288,13 @@ static BonoboObject * component_fn (BonoboGenericFactory *factory, void *closure) { EvolutionShellComponent *shell_component; + MailOfflineHandler *offline_handler; shell_component = evolution_shell_component_new (folder_types, create_view, create_folder, NULL, /* remove_folder_fn */ - NULL, /* copy_folder_fn */ + NULL, /* xfer_folder_fn */ NULL, /* populate_folder_context_menu_fn */ NULL, /* get_dnd_selection_fn */ NULL); @@ -306,6 +308,9 @@ component_fn (BonoboGenericFactory *factory, void *closure) gtk_signal_connect (GTK_OBJECT (shell_component), "destroy", GTK_SIGNAL_FUNC (owner_unset_cb), NULL); + offline_handler = mail_offline_handler_new (); + bonobo_object_add_interface (BONOBO_OBJECT (shell_component), BONOBO_OBJECT (offline_handler)); + return BONOBO_OBJECT (shell_component); } @@ -510,3 +515,15 @@ mail_lookup_storage (CamelStore *store) return storage; } + +int +mail_storages_count (void) +{ + return g_hash_table_size (storages_hash); +} + +void +mail_storages_foreach (GHFunc func, gpointer data) +{ + g_hash_table_foreach (storages_hash, func, data); +} -- cgit v1.2.3