aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorXan Lopez <xan@igalia.com>2011-12-15 06:11:23 +0800
committerXan Lopez <xan@igalia.com>2011-12-15 06:11:23 +0800
commit6cda3809f6fdfb4bb6044543a221eb0c98d187f2 (patch)
tree00dff6574e31d69aed8f72524d9c3f8296544103 /src
parent87e1c9f28e0ce26b2cf04772bdcba94239fac96e (diff)
downloadgsoc2013-epiphany-6cda3809f6fdfb4bb6044543a221eb0c98d187f2.tar
gsoc2013-epiphany-6cda3809f6fdfb4bb6044543a221eb0c98d187f2.tar.gz
gsoc2013-epiphany-6cda3809f6fdfb4bb6044543a221eb0c98d187f2.tar.bz2
gsoc2013-epiphany-6cda3809f6fdfb4bb6044543a221eb0c98d187f2.tar.lz
gsoc2013-epiphany-6cda3809f6fdfb4bb6044543a221eb0c98d187f2.tar.xz
gsoc2013-epiphany-6cda3809f6fdfb4bb6044543a221eb0c98d187f2.tar.zst
gsoc2013-epiphany-6cda3809f6fdfb4bb6044543a221eb0c98d187f2.zip
ephy-shell: correct bogus logic in warning message
We were warning in way too many more cases than intended.
Diffstat (limited to 'src')
-rw-r--r--src/ephy-shell.c16
1 files changed, 9 insertions, 7 deletions
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 */