From 7a7653f20a4e115339a40ceba828a6ccd35e4653 Mon Sep 17 00:00:00 2001 From: Ettore Perazzoli Date: Fri, 8 Sep 2000 11:02:42 +0000 Subject: Changed so that ::set_owner is called after setting up the local storage, instead of being called before. svn path=/trunk/; revision=5259 --- shell/e-shell.c | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) (limited to 'shell/e-shell.c') diff --git a/shell/e-shell.c b/shell/e-shell.c index 1623162dda..87f19fb4db 100644 --- a/shell/e-shell.c +++ b/shell/e-shell.c @@ -364,6 +364,35 @@ setup_components (EShell *shell) CORBA_exception_free (&ev); } +/* FIXME what if anything fails here? */ +static void +set_owner_on_components (EShell *shell) +{ + Evolution_Shell corba_shell; + EShellPrivate *priv; + const char *local_directory; + GList *id_list; + GList *p; + + priv = shell->priv; + local_directory = e_shell_get_local_directory (shell); + + corba_shell = bonobo_object_corba_objref (BONOBO_OBJECT (shell)); + + id_list = e_component_registry_get_id_list (priv->component_registry); + for (p = id_list; p != NULL; p = p->next) { + EvolutionShellComponentClient *component_client; + const char *id; + + id = (const char *) p->data; + component_client = e_component_registry_get_component_by_id (priv->component_registry, id); + + evolution_shell_component_client_set_owner (component_client, corba_shell, local_directory); + } + + e_free_string_list (id_list); +} + /* EShellView destruction callback. */ @@ -549,6 +578,9 @@ e_shell_construct (EShell *shell, /* The local storage depends on the component registry. */ setup_local_storage (shell); + /* Now that we have a local storage, we can tell the components we are here. */ + set_owner_on_components (shell); + shortcut_path = g_concat_dir_and_file (local_directory, "shortcuts.xml"); priv->shortcuts = e_shortcuts_new (priv->storage_set, priv->folder_type_registry, -- cgit v1.2.3