Change type of parent_class to BonoboXObjectClass.

* evolution-shell-component.c: Change type of parent_class to
BonoboXObjectClass.

* e-shell.c (pop_up_activation_error_dialog): New helper function
to pop up a dialog if one of the components couldn't be activated,
getting the description for the error from
e_get_activation_failure_msg().
(setup_components): Use this function in case of activation error.
(set_owner_on_components): Likewise, when the component gets
restarted.  Also get a @splash arg so we can set the parent for
this dialog correctly.

* e-component-registry.c (register_component): New arg @ev.
(e_component_registry_register_component): Likewise.
(e_component_registry_restart_component): Likewise.  Also, remove
some bogus code that was #if'ed out.

* evolution-shell-component-client.c
(evolution_shell_component_client_new): New arg @ev.

* evolution-shell-component-utils.c
(e_get_activation_failure_msg): New.

svn path=/trunk/; revision=16342
This commit is contained in:
Ettore Perazzoli
2002-04-04 13:35:26 +00:00
parent 18a5655114
commit f9b9c12b3b
9 changed files with 148 additions and 64 deletions

View File

@ -388,30 +388,30 @@ evolution_shell_component_client_construct (EvolutionShellComponentClient *shell
}
EvolutionShellComponentClient *
evolution_shell_component_client_new (const char *id)
evolution_shell_component_client_new (const char *id,
CORBA_Environment *ev)
{
EvolutionShellComponentClient *new;
CORBA_Environment ev;
CORBA_Object corba_object;
CORBA_Environment *local_ev;
CORBA_Environment static_ev;
g_return_val_if_fail (id != NULL, NULL);
CORBA_exception_init (&ev);
CORBA_exception_init (&static_ev);
corba_object = oaf_activate_from_id ((char *) id, 0, NULL, &ev); /* Yuck. */
if (ev._major != CORBA_NO_EXCEPTION) {
CORBA_exception_free (&ev);
g_warning ("Could not start up component for %s.", id);
if (ev == NULL)
local_ev = &static_ev;
else
local_ev = ev;
corba_object = oaf_activate_from_id ((char *) id, 0, NULL, ev);
if (ev->_major != CORBA_NO_EXCEPTION || corba_object == NULL) {
CORBA_exception_free (&static_ev);
return NULL;
}
CORBA_exception_free (&ev);
if (corba_object == CORBA_OBJECT_NIL) {
g_warning ("Could not activate component %s. "
"(Maybe you need to set OAF_INFO_PATH?)", id);
return NULL;
}
CORBA_exception_free (&static_ev);
new = gtk_type_new (evolution_shell_component_client_get_type ());
evolution_shell_component_client_construct (new, id, corba_object);