From effe256583bbb6ad82e969070749a859429fd9ff Mon Sep 17 00:00:00 2001 From: Peter Williams Date: Fri, 30 Jun 2000 18:07:46 +0000 Subject: Fix to work with new EvolutionShellClient svn path=/trunk/; revision=3830 --- mail/component-factory.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'mail/component-factory.c') diff --git a/mail/component-factory.c b/mail/component-factory.c index 19c02d8a80..643878c89d 100644 --- a/mail/component-factory.c +++ b/mail/component-factory.c @@ -290,6 +290,7 @@ struct create_info_s { static void create_imap_storage (EvolutionShellComponent *shell_component) { + EvolutionShellClient *shell_client; Evolution_Shell corba_shell; EvolutionStorage *storage; char *cpath, *source, *server, *p; @@ -302,13 +303,14 @@ create_imap_storage (EvolutionShellComponent *shell_component) if (!source || strncasecmp (source, "imap://", 7)) return; - corba_shell = evolution_shell_component_get_owner (shell_component); - if (corba_shell == CORBA_OBJECT_NIL) { + shell_client = evolution_shell_component_get_owner (shell_component); + if (shell_client == NULL) { g_warning ("We have no shell!?"); - g_free (source); return; } + corba_shell = bonobo_object_corba_objref (BONOBO_OBJECT (shell_client)); + if (!(server = strchr (source, '@'))) { g_free (source); return; @@ -415,6 +417,7 @@ real_create_imap_storage( gpointer user_data ) static void create_news_storage (EvolutionShellComponent *shell_component) { + EvolutionShellClient *shell_client; Evolution_Shell corba_shell; EvolutionStorage *storage; char *cpath, *source, *server, *p; @@ -427,13 +430,14 @@ create_news_storage (EvolutionShellComponent *shell_component) if (!source || strncasecmp (source, "news://", 7)) return; - corba_shell = evolution_shell_component_get_owner (shell_component); - if (corba_shell == CORBA_OBJECT_NIL) { + shell_client = evolution_shell_component_get_owner (shell_component); + if (shell_client == NULL) { g_warning ("We have no shell!?"); - g_free (source); return; } + corba_shell = bonobo_object_corba_objref (BONOBO_OBJECT (shell_client)); + server = source + 7; for (p = server; *p && *p != '/'; p++); -- cgit