diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/bookmarks/ephy-bookmarks-editor.c | 10 | ||||
-rw-r--r-- | src/bookmarks/ephy-bookmarks.c | 18 | ||||
-rw-r--r-- | src/bookmarks/ephy-bookmarks.h | 2 | ||||
-rw-r--r-- | src/bookmarks/ephy-topics-selector.c | 2 | ||||
-rw-r--r-- | src/bookmarks/ephy-tree-model-node.c | 11 |
5 files changed, 29 insertions, 14 deletions
diff --git a/src/bookmarks/ephy-bookmarks-editor.c b/src/bookmarks/ephy-bookmarks-editor.c index 0d8fcc442..558469981 100644 --- a/src/bookmarks/ephy-bookmarks-editor.c +++ b/src/bookmarks/ephy-bookmarks-editor.c @@ -570,6 +570,11 @@ ephy_bookmarks_editor_construct (EphyBookmarksEditor *editor) const char *icon_path; int i; + gtk_window_set_title (GTK_WINDOW (editor), _("Bookmarks")); + + icon_path = ephy_file ("epiphany-bookmarks.png"); + gtk_window_set_icon_from_file (GTK_WINDOW (editor), icon_path, NULL); + g_signal_connect (editor, "delete_event", G_CALLBACK (delete_event_cb), NULL); @@ -596,11 +601,6 @@ ephy_bookmarks_editor_construct (EphyBookmarksEditor *editor) editor->priv->ui_merge = ui_merge; editor->priv->action_group = action_group; - icon_path = ephy_file ("epiphany-bookmarks.png"); - gtk_window_set_icon_from_file (GTK_WINDOW (editor), icon_path, NULL); - gtk_window_set_title (GTK_WINDOW (editor), _("Bookmarks")); - gtk_widget_set_size_request (GTK_WIDGET (editor), 500, 450); - hbox = gtk_hbox_new (FALSE, 6); gtk_container_set_border_width (GTK_CONTAINER (hbox), 6); gtk_container_add (GTK_CONTAINER (editor->priv->menu_dock), hbox); 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); diff --git a/src/bookmarks/ephy-bookmarks.h b/src/bookmarks/ephy-bookmarks.h index f8db9b961..41382d9c0 100644 --- a/src/bookmarks/ephy-bookmarks.h +++ b/src/bookmarks/ephy-bookmarks.h @@ -44,7 +44,7 @@ enum EPHY_NODE_KEYWORD_PROP_NAME = 5, EPHY_NODE_BMK_PROP_SMART_LOCATION = 6, EPHY_NODE_BMK_PROP_ICON = 7, - EPHY_NODE_KEYWORD_PROP_ALL_PRIORITY = 8 + EPHY_NODE_KEYWORD_PROP_PRIORITY = 8 }; struct EphyBookmarks diff --git a/src/bookmarks/ephy-topics-selector.c b/src/bookmarks/ephy-topics-selector.c index a86c1a48b..4ec6a32cc 100644 --- a/src/bookmarks/ephy-topics-selector.c +++ b/src/bookmarks/ephy-topics-selector.c @@ -219,7 +219,7 @@ fill_model (EphyTopicsSelector *editor) } real_topic = !ephy_node_get_property_boolean - (kid, EPHY_NODE_KEYWORD_PROP_ALL_PRIORITY); + (kid, EPHY_NODE_KEYWORD_PROP_PRIORITY); if (real_topic) { diff --git a/src/bookmarks/ephy-tree-model-node.c b/src/bookmarks/ephy-tree-model-node.c index bf8e0570c..f1a6fe758 100644 --- a/src/bookmarks/ephy-tree-model-node.c +++ b/src/bookmarks/ephy-tree-model-node.c @@ -510,15 +510,16 @@ ephy_tree_model_node_get_value (GtkTreeModel *tree_model, break; case EPHY_TREE_MODEL_NODE_COL_TITLE_WEIGHT: g_value_init (value, G_TYPE_INT); - /* Only priority ALL (0) has bold text */ - if (ephy_node_get_property_int (node, EPHY_NODE_KEYWORD_PROP_ALL_PRIORITY)) - g_value_set_int (value, PANGO_WEIGHT_NORMAL); - else + priority = ephy_node_get_property_int (node, EPHY_NODE_KEYWORD_PROP_PRIORITY); + if (priority == EPHY_TREE_MODEL_ALL_PRIORITY || + priority == EPHY_TREE_MODEL_SPECIAL_PRIORITY) g_value_set_int (value, PANGO_WEIGHT_BOLD); + else + g_value_set_int (value, PANGO_WEIGHT_NORMAL); break; case EPHY_TREE_MODEL_NODE_COL_PRIORITY: g_value_init (value, G_TYPE_INT); - priority = ephy_node_get_property_int (node, EPHY_NODE_KEYWORD_PROP_ALL_PRIORITY); + priority = ephy_node_get_property_int (node, EPHY_NODE_KEYWORD_PROP_PRIORITY); if (priority == EPHY_TREE_MODEL_ALL_PRIORITY || priority == EPHY_TREE_MODEL_SPECIAL_PRIORITY) g_value_set_int (value, priority); |