aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorXan Lopez <xan@src.gnome.org>2009-02-16 06:20:52 +0800
committerXan Lopez <xan@src.gnome.org>2009-02-16 06:20:52 +0800
commit60293e52bf139ae8b7e667efb3ee6b8576298a12 (patch)
tree4446c91791255d29323e5c20dbcc312fb606b3fa /src
parent84b808dedd7821373c05bd43b8562670fbc620f4 (diff)
downloadgsoc2013-epiphany-60293e52bf139ae8b7e667efb3ee6b8576298a12.tar
gsoc2013-epiphany-60293e52bf139ae8b7e667efb3ee6b8576298a12.tar.gz
gsoc2013-epiphany-60293e52bf139ae8b7e667efb3ee6b8576298a12.tar.bz2
gsoc2013-epiphany-60293e52bf139ae8b7e667efb3ee6b8576298a12.tar.lz
gsoc2013-epiphany-60293e52bf139ae8b7e667efb3ee6b8576298a12.tar.xz
gsoc2013-epiphany-60293e52bf139ae8b7e667efb3ee6b8576298a12.tar.zst
gsoc2013-epiphany-60293e52bf139ae8b7e667efb3ee6b8576298a12.zip
Add option to open new windows in tabs.
Only available as a gconf key for now, /apps/epiphany/general/open_new_windows_in_tab. Patch by Alejandro G. Castro. Bug #571593 svn path=/trunk/; revision=8783
Diffstat (limited to 'src')
-rw-r--r--src/ephy-window.c22
1 files changed, 19 insertions, 3 deletions
diff --git a/src/ephy-window.c b/src/ephy-window.c
index dacaee3e0..f826ba74f 100644
--- a/src/ephy-window.c
+++ b/src/ephy-window.c
@@ -2496,11 +2496,27 @@ create_web_view_cb (WebKitWebView *web_view,
{
EphyEmbed *embed;
WebKitWebView *new_web_view;
+ EphyNewTabFlags flags;
+ EphyWindow *parent_window;
+
+ if (eel_gconf_get_boolean (CONF_INTERFACE_OPEN_NEW_WINDOWS_IN_TAB))
+ {
+ parent_window = window;
+ flags = EPHY_NEW_TAB_IN_EXISTING_WINDOW |
+ EPHY_NEW_TAB_JUMP;
+
+ }
+ else
+ {
+ parent_window = NULL;
+ flags = EPHY_NEW_TAB_IN_NEW_WINDOW |
+ EPHY_NEW_TAB_DONT_SHOW_WINDOW;
+ }
embed = ephy_shell_new_tab_full (ephy_shell_get_default (),
- NULL, NULL, NULL,
- EPHY_NEW_TAB_IN_NEW_WINDOW |
- EPHY_NEW_TAB_DONT_SHOW_WINDOW,
+ parent_window,
+ NULL, NULL,
+ flags,
EPHY_EMBED_CHROME_ALL,
FALSE,
0);