aboutsummaryrefslogtreecommitdiffstats
path: root/src/bookmarks/ephy-bookmarks.c
diff options
context:
space:
mode:
authorMarco Pesenti Gritti <marco@it.gnome.org>2003-03-22 23:15:07 +0800
committerMarco Pesenti Gritti <mpeseng@src.gnome.org>2003-03-22 23:15:07 +0800
commit63135332334125311908d415423cd15602cd6535 (patch)
treea810ec0e8ceced82d4003f9bf0d1d4d449260097 /src/bookmarks/ephy-bookmarks.c
parent7038fa5c1a3d6eee199e0731e1fae8430498eeab (diff)
downloadgsoc2013-epiphany-63135332334125311908d415423cd15602cd6535.tar
gsoc2013-epiphany-63135332334125311908d415423cd15602cd6535.tar.gz
gsoc2013-epiphany-63135332334125311908d415423cd15602cd6535.tar.bz2
gsoc2013-epiphany-63135332334125311908d415423cd15602cd6535.tar.lz
gsoc2013-epiphany-63135332334125311908d415423cd15602cd6535.tar.xz
gsoc2013-epiphany-63135332334125311908d415423cd15602cd6535.tar.zst
gsoc2013-epiphany-63135332334125311908d415423cd15602cd6535.zip
Some more bookmarks work ...
2003-03-22 Marco Pesenti Gritti <marco@it.gnome.org> * data/ui/epiphany-bookmark-editor-ui.xml.in: * src/bookmarks/ephy-bookmark-properties.c: (update_entry), (title_entry_changed_cb), (location_entry_changed_cb), (build_ui): * src/bookmarks/ephy-bookmarks-editor.c: (cmd_add_topic), (cmd_remove_topic), (cmd_rename_bookmark), (cmd_open_bookmarks_in_tabs), (cmd_open_bookmarks_in_browser), (cmd_remove_bookmarks), (cmd_bookmark_properties), (add_widget), (ephy_bookmarks_editor_construct): * src/bookmarks/ephy-bookmarks.c: (bookmarks_removed_cb), (ephy_bookmarks_has_keyword), (ephy_bookmarks_unset_keyword): * src/bookmarks/ephy-bookmarks.h: * src/bookmarks/ephy-new-bookmark.c: (build_editing_table): * src/bookmarks/ephy-topics-selector.c: (fill_model), (topic_toggled), (ephy_topics_selector_new): * src/bookmarks/ephy-topics-selector.h: Some more bookmarks work ...
Diffstat (limited to 'src/bookmarks/ephy-bookmarks.c')
-rw-r--r--src/bookmarks/ephy-bookmarks.c46
1 files changed, 8 insertions, 38 deletions
diff --git a/src/bookmarks/ephy-bookmarks.c b/src/bookmarks/ephy-bookmarks.c
index 81a06e738..7baaf7d8f 100644
--- a/src/bookmarks/ephy-bookmarks.c
+++ b/src/bookmarks/ephy-bookmarks.c
@@ -163,42 +163,6 @@ ephy_bookmarks_class_init (EphyBookmarksClass *klass)
object_class->finalize = ephy_bookmarks_finalize;
}
-static gboolean
-ephy_bookmarks_clean_empty_keywords (EphyBookmarks *eb)
-{
- GPtrArray *children;
- int i;
- GList *l = NULL, *tmp;
-
- children = ephy_node_get_children (eb->priv->keywords);
- ephy_node_thaw (eb->priv->keywords);
- for (i = 0; i < children->len; i++)
- {
- EphyNode *kid;
-
- kid = g_ptr_array_index (children, i);
-
- if (ephy_node_get_n_children (kid) == 0)
- {
- l = g_list_append (l, kid);
- }
- }
-
- if (l == NULL) return FALSE;
-
- for (tmp = l; tmp != NULL; tmp = tmp->next)
- {
- EphyNode *node = EPHY_NODE (tmp->data);
- LOG ("Remove empty keyword: %s",
- ephy_node_get_property_string (node,
- EPHY_NODE_KEYWORD_PROP_NAME))
- g_object_unref (node);
- }
- g_list_free (l);
-
- return FALSE;
-}
-
static void
ephy_bookmarks_load (EphyBookmarks *eb)
{
@@ -439,7 +403,6 @@ bookmarks_removed_cb (EphyNode *node,
EphyBookmarks *eb)
{
ephy_bookmarks_emit_data_changed (eb);
- g_idle_add ((GSourceFunc)ephy_bookmarks_clean_empty_keywords, eb);
}
static void
@@ -854,6 +817,14 @@ ephy_bookmarks_find_keyword (EphyBookmarks *eb,
return node;
}
+gboolean
+ephy_bookmarks_has_keyword (EphyBookmarks *eb,
+ EphyNode *keyword,
+ EphyNode *bookmark)
+{
+ return ephy_node_has_child (keyword, bookmark);
+}
+
void
ephy_bookmarks_set_keyword (EphyBookmarks *eb,
EphyNode *keyword,
@@ -872,7 +843,6 @@ ephy_bookmarks_unset_keyword (EphyBookmarks *eb,
if (!ephy_node_has_child (keyword, bookmark)) return;
ephy_node_remove_child (keyword, bookmark);
- ephy_bookmarks_clean_empty_keywords (eb);
}
EphyNode *