diff options
Diffstat (limited to 'src')
-rwxr-xr-x | src/ephy-toolbars-model.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/src/ephy-toolbars-model.c b/src/ephy-toolbars-model.c index a256c485a..f4fb3a0d2 100755 --- a/src/ephy-toolbars-model.c +++ b/src/ephy-toolbars-model.c @@ -78,6 +78,8 @@ impl_add_item (EggToolbarsModel *t, EphyBookmarks *bookmarks; char *action_name = NULL; const char *res; + gboolean topic = FALSE; + int id = -1; LOG ("Add item %s", name) @@ -86,8 +88,8 @@ impl_add_item (EggToolbarsModel *t, if (gdk_atom_intern (EPHY_DND_TOPIC_TYPE, FALSE) == type) { GList *nodes; - int id; - + + topic = TRUE; nodes = ephy_dnd_node_list_extract_nodes (name); id = ephy_node_get_id (EPHY_NODE (nodes->data)); action_name = g_strdup_printf ("GoTopicId%d", id); @@ -96,8 +98,8 @@ impl_add_item (EggToolbarsModel *t, else if (gdk_atom_intern (EPHY_DND_BOOKMARK_TYPE, FALSE) == type) { GList *nodes; - int id; + topic = FALSE; nodes = ephy_dnd_node_list_extract_nodes (name); id = ephy_node_get_id (EPHY_NODE (nodes->data)); action_name = g_strdup_printf ("GoBookmarkId%d", id); @@ -106,8 +108,11 @@ impl_add_item (EggToolbarsModel *t, res = action_name ? action_name : name; - EGG_TOOLBARS_MODEL_CLASS (parent_class)->add_item - (t, toolbar_position, position, type, res); + if (!ephy_toolbars_model_has_bookmark (EPHY_TOOLBARS_MODEL (t), topic, id)) + { + EGG_TOOLBARS_MODEL_CLASS (parent_class)->add_item + (t, toolbar_position, position, type, res); + } return res; } |