diff options
author | Ettore Perazzoli <ettore@src.gnome.org> | 2001-10-06 01:49:35 +0800 |
---|---|---|
committer | Ettore Perazzoli <ettore@src.gnome.org> | 2001-10-06 01:49:35 +0800 |
commit | fc1e5673bb9d91f89a851262cf5c66b50c31c18d (patch) | |
tree | 042f340229e4ee6f196cc21fbb94a90ec16601b2 /shell/e-folder-type-registry.c | |
parent | a1750a292eb31a113a22c0278fb6517d56f78f75 (diff) | |
download | gsoc2013-evolution-fc1e5673bb9d91f89a851262cf5c66b50c31c18d.tar.gz gsoc2013-evolution-fc1e5673bb9d91f89a851262cf5c66b50c31c18d.tar.zst gsoc2013-evolution-fc1e5673bb9d91f89a851262cf5c66b50c31c18d.zip |
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
Diffstat (limited to 'shell/e-folder-type-registry.c')
-rw-r--r-- | shell/e-folder-type-registry.c | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/shell/e-folder-type-registry.c b/shell/e-folder-type-registry.c index 97fb7b4c25..0c7e664dd6 100644 --- a/shell/e-folder-type-registry.c +++ b/shell/e-folder-type-registry.c @@ -327,6 +327,49 @@ e_folder_type_registry_set_handler_for_type (EFolderTypeRegistry *folder_type_r } +gboolean +e_folder_type_register_type_registered (EFolderTypeRegistry *folder_type_registry, + const char *type_name) +{ + EFolderTypeRegistryPrivate *priv; + + g_return_val_if_fail (folder_type_registry != NULL, FALSE); + g_return_val_if_fail (E_IS_FOLDER_TYPE_REGISTRY (folder_type_registry), FALSE); + g_return_val_if_fail (type_name != NULL, FALSE); + + priv = folder_type_registry->priv; + + if (get_folder_type (folder_type_registry, type_name) == NULL) + return FALSE; + + return TRUE; +} + +void +e_folder_type_register_unregister_type (EFolderTypeRegistry *folder_type_registry, + const char *type_name) +{ + EFolderTypeRegistryPrivate *priv; + FolderType *folder_type; + + g_return_if_fail (folder_type_registry != NULL); + g_return_if_fail (E_IS_FOLDER_TYPE_REGISTRY (folder_type_registry)); + g_return_if_fail (type_name != NULL); + + priv = folder_type_registry->priv; + + folder_type = get_folder_type (folder_type_registry, type_name); + if (folder_type == NULL) { + g_warning ("e_folder_type_register_unregister_type(): cannot find type `%s'\n", + type_name); + return; + } + + g_hash_table_remove (priv->name_to_type, folder_type->name); + folder_type_free (folder_type); +} + + static void get_type_names_hash_forall (void *key, void *value, |