[epiphany/gnome-3-0] Be smarter about tab grouping
- From: Xan Lopez <xan src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany/gnome-3-0] Be smarter about tab grouping
- Date: Sun, 1 May 2011 23:43:44 +0000 (UTC)
commit 9f84ea77a0f135cb4fac4252b81965485392b895
Author: Xan Lopez <xlopez igalia com>
Date: Sun May 1 00:38:31 2011 -0700
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.
src/ephy-link.c | 4 ++--
src/ephy-link.h | 7 ++++---
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 9881328..46cb9a1 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 5d1a7f8..af293f3 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 a5d7681..da534b5 100644
--- a/src/ephy-window.c
+++ b/src/ephy-window.c
@@ -3488,9 +3488,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))),
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]