Tor,

 Please commit the patch to HEAD as well as the stable branch. The
change looks fine to me. I will also get the  unregister action tested
in the regular builds on the branches and perhaps in MacOS (I do not
know if it matters, but anyway!) as a routine but I do not expect any
surprises.


Thanks,
Harish



On Sat, 2006-06-17 at 02:23 +0300, Tor Lillqvist wrote:
> lö 2006-06-17 klockan 01:40 +0300 skrev Tor Lillqvist:
> 
> > If my analysis is correct, this means that attempting to do a CORBA
> > object unregistration in the GObject finalize method is too late, isn't
> > it?
> 
> I tested by applying this simple patch to e-shell.c, moving the
> bonobo_activation_active_server_unregister() call from impl_finalize()
> to notify_no_windows_left_idle_cb():
> 
> Index: shell/e-shell.c
> ===================================================================
> RCS file: /cvs/gnome/evolution/shell/e-shell.c,v
> retrieving revision 1.272
> diff -p -u -r1.272 e-shell.c
> --- shell/e-shell.c   30 Jan 2006 11:49:53 -0000      1.272
> +++ shell/e-shell.c   16 Jun 2006 23:17:50 -0000
> @@ -360,13 +360,18 @@ static gboolean
>  notify_no_windows_left_idle_cb (void *data)
>  {
>       EShell *shell;
> +     EShellPrivate *priv;
>  
>       shell = E_SHELL (data);
> +     priv = shell->priv;
>  
>       set_interactive (shell, FALSE);
>  
>       g_signal_emit (shell, signals [NO_WINDOWS_LEFT], 0);
>  
> +     if (priv->iid != NULL)
> +             bonobo_activation_active_server_unregister (priv->iid,
> +                                                         
> bonobo_object_corba_objref (BONOBO_OBJECT (shell)));
>       bonobo_object_unref (BONOBO_OBJECT (shell));
>  
>       return FALSE;
> @@ -467,10 +472,6 @@ impl_finalize (GObject *object)
>  
>       shell = E_SHELL (object);
>       priv = shell->priv;
> -
> -     if (priv->iid != NULL)
> -             bonobo_activation_active_server_unregister (priv->iid,
> -                                                         
> bonobo_object_corba_objref (BONOBO_OBJECT (shell)));
>  
>       e_free_string_list (priv->crash_type_names);
>  
> And lo and behold, it works! Now the ESHell gets unregistered, and when
> starting Evolution again it manages to register its EShell and contact
> the already running e-d-s etc.
> 
> OK to apply this patch to HEAD and stable? ChangeLog entry:
> 
> 2006-06-17  Tor Lillqvist  <[EMAIL PROTECTED]>
> 
>       * e-shell.c (impl_finalize): Don't call
>       bonobo_activation_active_server_unregister() here, it's too late,
>       the EShell Bonobo object has already been deactivated and its
>       associated CORBA object is NULL.
>       (notify_no_windows_left_idle_cb): Instead, call
>       bonobo_activation_active_server_unregister() here, when the EShell
>       Bonobo object is still fully active.
> 
> 
> I should still of course also investigate why the other (unknown)
> mechanism which causes unregistration to happen anyway on Unix doesn't
> work on Windows...
> 
> --tml
> 
> 
> _______________________________________________
> Evolution-hackers mailing list
> Evolution-hackers@gnome.org
> http://mail.gnome.org/mailman/listinfo/evolution-hackers

_______________________________________________
Evolution-hackers mailing list
Evolution-hackers@gnome.org
http://mail.gnome.org/mailman/listinfo/evolution-hackers

Reply via email to