diff options
author | Xan Lopez <xlopez@igalia.com> | 2011-05-01 15:38:31 +0800 |
---|---|---|
committer | Xan Lopez <xlopez@igalia.com> | 2011-05-01 15:38:31 +0800 |
commit | ea43a991f445a7fc91d06df2633ef4f9920ffc60 (patch) | |
tree | 228bf95ec839c0a421f3471bf13f2207c46a9b1e | |
parent | 87e2892e39713d4e2baa955d1c2b36cb194db8e4 (diff) | |
download | gsoc2013-epiphany-ea43a991f445a7fc91d06df2633ef4f9920ffc60.tar gsoc2013-epiphany-ea43a991f445a7fc91d06df2633ef4f9920ffc60.tar.gz gsoc2013-epiphany-ea43a991f445a7fc91d06df2633ef4f9920ffc60.tar.bz2 gsoc2013-epiphany-ea43a991f445a7fc91d06df2633ef4f9920ffc60.tar.lz gsoc2013-epiphany-ea43a991f445a7fc91d06df2633ef4f9920ffc60.tar.xz gsoc2013-epiphany-ea43a991f445a7fc91d06df2633ef4f9920ffc60.tar.zst gsoc2013-epiphany-ea43a991f445a7fc91d06df2633ef4f9920ffc60.zip |
Be smarter about tab grouping
The previous patch was simply grouping new tabs in the current window
always, which is too much. For instance, we don't want to group
Ctrl+T.
-rw-r--r-- | src/ephy-link.c | 4 | ||||
-rw-r--r-- | src/ephy-link.h | 7 | ||||
-rw-r--r-- | src/ephy-window.c | 5 |
3 files changed, 10 insertions, 6 deletions
diff --git a/src/ephy-link.c b/src/ephy-link.c index 988132826..46cb9a19d 100644 --- a/src/ephy-link.c +++ b/src/ephy-link.c @@ -139,7 +139,7 @@ ephy_link_flags_from_current_event (void) } else if (state == 0 || state == GDK_CONTROL_MASK) { - flags = EPHY_LINK_NEW_TAB; + flags = EPHY_LINK_NEW_TAB | EPHY_LINK_NEW_TAB_APPEND_AFTER; } } else @@ -150,7 +150,7 @@ ephy_link_flags_from_current_event (void) } else if (state == GDK_CONTROL_MASK) { - flags = EPHY_LINK_NEW_TAB; + flags = EPHY_LINK_NEW_TAB | EPHY_LINK_NEW_TAB_APPEND_AFTER; } } diff --git a/src/ephy-link.h b/src/ephy-link.h index 5d1a7f8c8..af293f379 100644 --- a/src/ephy-link.h +++ b/src/ephy-link.h @@ -43,9 +43,10 @@ typedef struct _EphyLinkIface EphyLinkIface; typedef enum { - EPHY_LINK_NEW_WINDOW = 1 << 0, - EPHY_LINK_NEW_TAB = 1 << 1, - EPHY_LINK_JUMP_TO = 1 << 2, + EPHY_LINK_NEW_WINDOW = 1 << 0, + EPHY_LINK_NEW_TAB = 1 << 1, + EPHY_LINK_JUMP_TO = 1 << 2, + EPHY_LINK_NEW_TAB_APPEND_AFTER = 1 << 3 } EphyLinkFlags; struct _EphyLinkIface diff --git a/src/ephy-window.c b/src/ephy-window.c index b4e2a28a1..d0d41351b 100644 --- a/src/ephy-window.c +++ b/src/ephy-window.c @@ -3504,9 +3504,12 @@ ephy_window_open_link (EphyLink *link, } else { - ntflags |= EPHY_NEW_TAB_IN_EXISTING_WINDOW | EPHY_NEW_TAB_APPEND_AFTER; + ntflags |= EPHY_NEW_TAB_IN_EXISTING_WINDOW; } + if (flags & EPHY_LINK_NEW_TAB_APPEND_AFTER) + ntflags |= EPHY_NEW_TAB_APPEND_AFTER; + new_embed = ephy_shell_new_tab (ephy_shell, EPHY_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (embed))), |