diff options
author | Mark McLoughlin <mark@skynet.ie> | 2003-10-17 17:52:06 +0800 |
---|---|---|
committer | Mark McLoughlin <markmc@src.gnome.org> | 2003-10-17 17:52:06 +0800 |
commit | 7d6bee54d28aa5e8d7afb6c54ad4065a274d2f25 (patch) | |
tree | 972086c50e90bc3fd85900f2a38015f27753ecf3 /src/ephy-shell.c | |
parent | 36a5571d794ae7a8f6688bea86796975b4b145a8 (diff) | |
download | gsoc2013-epiphany-7d6bee54d28aa5e8d7afb6c54ad4065a274d2f25.tar gsoc2013-epiphany-7d6bee54d28aa5e8d7afb6c54ad4065a274d2f25.tar.gz gsoc2013-epiphany-7d6bee54d28aa5e8d7afb6c54ad4065a274d2f25.tar.bz2 gsoc2013-epiphany-7d6bee54d28aa5e8d7afb6c54ad4065a274d2f25.tar.lz gsoc2013-epiphany-7d6bee54d28aa5e8d7afb6c54ad4065a274d2f25.tar.xz gsoc2013-epiphany-7d6bee54d28aa5e8d7afb6c54ad4065a274d2f25.tar.zst gsoc2013-epiphany-7d6bee54d28aa5e8d7afb6c54ad4065a274d2f25.zip |
Change the behaviour of --nautilus-view such that the process doesn't exit
2003-10-16 Mark McLoughlin <mark@skynet.ie>
Change the behaviour of --nautilus-view such that the process
doesn't exit until the last control has been destroyed. The
previous behaviour caused intermittent activation failure
when the process timed out and died before the view could be
created - bug #124768.
* src/ephy-main.c:
(ephy_main_start): don't unref the shell when started with
--nautilus-view.
(ephy_main_dummy_url_argument),
(ephy_main_translate_url_arguments): create a dummy argument
when no arguments are supplied which will cause the default
window to be opened.
* src/ephy-shell.c:
(ephy_nautilus_view_all_controls_dead): unref the shell
here causing the process to exit.
(ephy_nautilus_view_init_factory): setup the all_controls_dead
callback.
(ephy_nautilus_view_new): instrument the control.
Diffstat (limited to 'src/ephy-shell.c')
-rw-r--r-- | src/ephy-shell.c | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/src/ephy-shell.c b/src/ephy-shell.c index 17adce496..d6dc7b61a 100644 --- a/src/ephy-shell.c +++ b/src/ephy-shell.c @@ -517,22 +517,44 @@ ephy_shell_new_tab (EphyShell *shell, #ifdef ENABLE_NAUTILUS_VIEW static void +ephy_nautilus_view_all_controls_dead (void) +{ + if (!bonobo_control_life_get_count ()) + { + g_object_unref (G_OBJECT (ephy_shell)); + } +} + +static void ephy_nautilus_view_init_factory (EphyShell *gs) { BonoboGenericFactory *ephy_nautilusview_factory; + ephy_nautilusview_factory = bonobo_generic_factory_new (EPHY_NAUTILUS_VIEW_OAFIID, (BonoboFactoryCallback) ephy_nautilus_view_new, gs); if (!BONOBO_IS_GENERIC_FACTORY (ephy_nautilusview_factory)) + { g_warning ("Couldn't create the factory!"); + return; + } + bonobo_control_life_set_callback (ephy_nautilus_view_all_controls_dead); } static BonoboObject * ephy_nautilus_view_new (BonoboGenericFactory *factory, const char *id, EphyShell *gs) { - return ephy_nautilus_view_new_component (gs); + EphyNautilusView *view; + + view = EPHY_NAUTILUS_VIEW ( + ephy_nautilus_view_new_component (gs)); + + bonobo_control_life_instrument ( + nautilus_view_get_bonobo_control (NAUTILUS_VIEW (view))); + + return BONOBO_OBJECT (view); } #endif |