diff options
author | Marco Pesenti Gritti <marco@gnome.org> | 2003-11-15 01:11:16 +0800 |
---|---|---|
committer | Marco Pesenti Gritti <marco@src.gnome.org> | 2003-11-15 01:11:16 +0800 |
commit | fa2e94db1e8ec3bd0cb8be19b29ece77c66452bf (patch) | |
tree | 3ddbeeaf56fa62e472d4e619b736a2e926cfab89 /src/ephy-nautilus-view.c | |
parent | b086814a1ff6d94b29ae2185aebb22321da7e1a4 (diff) | |
download | gsoc2013-epiphany-fa2e94db1e8ec3bd0cb8be19b29ece77c66452bf.tar gsoc2013-epiphany-fa2e94db1e8ec3bd0cb8be19b29ece77c66452bf.tar.gz gsoc2013-epiphany-fa2e94db1e8ec3bd0cb8be19b29ece77c66452bf.tar.bz2 gsoc2013-epiphany-fa2e94db1e8ec3bd0cb8be19b29ece77c66452bf.tar.lz gsoc2013-epiphany-fa2e94db1e8ec3bd0cb8be19b29ece77c66452bf.tar.xz gsoc2013-epiphany-fa2e94db1e8ec3bd0cb8be19b29ece77c66452bf.tar.zst gsoc2013-epiphany-fa2e94db1e8ec3bd0cb8be19b29ece77c66452bf.zip |
Use an unique factory for both interfaces.
2003-11-14 Marco Pesenti Gritti <marco@gnome.org>
* data/GNOME_Epiphany_Automation.server.in:
* data/GNOME_Epiphany_NautilusView.server.in:
Use an unique factory for both interfaces.
* data/ui/Makefile.am:
Do not try to merge translations in nautilus xml.
* src/ephy-nautilus-view.c: (disconnected_idle),
(control_disconnected_cb), (ephy_nautilus_view_instance_init),
(ephy_nautilus_view_finalize):
Unref the view on control disconnected, not on finalize.
* src/ephy-main.c: (main):
Add a server mode argument, used internally by bonobo interface.
Free popt context only when no more necessary.
* src/ephy-automation.c:
* src/ephy-automation.h:
* src/ephy-shell.c: (ephy_nautilus_view_new),
(ephy_automation_factory_cb), (ephy_automation_factory_new),
(ephy_shell_init), (path_from_command_line_arg), (open_urls),
(server_timeout), (ephy_shell_startup), (ephy_shell_finalize),
(ephy_shell_new_tab):
* src/ephy-shell.h:
When running in server mode unref (and so exit) on a timeout.
Expand args passed to the command line.
Diffstat (limited to 'src/ephy-nautilus-view.c')
-rw-r--r-- | src/ephy-nautilus-view.c | 28 |
1 files changed, 22 insertions, 6 deletions
diff --git a/src/ephy-nautilus-view.c b/src/ephy-nautilus-view.c index e1c799dbd..2d2de8300 100644 --- a/src/ephy-nautilus-view.c +++ b/src/ephy-nautilus-view.c @@ -139,6 +139,20 @@ BonoboUIVerb ephy_verbs [] = { BONOBO_CLASS_BOILERPLATE (EphyNautilusView, ephy_nautilus_view, NautilusView, NAUTILUS_TYPE_VIEW) +static gboolean +disconnected_idle (EphyShell *shell) +{ + g_object_unref (shell); + + return FALSE; +} + +static void +control_disconnected_cb (BonoboControl *control) +{ + g_idle_add ((GSourceFunc)disconnected_idle, ephy_shell); +} + static void ephy_nautilus_view_instance_init (EphyNautilusView *view) { @@ -148,6 +162,7 @@ ephy_nautilus_view_instance_init (EphyNautilusView *view) float *levels; gchar **names; guint i; + BonoboControl *control; single = ephy_embed_shell_get_embed_single (EPHY_EMBED_SHELL (ephy_shell)); @@ -155,15 +170,13 @@ ephy_nautilus_view_instance_init (EphyNautilusView *view) view->priv = p; view->priv->embed = ephy_embed_new (G_OBJECT (single)); - g_object_ref (G_OBJECT (ephy_shell)); - g_signal_connect (view->priv->embed, "ge_link_message", G_CALLBACK (gnv_embed_link_message_cb), view); g_signal_connect (view->priv->embed, "ge_location", G_CALLBACK (gnv_embed_location_cb), view); - g_signal_connect (view->priv->embed, "ge_title", + g_signal_connect (view->priv->embed, "title", G_CALLBACK (gnv_embed_title_cb), view); g_signal_connect (view->priv->embed, "ge_new_window", @@ -190,7 +203,12 @@ ephy_nautilus_view_instance_init (EphyNautilusView *view) g_signal_connect (G_OBJECT (view), "stop_loading", G_CALLBACK (gnv_stop_loading_cb), NULL); - g_signal_connect (G_OBJECT (nautilus_view_get_bonobo_control (NAUTILUS_VIEW (view))), + control = nautilus_view_get_bonobo_control (NAUTILUS_VIEW (view)); + g_object_ref (ephy_shell); + + g_signal_connect (control, "disconnected", + G_CALLBACK (control_disconnected_cb), NULL); + g_signal_connect (control, "activate", G_CALLBACK (gnv_bonobo_control_activate_cb), view); @@ -276,8 +294,6 @@ ephy_nautilus_view_finalize (GObject *object) g_free (p->location); GNOME_CALL_PARENT (G_OBJECT_CLASS, finalize, (object)); - - g_object_unref (G_OBJECT (ephy_shell)); } static void |