diff options
Diffstat (limited to 'src/bookmarks/ephy-bookmarks.c')
-rw-r--r-- | src/bookmarks/ephy-bookmarks.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/bookmarks/ephy-bookmarks.c b/src/bookmarks/ephy-bookmarks.c index 5e9d539f3..7e1d2bdd5 100644 --- a/src/bookmarks/ephy-bookmarks.c +++ b/src/bookmarks/ephy-bookmarks.c @@ -659,6 +659,26 @@ ephy_bookmarks_add (EphyBookmarks *eb, return bm; } +guint +ephy_bookmarks_get_bookmark_id (EphyBookmarks *eb, + const char *url) +{ + EphyNode *node; + + g_static_rw_lock_reader_lock (eb->priv->bookmarks_hash_lock); + node = g_hash_table_lookup (eb->priv->bookmarks_hash, url); + g_static_rw_lock_reader_unlock (eb->priv->bookmarks_hash_lock); + + if (node) + { + return ephy_node_get_id (node); + } + else + { + return -1; + } +} + void ephy_bookmarks_set_icon (EphyBookmarks *eb, const char *url, |