aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorChristian Persch <chpe@cvs.gnome.org>2003-08-06 06:55:13 +0800
committerChristian Persch <chpe@src.gnome.org>2003-08-06 06:55:13 +0800
commit732bcf4bf907ae01ecb2c041d13d3ba0ec4b07bc (patch)
tree359fbbf78110e295090f0479e2036d9a98993df3 /src
parent0f6260cce67b1642d2e56f7f1a9e53e6cb8ae9dd (diff)
downloadgsoc2013-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.
Diffstat (limited to 'src')
-rw-r--r--src/ephy-shell.c15
-rw-r--r--src/window-commands.c9
2 files changed, 18 insertions, 6 deletions
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);
}