diff options
author | Xan Lopez <xan@igalia.com> | 2012-09-12 23:13:43 +0800 |
---|---|---|
committer | Xan Lopez <xan@igalia.com> | 2012-09-12 23:13:43 +0800 |
commit | 94a4eb78395ca79af3a1024d6c82d00c8ecb1b09 (patch) | |
tree | 7465124bee24a9e3b5892e558814f138cd11b03f /src | |
parent | c193a5df3dc970de22c8b0eb773e41a9dc98d877 (diff) | |
download | gsoc2013-epiphany-94a4eb78395ca79af3a1024d6c82d00c8ecb1b09.tar.gz gsoc2013-epiphany-94a4eb78395ca79af3a1024d6c82d00c8ecb1b09.tar.zst gsoc2013-epiphany-94a4eb78395ca79af3a1024d6c82d00c8ecb1b09.zip |
ephy-session: respect 'new-windows-in-tabs' setting when opening links
Right now invoking 'epiphany <URI>' when there's already a browser
instance running would always open a new window, unless a new tab was
explictly requested with -n/--new-tab. We should honor the
'new-windows-in-tabs' setting (which is TRUE by default), and open the
link in a new tab in the last active window if no special conditions
were specified.
https://bugzilla.gnome.org/show_bug.cgi?id=641949
Diffstat (limited to 'src')
-rw-r--r-- | src/ephy-session.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/ephy-session.c b/src/ephy-session.c index eea2e13e5..74b2570f8 100644 --- a/src/ephy-session.c +++ b/src/ephy-session.c @@ -311,6 +311,7 @@ session_command_open_uris (EphySession *session, EphySessionPrivate *priv; EphyNewTabFlags flags = 0; guint i; + gboolean new_windows_in_tabs; priv = session->priv; @@ -320,6 +321,9 @@ session_command_open_uris (EphySession *session, window = ephy_session_get_active_window (session); + new_windows_in_tabs = g_settings_get_boolean (EPHY_SETTINGS_MAIN, + EPHY_PREFS_NEW_WINDOWS_IN_TABS); + if (options != NULL && strstr (options, "external") != NULL) { flags |= EPHY_NEW_TAB_FROM_EXTERNAL; @@ -329,7 +333,8 @@ session_command_open_uris (EphySession *session, window = NULL; flags |= EPHY_NEW_TAB_IN_NEW_WINDOW; } - else if (options != NULL && strstr (options, "new-tab") != NULL) + else if ((options != NULL && strstr (options, "new-tab") != NULL) || + new_windows_in_tabs) { flags |= EPHY_NEW_TAB_IN_EXISTING_WINDOW | EPHY_NEW_TAB_JUMP; |