aboutsummaryrefslogtreecommitdiffstats
path: root/embed
diff options
context:
space:
mode:
Diffstat (limited to 'embed')
-rw-r--r--embed/ephy-history.c20
-rw-r--r--embed/ephy-history.h2
2 files changed, 22 insertions, 0 deletions
diff --git a/embed/ephy-history.c b/embed/ephy-history.c
index 097b70d5c..8ead4fe01 100644
--- a/embed/ephy-history.c
+++ b/embed/ephy-history.c
@@ -823,6 +823,26 @@ ephy_history_set_page_title (EphyHistory *gh,
g_value_unset (&value);
}
+const char*
+ephy_history_get_icon (EphyHistory *gh,
+ const char *url)
+{
+ EphyNode *node, *host;
+ int host_id;
+
+ node = ephy_history_get_page (gh, url);
+ if (node == NULL) return NULL;
+
+ host_id = ephy_node_get_property_int (node, EPHY_NODE_PAGE_PROP_HOST_ID);
+ g_return_val_if_fail (host_id >= 0, NULL);
+
+ host = ephy_node_db_get_node_from_id (gh->priv->db, host_id);
+ g_return_val_if_fail (host != NULL, NULL);
+
+ return ephy_node_get_property_string (host, EPHY_NODE_PAGE_PROP_ICON);
+}
+
+
void
ephy_history_set_icon (EphyHistory *gh,
const char *url,
diff --git a/embed/ephy-history.h b/embed/ephy-history.h
index 7d1d66ee4..5d89ce708 100644
--- a/embed/ephy-history.h
+++ b/embed/ephy-history.h
@@ -90,6 +90,8 @@ const char *ephy_history_get_last_page (EphyHistory *gh);
void ephy_history_set_icon (EphyHistory *gh,
const char *url,
const char *icon);
+const char *ephy_history_get_icon (EphyHistory *gh,
+ const char *url);
void ephy_history_clear (EphyHistory *gh);