aboutsummaryrefslogtreecommitdiffstats
path: root/mail/component-factory.c
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@ximian.com>2001-08-20 12:02:10 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2001-08-20 12:02:10 +0800
commitac4f13b93e22cc59dbe36ff3a4825bb5077523c4 (patch)
tree6a78647c2ac037ed920249e1b305ba1f231c0829 /mail/component-factory.c
parent4455dabad1231935ee45c9e028a2c3bafe402d62 (diff)
downloadgsoc2013-evolution-ac4f13b93e22cc59dbe36ff3a4825bb5077523c4.tar.gz
gsoc2013-evolution-ac4f13b93e22cc59dbe36ff3a4825bb5077523c4.tar.zst
gsoc2013-evolution-ac4f13b93e22cc59dbe36ff3a4825bb5077523c4.zip
Allow the activity to be NULL if there isn't a global_shell_client so that
2001-08-19 Jeffrey Stedfast <fejj@ximian.com> * mail-mt.c (do_op_status): Allow the activity to be NULL if there isn't a global_shell_client so that we don't try and report status updates when the shell is destroyed. * mail-config.c (add_shortcut_entry): Return if there isn't a global_shell_client. * component-factory.c (owner_set_cb): set the global_shell_client here and connect to the destroy signal. * mail-vfolder.c (vfolder_create_storage): Use an extern global_shell_client. svn path=/trunk/; revision=12242
Diffstat (limited to 'mail/component-factory.c')
-rw-r--r--mail/component-factory.c23
1 files changed, 17 insertions, 6 deletions
diff --git a/mail/component-factory.c b/mail/component-factory.c
index 3370d2277d..89305125de 100644
--- a/mail/component-factory.c
+++ b/mail/component-factory.c
@@ -61,6 +61,8 @@ char *default_outbox_folder_uri;
CamelFolder *outbox_folder = NULL;
char *evolution_dir;
+EvolutionShellClient *global_shell_client = NULL;
+
#define COMPONENT_FACTORY_ID "OAFIID:GNOME_Evolution_Mail_ShellComponentFactory"
#define SUMMARY_FACTORY_ID "OAFIID:GNOME_Evolution_Mail_ExecutiveSummaryComponentFactory"
@@ -127,7 +129,7 @@ create_view (EvolutionShellComponent *shell_component,
shell_client = evolution_shell_component_get_owner (shell_component);
corba_shell = bonobo_object_corba_objref (BONOBO_OBJECT (shell_client));
-
+
if (g_strcasecmp (folder_type, "mail") == 0) {
const char *noselect;
CamelURL *url;
@@ -592,6 +594,12 @@ got_folder (char *uri, CamelFolder *folder, void *data)
}
static void
+shell_client_destroy (GtkObject *object)
+{
+ global_shell_client = NULL;
+}
+
+static void
owner_set_cb (EvolutionShellComponent *shell_component,
EvolutionShellClient *shell_client,
const char *evolution_homedir,
@@ -603,16 +611,19 @@ owner_set_cb (EvolutionShellComponent *shell_component,
const GSList *news;
#endif
int i;
-
- g_print ("evolution-mail: Yeeeh! We have an owner!\n"); /* FIXME */
-
+
+ /* FIXME: should we ref this? */
+ global_shell_client = shell_client;
+ gtk_signal_connect (GTK_OBJECT (shell_client), "destroy",
+ shell_client_destroy, NULL);
+
evolution_dir = g_strdup (evolution_homedir);
mail_session_init ();
storages_hash = g_hash_table_new (NULL, NULL);
-
+
vfolder_create_storage (shell_component);
-
+
corba_shell = bonobo_object_corba_objref (BONOBO_OBJECT (shell_client));
accounts = mail_config_get_accounts ();