[epiphany] ephy-shell: correct bogus logic in warning message



commit 6cda3809f6fdfb4bb6044543a221eb0c98d187f2
Author: Xan Lopez <xan igalia com>
Date:   Wed Dec 14 23:11:23 2011 +0100

    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 files changed, 9 insertions(+), 7 deletions(-)
---
diff --git a/src/ephy-shell.c b/src/ephy-shell.c
index c5c71ab..c9eee94 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 */



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]