From e8fbf999bcd5cc7bb8bf4e2b25885869a744ca43 Mon Sep 17 00:00:00 2001 From: Xan Lopez Date: Thu, 17 Jul 2003 13:20:10 +0000 Subject: Allow DND of URLs (from links or favicons or other apps...) to the Allow DND of URLs (from links or favicons or other apps...) to the bookmarks toolbar, fixes #116613 (HOORAY), thanks to marco and chpe for the help. --- embed/ephy-history.c | 20 ++++++++++++++++++++ embed/ephy-history.h | 2 ++ 2 files changed, 22 insertions(+) (limited to 'embed') 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); -- cgit v1.2.3