aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMarco Pesenti Gritti <marco@gnome.org>2004-02-12 00:10:06 +0800
committerMarco Pesenti Gritti <marco@src.gnome.org>2004-02-12 00:10:06 +0800
commit93ed50eeef1f577d596e48a26bf583119bb55b0e (patch)
tree8d2d7e9bfe151d857ea36e9c4e533d2e20635bc6 /src
parent6ffa823dbba4a41c83f30776267b133ccc48fa94 (diff)
downloadgsoc2013-epiphany-93ed50eeef1f577d596e48a26bf583119bb55b0e.tar
gsoc2013-epiphany-93ed50eeef1f577d596e48a26bf583119bb55b0e.tar.gz
gsoc2013-epiphany-93ed50eeef1f577d596e48a26bf583119bb55b0e.tar.bz2
gsoc2013-epiphany-93ed50eeef1f577d596e48a26bf583119bb55b0e.tar.lz
gsoc2013-epiphany-93ed50eeef1f577d596e48a26bf583119bb55b0e.tar.xz
gsoc2013-epiphany-93ed50eeef1f577d596e48a26bf583119bb55b0e.tar.zst
gsoc2013-epiphany-93ed50eeef1f577d596e48a26bf583119bb55b0e.zip
Do not load js urls when middle clicked.
2004-02-11 Marco Pesenti Gritti <marco@gnome.org> * src/ephy-tab.c: (open_link_in_new_tab), (ephy_tab_dom_mouse_click_cb): Do not load js urls when middle clicked.
Diffstat (limited to 'src')
-rw-r--r--src/ephy-tab.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/ephy-tab.c b/src/ephy-tab.c
index d05b882fa..2f31bc45f 100644
--- a/src/ephy-tab.c
+++ b/src/ephy-tab.c
@@ -958,7 +958,7 @@ ephy_tab_size_to_cb (EphyEmbed *embed, gint width, gint height,
}
}
-static void
+static gboolean
open_link_in_new_tab (EphyTab *tab,
const char *link_address)
{
@@ -966,7 +966,7 @@ open_link_in_new_tab (EphyTab *tab,
gboolean new_tab;
window = ephy_tab_get_window (tab);
- g_return_if_fail (window != NULL);
+ g_return_val_if_fail (window != NULL, FALSE);
new_tab = address_has_web_scheme (link_address);
@@ -977,10 +977,8 @@ open_link_in_new_tab (EphyTab *tab,
EPHY_NEW_TAB_OPEN_PAGE |
EPHY_NEW_TAB_IN_EXISTING_WINDOW);
}
- else
- {
- ephy_window_load_url (window, link_address);
- }
+
+ return new_tab;
}
static void
@@ -1081,7 +1079,7 @@ ephy_tab_dom_mouse_click_cb (EphyEmbed *embed,
ephy_embed_event_get_property (event, "link", &value);
link_address = g_value_get_string (value);
- open_link_in_new_tab (tab, link_address);
+ handled = open_link_in_new_tab (tab, link_address);
}
/* shift+click saves the link target */
else if (is_link && is_left_click && with_shift)