[epiphany] Be smarter about tab grouping
- From: Xan Lopez <xan src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany] Be smarter about tab grouping
- Date: Sun, 1 May 2011 07:40:09 +0000 (UTC)
commit ea43a991f445a7fc91d06df2633ef4f9920ffc60
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 b4e2a28..d0d4135 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))),
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]