[epiphany] ephy-session: respect 'new-windows-in-tabs' setting when opening links
- From: Xan Lopez <xan src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany] ephy-session: respect 'new-windows-in-tabs' setting when opening links
- Date: Wed, 12 Sep 2012 15:40:12 +0000 (UTC)
commit 94a4eb78395ca79af3a1024d6c82d00c8ecb1b09
Author: Xan Lopez <xan igalia com>
Date: Wed Sep 12 17:13:43 2012 +0200
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
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 eea2e13..74b2570 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;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]