diff options
author | Christian Persch <chpe@cvs.gnome.org> | 2003-12-20 20:02:36 +0800 |
---|---|---|
committer | Christian Persch <chpe@src.gnome.org> | 2003-12-20 20:02:36 +0800 |
commit | bca887232147dbba6505adc69ed22ae4f34f1dde (patch) | |
tree | 1d7de538967df1e8fd58a4a3ad2c806adcf3eff5 | |
parent | 23229ed3ac442896841c5c694f2db0448955c241 (diff) | |
download | gsoc2013-epiphany-bca887232147dbba6505adc69ed22ae4f34f1dde.tar gsoc2013-epiphany-bca887232147dbba6505adc69ed22ae4f34f1dde.tar.gz gsoc2013-epiphany-bca887232147dbba6505adc69ed22ae4f34f1dde.tar.bz2 gsoc2013-epiphany-bca887232147dbba6505adc69ed22ae4f34f1dde.tar.lz gsoc2013-epiphany-bca887232147dbba6505adc69ed22ae4f34f1dde.tar.xz gsoc2013-epiphany-bca887232147dbba6505adc69ed22ae4f34f1dde.tar.zst gsoc2013-epiphany-bca887232147dbba6505adc69ed22ae4f34f1dde.zip |
Back out checkin from bug #124768, which was causing bug #128849.
2003-12-20 Christian Persch <chpe@cvs.gnome.org>
* src/ephy-main.c: (ephy_main_start),
(ephy_main_translate_url_arguments):
* src/ephy-shell.c: (ephy_nautilus_view_init_factory),
(ephy_nautilus_view_new):
Back out checkin from bug #124768, which was causing bug #128849.
-rw-r--r-- | ChangeLog | 9 | ||||
-rw-r--r-- | src/ephy-main.c | 40 | ||||
-rw-r--r-- | src/ephy-shell.c | 24 |
3 files changed, 30 insertions, 43 deletions
@@ -1,3 +1,12 @@ +2003-12-20 Christian Persch <chpe@cvs.gnome.org> + + * src/ephy-main.c: (ephy_main_start), + (ephy_main_translate_url_arguments): + * src/ephy-shell.c: (ephy_nautilus_view_init_factory), + (ephy_nautilus_view_new): + + Back out checkin from bug #124768, which was causing bug #128849. + 2003-12-18 Christian Persch <chpe@cvs.gnome.org> * embed/ephy-favicon-cache.c: (icons_added_cb), (icons_removed_cb), diff --git a/src/ephy-main.c b/src/ephy-main.c index c514532e3..3f2864839 100644 --- a/src/ephy-main.c +++ b/src/ephy-main.c @@ -238,7 +238,20 @@ ephy_main_start (gpointer data) (gaserver, quit_option, &corba_env); } /* provided with urls? */ - else if (!open_as_nautilus_view) + else if (n_urls == 0 && + !open_as_nautilus_view) + { + /* no, open a default window */ + GNOME_EphyAutomation_loadurl + (gaserver, "", + open_fullscreen, + open_in_existing, + open_in_new_window, + open_in_new_tab, + !noraise, + &corba_env); + } + else { /* open all of the urls */ for (i = 0; i < n_urls; i++) @@ -254,11 +267,8 @@ ephy_main_start (gpointer data) } } - /* Unref so it will exit if no more used - * If started with --nautilus-view, only exit when the - * last view has been destroyed. - */ - if (first_instance && !open_as_nautilus_view) + /* Unref so it will exit if no more used */ + if (first_instance) { g_object_unref (G_OBJECT(ephy_shell)); } @@ -297,18 +307,6 @@ ephy_main_automation_init (void) } } -/* dummy argument to open a default window */ -static gint -ephy_main_dummy_url_argument (gchar ***urls) -{ - *urls = g_new0 (gchar *, 2); - - (*urls)[0] = g_strdup (""); - (*urls)[1] = NULL; - - return 1; -} - /** * translate_url_arguments: gather URL arguments and expand them fully * with realpath if they're filenames @@ -323,7 +321,8 @@ ephy_main_translate_url_arguments (poptContext context, gchar ***urls) /* any context remaining? */ if (context == NULL) { - return ephy_main_dummy_url_argument (urls); + *urls = NULL; + return 0; } /* get the args and check */ @@ -331,7 +330,8 @@ ephy_main_translate_url_arguments (poptContext context, gchar ***urls) if (args == NULL) { poptFreeContext (context); - return ephy_main_dummy_url_argument (urls); + *urls = NULL; + return 0; } /* count args */ diff --git a/src/ephy-shell.c b/src/ephy-shell.c index b2acb09aa..3c3492948 100644 --- a/src/ephy-shell.c +++ b/src/ephy-shell.c @@ -491,44 +491,22 @@ 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) { - 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); + return ephy_nautilus_view_new_component (gs); } #endif |