[epiphany] Annotate correctly the fact that FileNewTab now always opens the homepage
- From: Xan Lopez <xan src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany] Annotate correctly the fact that FileNewTab now always opens the homepage
- Date: Wed, 7 Mar 2012 18:57:34 +0000 (UTC)
commit c58efa251b4a978f9621b8ebcd4de4e4f4f695d2
Author: Xan Lopez <xan igalia com>
Date: Wed Mar 7 19:53:57 2012 +0100
Annotate correctly the fact that FileNewTab now always opens the homepage
We need to detect it in EphyEmbed to avoid adding about:blank to the
history in that case.
src/ephy-home-action.c | 2 +-
src/ephy-link.h | 3 ++-
src/ephy-window.c | 6 +++++-
3 files changed, 8 insertions(+), 3 deletions(-)
---
diff --git a/src/ephy-home-action.c b/src/ephy-home-action.c
index 518e87e..dc1bfd0 100644
--- a/src/ephy-home-action.c
+++ b/src/ephy-home-action.c
@@ -106,7 +106,7 @@ action_name_association (GtkAction *action,
{
ephy_home_action_open (action,
address,
- EPHY_LINK_NEW_TAB | EPHY_LINK_JUMP_TO);
+ EPHY_LINK_JUMP_TO | EPHY_LINK_HOME_PAGE);
}
}
diff --git a/src/ephy-link.h b/src/ephy-link.h
index af293f3..65bad41 100644
--- a/src/ephy-link.h
+++ b/src/ephy-link.h
@@ -46,7 +46,8 @@ typedef enum
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
+ EPHY_LINK_NEW_TAB_APPEND_AFTER = 1 << 3,
+ EPHY_LINK_HOME_PAGE = 1 << 4
} EphyLinkFlags;
struct _EphyLinkIface
diff --git a/src/ephy-window.c b/src/ephy-window.c
index b1fdfb7..d3cbfeb 100644
--- a/src/ephy-window.c
+++ b/src/ephy-window.c
@@ -546,7 +546,8 @@ ephy_window_open_link (EphyLink *link,
if (flags & (EPHY_LINK_JUMP_TO |
EPHY_LINK_NEW_TAB |
- EPHY_LINK_NEW_WINDOW))
+ EPHY_LINK_NEW_WINDOW |
+ EPHY_LINK_HOME_PAGE))
{
EphyNewTabFlags ntflags = EPHY_NEW_TAB_OPEN_PAGE;
@@ -567,6 +568,9 @@ ephy_window_open_link (EphyLink *link,
if (flags & EPHY_LINK_NEW_TAB_APPEND_AFTER)
ntflags |= EPHY_NEW_TAB_APPEND_AFTER;
+ if (flags & EPHY_LINK_HOME_PAGE)
+ ntflags |= EPHY_NEW_TAB_HOME_PAGE;
+
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]