aboutsummaryrefslogtreecommitdiffstats
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
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.
-rw-r--r--ChangeLog15
-rw-r--r--src/bookmarks/ephy-bookmarks-editor.c10
-rw-r--r--src/bookmarks/ephy-bookmarks.c18
-rw-r--r--src/bookmarks/ephy-bookmarks.h2
-rw-r--r--src/bookmarks/ephy-topics-selector.c2
-rw-r--r--src/bookmarks/ephy-tree-model-node.c11
6 files changed, 44 insertions, 14 deletions
diff --git a/ChangeLog b/ChangeLog
index 1a68f8eea..4074989e5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,18 @@
+2003-03-24 Xan Lopez <xan@masilla.org>
+
+ * src/bookmarks/ephy-bookmarks-editor.c:
+ (ephy_bookmarks_editor_construct):
+ * src/bookmarks/ephy-bookmarks.c: (ephy_bookmarks_save),
+ (ephy_bookmarks_init):
+ * src/bookmarks/ephy-bookmarks.h:
+ * src/bookmarks/ephy-topics-selector.c: (fill_model):
+ * src/bookmarks/ephy-tree-model-node.c:
+ (ephy_tree_model_node_get_value):
+
+ 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.
+
2003-03-24 Marco Pesenti Gritti <marco@it.gnome.org>
* src/bookmarks/ephy-bookmarks.c: (update_topics_list),
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);