aboutsummaryrefslogtreecommitdiffstats
path: root/embed
diff options
context:
space:
mode:
authorXan Lopez <xan@src.gnome.org>2003-07-17 21:20:10 +0800
committerXan Lopez <xan@src.gnome.org>2003-07-17 21:20:10 +0800
commite8fbf999bcd5cc7bb8bf4e2b25885869a744ca43 (patch)
treed71c8ae37d29a5c2235e97bbb49872b02d6b8962 /embed
parent3212871bff4999162a67e32c86990821e8c995ed (diff)
downloadgsoc2013-epiphany-e8fbf999bcd5cc7bb8bf4e2b25885869a744ca43.tar.gz
gsoc2013-epiphany-e8fbf999bcd5cc7bb8bf4e2b25885869a744ca43.tar.zst
gsoc2013-epiphany-e8fbf999bcd5cc7bb8bf4e2b25885869a744ca43.zip
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.
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);