aboutsummaryrefslogtreecommitdiffstats
path: root/src/bookmarks/ephy-bookmarks.c
diff options
context:
space:
mode:
authorMarco Pesenti Gritti <marco@it.gnome.org>2003-01-13 20:29:55 +0800
committerMarco Pesenti Gritti <mpeseng@src.gnome.org>2003-01-13 20:29:55 +0800
commit9ff4f5f92f9db92f4b420430d6368feabc26490b (patch)
tree9224b4c3a19865803a6184413239d6f99f7467cc /src/bookmarks/ephy-bookmarks.c
parent225e05938a6bff23249516da4d277d7d742e2283 (diff)
downloadgsoc2013-epiphany-9ff4f5f92f9db92f4b420430d6368feabc26490b.tar
gsoc2013-epiphany-9ff4f5f92f9db92f4b420430d6368feabc26490b.tar.gz
gsoc2013-epiphany-9ff4f5f92f9db92f4b420430d6368feabc26490b.tar.bz2
gsoc2013-epiphany-9ff4f5f92f9db92f4b420430d6368feabc26490b.tar.lz
gsoc2013-epiphany-9ff4f5f92f9db92f4b420430d6368feabc26490b.tar.xz
gsoc2013-epiphany-9ff4f5f92f9db92f4b420430d6368feabc26490b.tar.zst
gsoc2013-epiphany-9ff4f5f92f9db92f4b420430d6368feabc26490b.zip
Use favicons in bookmarks. Use titles for session history when possible.
2003-01-13 Marco Pesenti Gritti <marco@it.gnome.org> * TODO: * embed/ephy-favicon-cache.c: (ephy_favicon_cache_get): * src/bookmarks/ephy-bookmarks-editor.c: (ephy_bookmarks_editor_construct): * src/bookmarks/ephy-bookmarks.c: (ephy_bookmarks_set_icon): * src/bookmarks/ephy-bookmarks.h: * src/bookmarks/ephy-new-bookmark.c: (ephy_new_bookmark_finalize), (ephy_new_bookmark_add), (ephy_new_bookmark_init), (ephy_new_bookmark_set_smarturl), (ephy_new_bookmark_set_icon): * src/bookmarks/ephy-new-bookmark.h: * src/bookmarks/ephy-node-view.c: (ephy_node_view_add_column), (ephy_node_view_add_icon_column): * src/bookmarks/ephy-node-view.h: * src/bookmarks/ephy-tree-model-node.c: (ephy_tree_model_node_get_column_type), (get_icon_pixbuf), (ephy_tree_model_node_get_value), (ephy_tree_model_node_column_get_type): * src/bookmarks/ephy-tree-model-node.h: * src/ephy-history-model.c: (ephy_history_model_get_value): * src/ephy-navigation-button.c: (setup_back_or_forward_menu): * src/ephy-tab.c: (ephy_tab_favicon_cb): * src/window-commands.c: (window_cmd_bookmarks_add_default): Use favicons in bookmarks. Use titles for session history when possible.
Diffstat (limited to 'src/bookmarks/ephy-bookmarks.c')
-rw-r--r--src/bookmarks/ephy-bookmarks.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/bookmarks/ephy-bookmarks.c b/src/bookmarks/ephy-bookmarks.c
index 0f68d8858..106a3298e 100644
--- a/src/bookmarks/ephy-bookmarks.c
+++ b/src/bookmarks/ephy-bookmarks.c
@@ -657,6 +657,29 @@ ephy_bookmarks_add (EphyBookmarks *eb,
return bm;
}
+void
+ephy_bookmarks_set_icon (EphyBookmarks *eb,
+ const char *url,
+ const char *icon)
+{
+ EphyNode *node;
+ GValue value = { 0, };
+
+ g_return_if_fail (icon != NULL);
+
+ 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 == NULL) return;
+
+ g_value_init (&value, G_TYPE_STRING);
+ g_value_set_string (&value, icon);
+ ephy_node_set_property (node, EPHY_NODE_BMK_PROP_ICON,
+ &value);
+ g_value_unset (&value);
+}
+
static gchar *
options_skip_spaces (const gchar *str)
{