diff options
author | Christian Persch <chpe@cvs.gnome.org> | 2003-08-06 06:55:13 +0800 |
---|---|---|
committer | Christian Persch <chpe@src.gnome.org> | 2003-08-06 06:55:13 +0800 |
commit | 732bcf4bf907ae01ecb2c041d13d3ba0ec4b07bc (patch) | |
tree | 359fbbf78110e295090f0479e2036d9a98993df3 | |
parent | 0f6260cce67b1642d2e56f7f1a9e53e6cb8ae9dd (diff) | |
download | gsoc2013-epiphany-732bcf4bf907ae01ecb2c041d13d3ba0ec4b07bc.tar gsoc2013-epiphany-732bcf4bf907ae01ecb2c041d13d3ba0ec4b07bc.tar.gz gsoc2013-epiphany-732bcf4bf907ae01ecb2c041d13d3ba0ec4b07bc.tar.bz2 gsoc2013-epiphany-732bcf4bf907ae01ecb2c041d13d3ba0ec4b07bc.tar.lz gsoc2013-epiphany-732bcf4bf907ae01ecb2c041d13d3ba0ec4b07bc.tar.xz gsoc2013-epiphany-732bcf4bf907ae01ecb2c041d13d3ba0ec4b07bc.tar.zst gsoc2013-epiphany-732bcf4bf907ae01ecb2c041d13d3ba0ec4b07bc.zip |
Fix blank page loading.
2003-08-06 Christian Persch <chpe@cvs.gnome.org>
* src/ephy-shell.c: (load_homepage):
* src/window-commands.c: (window_cmd_go_home):
Fix blank page loading.
* src/ephy-shell.c: (ephy_shell_new_tab):
Fix new tab positioning.
-rw-r--r-- | ChangeLog | 15 | ||||
-rw-r--r-- | src/ephy-shell.c | 15 | ||||
-rw-r--r-- | src/window-commands.c | 9 |
3 files changed, 31 insertions, 8 deletions
@@ -1,3 +1,14 @@ +2003-08-06 Christian Persch <chpe@cvs.gnome.org> + + * src/ephy-shell.c: (load_homepage): + * src/window-commands.c: (window_cmd_go_home): + + Fix blank page loading. + + * src/ephy-shell.c: (ephy_shell_new_tab): + + Fix new tab positioning. + 2003-08-05 Marco Pesenti Gritti <marco@it.gnome.org> * src/ephy-window.c: (show_embed_popup): @@ -5,14 +16,14 @@ Disable clipboard context menu. No way to make it work correctly for 1.0. -2003-08-04 Christian Persch <chpe@cvs.gnome.org> +2003-08-05 Christian Persch <chpe@cvs.gnome.org> * lib/egg/egg-toolbars-model.c: (egg_toolbars_model_to_xml): * lib/egg/eggtoolbar.c: (egg_toolbar_finalize): Fix mem leaks. -2003-08-04 Christian Persch <chpe@cvs.gnome.org> +2003-08-05 Christian Persch <chpe@cvs.gnome.org> * lib/widgets/ephy-arrow-toolbutton.c: diff --git a/src/ephy-shell.c b/src/ephy-shell.c index 276517c59..b97756da9 100644 --- a/src/ephy-shell.c +++ b/src/ephy-shell.c @@ -14,6 +14,8 @@ * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + * $Id$ */ #ifdef HAVE_CONFIG_H @@ -340,8 +342,10 @@ load_homepage (EphyEmbed *embed) home = eel_gconf_get_string(CONF_GENERAL_HOMEPAGE); - if (home == NULL) + if (home == NULL || home[0] == '\0') { + g_free (home); + home = g_strdup ("about:blank"); } @@ -432,15 +436,16 @@ ephy_shell_new_tab (EphyShell *shell, flags & EPHY_NEW_TAB_APPEND_GROUPED || flags & EPHY_NEW_TAB_CLONE_PAGE); - if (flags & EPHY_NEW_TAB_APPEND_AFTER) + if ((flags & EPHY_NEW_TAB_APPEND_AFTER) && previous_embed != NULL) { - g_assert (previous_embed != NULL); nb = ephy_window_get_notebook (window); position = gtk_notebook_page_num (GTK_NOTEBOOK (nb), GTK_WIDGET (previous_embed)) + 1; } - - position = grouped ? EPHY_NOTEBOOK_INSERT_GROUPED : EPHY_NOTEBOOK_INSERT_LAST; + else + { + position = grouped ? EPHY_NOTEBOOK_INSERT_GROUPED : EPHY_NOTEBOOK_INSERT_LAST; + } tab = ephy_tab_new (); embed = ephy_tab_get_embed (tab); diff --git a/src/window-commands.c b/src/window-commands.c index b53ebc709..ca2ef3b00 100644 --- a/src/window-commands.c +++ b/src/window-commands.c @@ -157,7 +157,14 @@ window_cmd_go_home (EggAction *action, location = eel_gconf_get_string (CONF_GENERAL_HOMEPAGE); - ephy_window_load_url (window, location ? location : "about:blank"); + if (location == NULL || location[0] == '\0') + { + g_free (location); + + location = g_strdup ("about:blank"); + } + + ephy_window_load_url (window, location); g_free (location); } |