diff options
author | Christian Persch <chpe@cvs.gnome.org> | 2006-08-08 04:35:37 +0800 |
---|---|---|
committer | Christian Persch <chpe@src.gnome.org> | 2006-08-08 04:35:37 +0800 |
commit | 8d06d6b92055262afa4585fc1d5545bce48398f7 (patch) | |
tree | 811d74cb0c68ca3e8cf7ceb756a1978a8810e866 /src | |
parent | 10473d884a92802eeedb5e328d89efaadf731a7b (diff) | |
download | gsoc2013-epiphany-8d06d6b92055262afa4585fc1d5545bce48398f7.tar gsoc2013-epiphany-8d06d6b92055262afa4585fc1d5545bce48398f7.tar.gz gsoc2013-epiphany-8d06d6b92055262afa4585fc1d5545bce48398f7.tar.bz2 gsoc2013-epiphany-8d06d6b92055262afa4585fc1d5545bce48398f7.tar.lz gsoc2013-epiphany-8d06d6b92055262afa4585fc1d5545bce48398f7.tar.xz gsoc2013-epiphany-8d06d6b92055262afa4585fc1d5545bce48398f7.tar.zst gsoc2013-epiphany-8d06d6b92055262afa4585fc1d5545bce48398f7.zip |
Correctly mark mouse click events as consumed.
2006-08-07 Christian Persch <chpe@cvs.gnome.org>
* src/ephy-tab.c:
Correctly mark mouse click events as consumed.
Diffstat (limited to 'src')
-rw-r--r-- | src/ephy-tab.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/ephy-tab.c b/src/ephy-tab.c index a793c167a..b5f99a4ff 100644 --- a/src/ephy-tab.c +++ b/src/ephy-tab.c @@ -1905,7 +1905,7 @@ open_link_in_new (EphyTab *tab, return FALSE; } -static void +static gboolean save_property_url (EphyEmbed *embed, EphyEmbedEvent *event, const char *property, @@ -1918,6 +1918,8 @@ save_property_url (EphyEmbed *embed, value = ephy_embed_event_get_property (event, property); location = g_value_get_string (value); + if (!address_has_web_scheme (location)) return FALSE; + persist = EPHY_EMBED_PERSIST (ephy_embed_factory_new_object (EPHY_TYPE_EMBED_PERSIST)); @@ -1929,6 +1931,8 @@ save_property_url (EphyEmbed *embed, ephy_embed_persist_save (persist); g_object_unref (G_OBJECT(persist)); + + return TRUE; } static void @@ -2007,14 +2011,14 @@ ephy_tab_dom_mouse_click_cb (EphyEmbed *embed, /* shift+click saves the link target */ else if (is_link && is_left_click && with_shift) { - save_property_url (embed, event, "link", CONF_STATE_SAVE_DIR); + handled = save_property_url (embed, event, "link", CONF_STATE_SAVE_DIR); } /* shift+click saves the non-link image * Note: pressing enter to submit a form synthesizes a mouse click event */ else if (is_image && is_left_click && with_shift && !is_input) { - save_property_url (embed, event, "image", CONF_STATE_SAVE_IMAGE_DIR); + handled = save_property_url (embed, event, "image", CONF_STATE_SAVE_IMAGE_DIR); } /* middle click opens the selection url */ else if (is_middle_clickable && is_middle_click && middle_click_opens) |