[epiphany] Allow not copying history when creating a new embed



commit be3c8f50cefef8ea3f34854c0254b3bdaa851958
Author: Mario Sanchez Prada <msanchez igalia com>
Date:   Tue Apr 20 22:15:25 2010 +0200

    Allow not copying history when creating a new embed
    
    Just added a new flag and check it before copying the history
    
    Bug #611400
    
    Signed-off-by: Xan Lopez <xan gnome org>

 src/ephy-shell.c |    8 +++++---
 src/ephy-shell.h |    1 +
 2 files changed, 6 insertions(+), 3 deletions(-)
---
diff --git a/src/ephy-shell.c b/src/ephy-shell.c
index e276731..fc4caf9 100644
--- a/src/ephy-shell.c
+++ b/src/ephy-shell.c
@@ -435,6 +435,7 @@ ephy_shell_new_tab_full (EphyShell *shell,
 	gboolean open_page = FALSE;
 	gboolean jump_to;
 	gboolean active_is_blank = FALSE;
+	gboolean copy_history = TRUE;
 	GtkWidget *nb;
 	int position = -1;
 	gboolean is_empty = FALSE;
@@ -443,6 +444,7 @@ ephy_shell_new_tab_full (EphyShell *shell,
 	if (flags & EPHY_NEW_TAB_OPEN_PAGE) open_page = TRUE;
 	if (flags & EPHY_NEW_TAB_IN_NEW_WINDOW) in_new_window = TRUE;
 	if (flags & EPHY_NEW_TAB_IN_EXISTING_WINDOW) in_new_window = FALSE;
+	if (flags & EPHY_NEW_TAB_DONT_COPY_HISTORY) copy_history = FALSE;
 
 	in_new_window = in_new_window && !eel_gconf_get_boolean (CONF_LOCKDOWN_FULLSCREEN);
 	g_return_val_if_fail (open_page == (gboolean)(request != NULL), NULL);
@@ -493,11 +495,11 @@ ephy_shell_new_tab_full (EphyShell *shell,
 		ephy_embed_container_add_child (EPHY_EMBED_CONTAINER (window), embed, position, jump_to);
 	}
 
-	if (previous_embed != NULL)
-	{	
+	if (copy_history && previous_embed != NULL)
+	{
 		ephy_web_view_copy_back_history (ephy_embed_get_web_view (previous_embed),
 						 ephy_embed_get_web_view (embed));
-	}		
+	}
 
 	ephy_gui_window_update_user_time (GTK_WIDGET (window), user_time);
 
diff --git a/src/ephy-shell.h b/src/ephy-shell.h
index c87a43b..895c91d 100644
--- a/src/ephy-shell.h
+++ b/src/ephy-shell.h
@@ -69,6 +69,7 @@ typedef enum
 
 	/* The way to load */
 	EPHY_NEW_TAB_FROM_EXTERNAL      = 1 << 12,
+	EPHY_NEW_TAB_DONT_COPY_HISTORY  = 1 << 13,
 	
 } EphyNewTabFlags;
 



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