diff options
author | Christian Persch <chpe@cvs.gnome.org> | 2003-10-30 03:49:38 +0800 |
---|---|---|
committer | Christian Persch <chpe@src.gnome.org> | 2003-10-30 03:49:38 +0800 |
commit | dd37d52cd37c158e9a6219163336b25b90a33764 (patch) | |
tree | 73dde9aa809c4202486eac659996b766e991a5da /embed/ephy-history.c | |
parent | cc10162908abf03fe5e1998d5cee1b41f21e791c (diff) | |
download | gsoc2013-epiphany-dd37d52cd37c158e9a6219163336b25b90a33764.tar gsoc2013-epiphany-dd37d52cd37c158e9a6219163336b25b90a33764.tar.gz gsoc2013-epiphany-dd37d52cd37c158e9a6219163336b25b90a33764.tar.bz2 gsoc2013-epiphany-dd37d52cd37c158e9a6219163336b25b90a33764.tar.lz gsoc2013-epiphany-dd37d52cd37c158e9a6219163336b25b90a33764.tar.xz gsoc2013-epiphany-dd37d52cd37c158e9a6219163336b25b90a33764.tar.zst gsoc2013-epiphany-dd37d52cd37c158e9a6219163336b25b90a33764.zip |
Add public function to get a host node from a page url.
2003-10-29 Christian Persch <chpe@cvs.gnome.org>
* embed/ephy-history.c: (ephy_history_add_host),
(ephy_history_get_host):
* embed/ephy-history.h:
Add public function to get a host node from a page url.
* src/ephy-tab.c: (address_has_web_scheme), (ephy_tab_address_cb),
(ephy_tab_zoom_changed_cb), (open_link_in_new_tab),
(ephy_tab_init):
Persist zoom settings per host.
Diffstat (limited to 'embed/ephy-history.c')
-rw-r--r-- | embed/ephy-history.c | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/embed/ephy-history.c b/embed/ephy-history.c index 197ad85d3..1c4cb3b28 100644 --- a/embed/ephy-history.c +++ b/embed/ephy-history.c @@ -536,19 +536,28 @@ ephy_history_host_visited (EphyHistory *eh, static EphyNode * ephy_history_add_host (EphyHistory *eh, EphyNode *page) { + const char *url; + + url = ephy_node_get_property_string + (page, EPHY_NODE_PAGE_PROP_LOCATION); + + return ephy_history_get_host (eh, url); +} + +EphyNode * +ephy_history_get_host (EphyHistory *eh, const char *url) +{ GnomeVFSURI *vfs_uri = NULL; EphyNode *host = NULL; const char *host_name = NULL; GList *host_locations = NULL, *l; GValue value = { 0, }; - const char *url; const char *scheme = NULL; GTime now; - now = time (NULL); + g_return_val_if_fail (url != NULL, NULL); - url = ephy_node_get_property_string - (page, EPHY_NODE_PAGE_PROP_LOCATION); + now = time (NULL); vfs_uri = gnome_vfs_uri_new (url); |