aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
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);
}