From fc1e5673bb9d91f89a851262cf5c66b50c31c18d Mon Sep 17 00:00:00 2001 From: Ettore Perazzoli Date: Fri, 5 Oct 2001 17:49:35 +0000 Subject: If setting the owner fails, print the a warning message out. Then restart * e-shell.c (set_owner_on_components): If setting the owner fails, print the a warning message out. Then restart the component. * e-component-registry.c (component_free): Return a boolean value. %FALSE if ::unsetOwner raises an exception. (register_type): New arg @override_duplicate, to avoid complaining if a component gets re-registered. (register_component): Likewise. (e_component_registry_restart_component): New. * e-uri-schema-registry.c (e_uri_schema_registry_set_handler_for_schema): Changed return type to `void'. Just remove the old handler and set up the new one. * evolution-shell-component-client.c (corba_exception_to_result): Translate ::OldOwnerHasDied into EVOLUTION_SHELL_COMPONENT_OLDOWNERHASDIED. * evolution-shell-component.h: New enum value `EVOLUTION_SHELL_COMPONENT_OLDOWNERHASDIED'. * evolution-shell-component.c (impl_setOwner): If the old owner is not alive anymore [use CORBA_Object_non_existent() to figure this out], emit OWNER_UNSET and raise `OldOwnerHasDied'. (evolution_shell_component_result_to_string): New. * Evolution-ShellComponent.idl: New exception `OldOwnerHasDied'. (ShellComponent::setOwner): Can raise it. * e-folder-type-registry.c (e_folder_type_register_type_registered): New. (e_folder_type_register_unregister_type): New. svn path=/trunk/; revision=13446 --- shell/evolution-shell-component-client.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'shell/evolution-shell-component-client.c') diff --git a/shell/evolution-shell-component-client.c b/shell/evolution-shell-component-client.c index bba3cb462e..b1666c2f27 100644 --- a/shell/evolution-shell-component-client.c +++ b/shell/evolution-shell-component-client.c @@ -72,6 +72,8 @@ corba_exception_to_result (const CORBA_Environment *ev) if (ev->_major == CORBA_USER_EXCEPTION) { if (strcmp (ev->_repo_id, ex_GNOME_Evolution_ShellComponent_AlreadyOwned) == 0) return EVOLUTION_SHELL_COMPONENT_ALREADYOWNED; + if (strcmp (ev->_repo_id, ex_GNOME_Evolution_ShellComponent_OldOwnerHasDied) == 0) + return EVOLUTION_SHELL_COMPONENT_OLDOWNERHASDIED; if (strcmp (ev->_repo_id, ex_GNOME_Evolution_ShellComponent_NotOwned) == 0) return EVOLUTION_SHELL_COMPONENT_NOTOWNED; if (strcmp (ev->_repo_id, ex_GNOME_Evolution_ShellComponent_NotFound) == 0) @@ -379,6 +381,7 @@ evolution_shell_component_client_new (const char *id) { CORBA_Environment ev; CORBA_Object corba_object; + char *ior; g_return_val_if_fail (id != NULL, NULL); @@ -390,6 +393,13 @@ evolution_shell_component_client_new (const char *id) g_warning ("Could not start up component for %s.", id); return NULL; } + +#if 0 + ior = CORBA_ORB_object_to_string (bonobo_orb (), corba_object, &ev); + g_print ("--- %s %s\n", id, ior); + CORBA_free (ior); +#endif + CORBA_exception_free (&ev); if (corba_object == CORBA_OBJECT_NIL) { -- cgit