aboutsummaryrefslogtreecommitdiffstats
path: root/src/bookmarks/ephy-bookmarks.c
diff options
context:
space:
mode:
authorXan Lopez <xan@src.gnome.org>2003-03-25 03:18:32 +0800
committerXan Lopez <xan@src.gnome.org>2003-03-25 03:18:32 +0800
commit1b741a09f48f593702e998d83bd11b8ce4dd1793 (patch)
treef089fc8ff965807306a3f68966610c39266a24b4 /src/bookmarks/ephy-bookmarks.c
parentbb4528f9eef4b9417a4d7a2c7c012d8a3136170a (diff)
downloadgsoc2013-epiphany-1b741a09f48f593702e998d83bd11b8ce4dd1793.tar
gsoc2013-epiphany-1b741a09f48f593702e998d83bd11b8ce4dd1793.tar.gz
gsoc2013-epiphany-1b741a09f48f593702e998d83bd11b8ce4dd1793.tar.bz2
gsoc2013-epiphany-1b741a09f48f593702e998d83bd11b8ce4dd1793.tar.lz
gsoc2013-epiphany-1b741a09f48f593702e998d83bd11b8ce4dd1793.tar.xz
gsoc2013-epiphany-1b741a09f48f593702e998d83bd11b8ce4dd1793.tar.zst
gsoc2013-epiphany-1b741a09f48f593702e998d83bd11b8ce4dd1793.zip
s/EPHY_NODE_KEYWORD_PROP_ALL_PRIORITY/EPHY_NODE_KEYWORD_PROP_PRIORITY/ Add
s/EPHY_NODE_KEYWORD_PROP_ALL_PRIORITY/EPHY_NODE_KEYWORD_PROP_PRIORITY/ Add a "Most Visited" topic, featuring the 10 most visited bookmarks. Now special topics are bold too.
Diffstat (limited to 'src/bookmarks/ephy-bookmarks.c')
-rw-r--r--src/bookmarks/ephy-bookmarks.c18
1 files changed, 16 insertions, 2 deletions
diff --git a/src/bookmarks/ephy-bookmarks.c b/src/bookmarks/ephy-bookmarks.c
index 3a3b0dc48..2051bb6f7 100644
--- a/src/bookmarks/ephy-bookmarks.c
+++ b/src/bookmarks/ephy-bookmarks.c
@@ -218,7 +218,7 @@ ephy_bookmarks_save (EphyBookmarks *eb)
kid = g_ptr_array_index (children, i);
- if (kid != eb->priv->bookmarks)
+ if (kid != eb->priv->bookmarks && kid != eb->priv->favorites)
{
ephy_node_save_to_xml (kid, root);
}
@@ -448,7 +448,7 @@ ephy_bookmarks_init (EphyBookmarks *eb)
g_value_init (&value, G_TYPE_INT);
g_value_set_int (&value, EPHY_TREE_MODEL_ALL_PRIORITY);
ephy_node_set_property (eb->priv->bookmarks,
- EPHY_NODE_KEYWORD_PROP_ALL_PRIORITY,
+ EPHY_NODE_KEYWORD_PROP_PRIORITY,
&value);
g_value_unset (&value);
@@ -465,8 +465,22 @@ ephy_bookmarks_init (EphyBookmarks *eb)
G_OBJECT (eb),
0);
+ /* Favorites */
eb->priv->favorites = ephy_node_new_with_id (FAVORITES_NODE_ID);
ephy_node_ref (eb->priv->favorites);
+ g_value_init (&value, G_TYPE_STRING);
+ g_value_set_string (&value, _("Most Visited"));
+ ephy_node_set_property (eb->priv->favorites,
+ EPHY_NODE_KEYWORD_PROP_NAME,
+ &value);
+ g_value_unset (&value);
+ g_value_init (&value, G_TYPE_INT);
+ g_value_set_int (&value, EPHY_TREE_MODEL_SPECIAL_PRIORITY);
+ ephy_node_set_property (eb->priv->favorites,
+ EPHY_NODE_KEYWORD_PROP_PRIORITY,
+ &value);
+ g_value_unset (&value);
+ ephy_node_add_child (eb->priv->keywords, eb->priv->favorites);
ephy_bookmarks_load (eb);
ephy_bookmarks_emit_data_changed (eb);