From 6cda3809f6fdfb4bb6044543a221eb0c98d187f2 Mon Sep 17 00:00:00 2001 From: Xan Lopez Date: Wed, 14 Dec 2011 23:11:23 +0100 Subject: ephy-shell: correct bogus logic in warning message We were warning in way too many more cases than intended. --- src/ephy-shell.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'src/ephy-shell.c') diff --git a/src/ephy-shell.c b/src/ephy-shell.c index c5c71abac..c9eee946b 100644 --- a/src/ephy-shell.c +++ b/src/ephy-shell.c @@ -636,13 +636,15 @@ ephy_shell_new_tab_full (EphyShell *shell, window = ephy_window_new_with_chrome (chrome, is_popup); } - if ((flags & EPHY_NEW_TAB_APPEND_AFTER) && previous_embed != NULL) { - nb = ephy_window_get_notebook (window); - /* FIXME this assumes the tab is the direct notebook child */ - position = gtk_notebook_page_num (GTK_NOTEBOOK (nb), - GTK_WIDGET (previous_embed)) + 1; - } else - g_warning ("Requested to append new tab after parent, but 'previous_embed' was NULL"); + if (flags & EPHY_NEW_TAB_APPEND_AFTER) { + if (previous_embed) { + nb = ephy_window_get_notebook (window); + /* FIXME this assumes the tab is the direct notebook child */ + position = gtk_notebook_page_num (GTK_NOTEBOOK (nb), + GTK_WIDGET (previous_embed)) + 1; + } else + g_warning ("Requested to append new tab after parent, but 'previous_embed' was NULL"); + } if (flags & EPHY_NEW_TAB_FROM_EXTERNAL) { /* If the active embed is blank, us e that to open the url and jump to it */ -- cgit v1.2.3