aboutsummaryrefslogtreecommitdiffstats
path: root/src/bookmarks/ephy-tree-model-node.c
diff options
context:
space:
mode:
authorXan Lopez <xan@src.gnome.org>2003-03-24 04:10:33 +0800
committerXan Lopez <xan@src.gnome.org>2003-03-24 04:10:33 +0800
commit0e595f395732cc4c2e6a18dd460beb9335f81188 (patch)
tree1540cf39044fb24a113b399d008b4933503436ca /src/bookmarks/ephy-tree-model-node.c
parent9e061fdc100ec5c71288049e4daffedd4253733d (diff)
downloadgsoc2013-epiphany-0e595f395732cc4c2e6a18dd460beb9335f81188.tar
gsoc2013-epiphany-0e595f395732cc4c2e6a18dd460beb9335f81188.tar.gz
gsoc2013-epiphany-0e595f395732cc4c2e6a18dd460beb9335f81188.tar.bz2
gsoc2013-epiphany-0e595f395732cc4c2e6a18dd460beb9335f81188.tar.lz
gsoc2013-epiphany-0e595f395732cc4c2e6a18dd460beb9335f81188.tar.xz
gsoc2013-epiphany-0e595f395732cc4c2e6a18dd460beb9335f81188.tar.zst
gsoc2013-epiphany-0e595f395732cc4c2e6a18dd460beb9335f81188.zip
Some ground work on the PRIORITY property, change it from bool to int, add
Some ground work on the PRIORITY property, change it from bool to int, add more priority types (ALL, SPECIAL, NORMAL), and use it in the WEIGTH_TEXT property (just ALL is bold now).
Diffstat (limited to 'src/bookmarks/ephy-tree-model-node.c')
-rw-r--r--src/bookmarks/ephy-tree-model-node.c16
1 files changed, 11 insertions, 5 deletions
diff --git a/src/bookmarks/ephy-tree-model-node.c b/src/bookmarks/ephy-tree-model-node.c
index e62acbad7..bf8e0570c 100644
--- a/src/bookmarks/ephy-tree-model-node.c
+++ b/src/bookmarks/ephy-tree-model-node.c
@@ -361,9 +361,9 @@ ephy_tree_model_node_get_column_type (GtkTreeModel *tree_model,
case EPHY_TREE_MODEL_NODE_COL_KEYWORD:
return G_TYPE_STRING;
case EPHY_TREE_MODEL_NODE_COL_TITLE_WEIGHT:
+ case EPHY_TREE_MODEL_NODE_COL_PRIORITY:
return G_TYPE_INT;
case EPHY_TREE_MODEL_NODE_COL_VISIBLE:
- case EPHY_TREE_MODEL_NODE_COL_PRIORITY:
return G_TYPE_BOOLEAN;
case EPHY_TREE_MODEL_NODE_COL_ICON:
return GDK_TYPE_PIXBUF;
@@ -466,6 +466,7 @@ ephy_tree_model_node_get_value (GtkTreeModel *tree_model,
{
EphyTreeModelNode *model = EPHY_TREE_MODEL_NODE (tree_model);
EphyNode *node;
+ int priority;
g_return_if_fail (EPHY_IS_TREE_MODEL_NODE (tree_model));
g_return_if_fail (iter != NULL);
@@ -509,15 +510,20 @@ 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);
- if (!ephy_node_get_property_boolean (node, EPHY_NODE_KEYWORD_PROP_ALL_PRIORITY))
+ /* 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
g_value_set_int (value, PANGO_WEIGHT_BOLD);
break;
case EPHY_TREE_MODEL_NODE_COL_PRIORITY:
- g_value_init (value, G_TYPE_BOOLEAN);
- g_value_set_boolean (value, !ephy_node_get_property_boolean (node,
- EPHY_NODE_KEYWORD_PROP_ALL_PRIORITY));
+ g_value_init (value, G_TYPE_INT);
+ priority = ephy_node_get_property_int (node, EPHY_NODE_KEYWORD_PROP_ALL_PRIORITY);
+ if (priority == EPHY_TREE_MODEL_ALL_PRIORITY ||
+ priority == EPHY_TREE_MODEL_SPECIAL_PRIORITY)
+ g_value_set_int (value, priority);
+ else
+ g_value_set_int (value, EPHY_TREE_MODEL_NORMAL_PRIORITY);
break;
default:
g_assert_not_reached ();