aboutsummaryrefslogtreecommitdiffstats
path: root/src/bookmarks
diff options
context:
space:
mode:
authorPeter Harvey <peter.a.harvey@gmail.com>2006-02-04 18:43:25 +0800
committerPeter Anthony Harvey <paharvey@src.gnome.org>2006-02-04 18:43:25 +0800
commitaa0171e76962bcdc240f3a0b3b25b15855803b7b (patch)
tree2e7015eca562bed70b63ee6b122887834c6ada9e /src/bookmarks
parentbe7c992ff6b3a05d6facf24e42826fe14a94ad89 (diff)
downloadgsoc2013-epiphany-aa0171e76962bcdc240f3a0b3b25b15855803b7b.tar
gsoc2013-epiphany-aa0171e76962bcdc240f3a0b3b25b15855803b7b.tar.gz
gsoc2013-epiphany-aa0171e76962bcdc240f3a0b3b25b15855803b7b.tar.bz2
gsoc2013-epiphany-aa0171e76962bcdc240f3a0b3b25b15855803b7b.tar.lz
gsoc2013-epiphany-aa0171e76962bcdc240f3a0b3b25b15855803b7b.tar.xz
gsoc2013-epiphany-aa0171e76962bcdc240f3a0b3b25b15855803b7b.tar.zst
gsoc2013-epiphany-aa0171e76962bcdc240f3a0b3b25b15855803b7b.zip
lib/egg/egg-editable-toolbar.c lib/egg/egg-toolbar-editor.c
2006-02-04 Peter Harvey <peter.a.harvey@gmail.com> * lib/egg/egg-editable-toolbar.c * lib/egg/egg-toolbar-editor.c * lib/egg/egg-toolbars-model.c * lib/egg/egg-toolbars-model.h * src/bookmarks/ephy-bookmark-factory-action.c * src/bookmarks/ephy-topic-factory-action.c * src/ephy-toolbars-model.c * src/epiphany.defs Improve the system for testing whether an item has already been used on the toolbar.
Diffstat (limited to 'src/bookmarks')
-rw-r--r--src/bookmarks/ephy-bookmark-factory-action.c5
-rw-r--r--src/bookmarks/ephy-topic-factory-action.c5
2 files changed, 6 insertions, 4 deletions
diff --git a/src/bookmarks/ephy-bookmark-factory-action.c b/src/bookmarks/ephy-bookmark-factory-action.c
index 2d3de0c73..2547c8b8f 100644
--- a/src/bookmarks/ephy-bookmark-factory-action.c
+++ b/src/bookmarks/ephy-bookmark-factory-action.c
@@ -98,7 +98,7 @@ build_menu_for_topic (GtkWidget *placeholder, EggToolbarsModel *model, EphyNode
EphyNode *node;
GPtrArray *children, *bookmarks;
const char *name, *action;
- gint i;
+ gint i, flags;
children = ephy_node_get_children (topic);
bookmarks = g_ptr_array_sized_new (children->len);
@@ -113,7 +113,8 @@ build_menu_for_topic (GtkWidget *placeholder, EggToolbarsModel *model, EphyNode
node = g_ptr_array_index (bookmarks, i);
action = ephy_bookmark_action_name (node);
- if (egg_toolbars_model_get_n_avail (model, action) < 0)
+ flags = egg_toolbars_model_get_name_flags (model, action);
+ if (flags & EGG_TB_MODEL_NAME_USED)
continue;
name = ephy_node_get_property_string (node, EPHY_NODE_BMK_PROP_TITLE);
diff --git a/src/bookmarks/ephy-topic-factory-action.c b/src/bookmarks/ephy-topic-factory-action.c
index 524a97ae7..44e9e0dd9 100644
--- a/src/bookmarks/ephy-topic-factory-action.c
+++ b/src/bookmarks/ephy-topic-factory-action.c
@@ -143,7 +143,7 @@ build_menu (GtkWidget *placeholder, EggToolbarsModel *model)
GPtrArray *children, *topics;
const char *name, *action;
- gint i, priority = -1, ptmp;
+ gint i, priority = -1, ptmp, flags;
/* Get a sorted list of topics. */
eb = ephy_shell_get_bookmarks (ephy_shell);
@@ -160,7 +160,8 @@ build_menu (GtkWidget *placeholder, EggToolbarsModel *model)
node = g_ptr_array_index (topics, i);
action = ephy_topic_action_name (node);
- if (egg_toolbars_model_get_n_avail (model, action) < 0)
+ flags = egg_toolbars_model_get_name_flags (model, action);
+ if (flags & EGG_TB_MODEL_NAME_USED)
continue;
ptmp = ephy_node_get_property_int (node, EPHY_NODE_KEYWORD_PROP_PRIORITY);