This makes pinging of the shell from the components work again. (We ought to be using the new ORBit hooks to detect object death, and that's the reason why this code was disabled in the first place, but this will do for now.) -- Ettore
Index: ChangeLog =================================================================== RCS file: /cvs/gnome/evolution/shell/ChangeLog,v retrieving revision 1.1236 diff -u -p -r1.1236 ChangeLog --- ChangeLog 9 Apr 2003 18:02:18 -0000 1.1236 +++ ChangeLog 14 Apr 2003 19:35:38 -0000 @@ -1,3 +1,11 @@ +2003-04-14 Ettore Perazzoli <ettore ximian com> + + * evolution-shell-component.c (owner_ping_callback): Enable this + again. + (setup_owner_pinging): Same. + (impl_setOwner): Check if the shell is in-process and, if so, call + setup_owner_pinging(). + 2003-04-09 Dan Winship <danw ximian com> * e-folder-list.c: Update for e_option_menu prototype Index: evolution-shell-component.c =================================================================== RCS file: /cvs/gnome/evolution/shell/evolution-shell-component.c,v retrieving revision 1.85 diff -u -p -r1.85 evolution-shell-component.c --- evolution-shell-component.c 7 Apr 2003 01:44:02 -0000 1.85 +++ evolution-shell-component.c 14 Apr 2003 19:35:38 -0000 @@ -204,7 +204,6 @@ fill_corba_sequence_from_null_terminated /* Owner pinging. */ -#if 0 static gboolean owner_ping_callback (void *data) { @@ -267,8 +266,6 @@ setup_owner_pinging (EvolutionShellCompo priv->ping_timeout_id = g_timeout_add (PING_DELAY, owner_ping_callback, shell_component); } -#endif - /* CORBA interface implementation. */ @@ -405,12 +402,10 @@ impl_setOwner (PortableServer_Servant se const CORBA_char *evolution_homedir, CORBA_Environment *ev) { - BonoboObject *bonobo_object; EvolutionShellComponent *shell_component; EvolutionShellComponentPrivate *priv; - bonobo_object = bonobo_object_from_servant (servant); - shell_component = EVOLUTION_SHELL_COMPONENT (bonobo_object); + shell_component = EVOLUTION_SHELL_COMPONENT (bonobo_object_from_servant (servant)); priv = shell_component->priv; if (priv->owner_client != NULL) { @@ -435,15 +430,16 @@ impl_setOwner (PortableServer_Servant se } if (ev->_major == CORBA_NO_EXCEPTION) { + BonoboObject *local_object; + priv->owner_client = evolution_shell_client_new (shell); g_signal_emit (shell_component, signals[OWNER_SET], 0, priv->owner_client, evolution_homedir); -#if 0 - /* Disable this for now, it seems to cause trouble for local - components. We should be checking wether the component is - local, and disable the pinging in that case. */ - setup_owner_pinging (shell_component); -#endif + /* Set up pinging of the shell (to realize if it's gone unexpectedly) when in the + non-local case. */ + local_object = bonobo_object (ORBit_small_get_servant (shell)); + if (local_object == NULL) + setup_owner_pinging (shell_component); } }
Attachment:
signature.asc
Description: This is a digitally signed message part