diff options
author | Marco Pesenti Gritti <marco@it.gnome.org> | 2003-01-01 21:55:35 +0800 |
---|---|---|
committer | Marco Pesenti Gritti <mpeseng@src.gnome.org> | 2003-01-01 21:55:35 +0800 |
commit | 66677ed1062c18fd63cb13ea9480343a01058c96 (patch) | |
tree | ffce8e92e2b264f2a819bac2606c8822976fb6c3 /src/ephy-history-model.c | |
parent | a4f9aed333d06c864f4ed719fa41eda82eff4713 (diff) | |
download | gsoc2013-epiphany-66677ed1062c18fd63cb13ea9480343a01058c96.tar gsoc2013-epiphany-66677ed1062c18fd63cb13ea9480343a01058c96.tar.gz gsoc2013-epiphany-66677ed1062c18fd63cb13ea9480343a01058c96.tar.bz2 gsoc2013-epiphany-66677ed1062c18fd63cb13ea9480343a01058c96.tar.lz gsoc2013-epiphany-66677ed1062c18fd63cb13ea9480343a01058c96.tar.xz gsoc2013-epiphany-66677ed1062c18fd63cb13ea9480343a01058c96.tar.zst gsoc2013-epiphany-66677ed1062c18fd63cb13ea9480343a01058c96.zip |
Rewrite ephy node multiple removals to actually work.
2003-01-01 Marco Pesenti Gritti <marco@it.gnome.org>
* embed/ephy-history.c: (ephy_history_clear),
(ephy_history_remove):
* src/bookmarks/ephy-bookmarks.c:
(ephy_bookmarks_clean_empty_keywords):
* src/ephy-history-model.c: (get_one_level_path_real),
(get_path_real), (root_child_removed_cb):
Rewrite ephy node multiple removals to actually
work.
Diffstat (limited to 'src/ephy-history-model.c')
-rw-r--r-- | src/ephy-history-model.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/src/ephy-history-model.c b/src/ephy-history-model.c index c4e694bcd..baa948a7d 100644 --- a/src/ephy-history-model.c +++ b/src/ephy-history-model.c @@ -476,6 +476,7 @@ get_one_level_path_real (EphyHistoryModel *model, retval = gtk_tree_path_new (); my_parent = get_parent_node (model, node); + g_return_val_if_fail (my_parent != NULL, NULL); gtk_tree_path_append_index (retval, ephy_node_get_child_index (my_parent, node)); @@ -489,8 +490,10 @@ get_path_real (EphyHistoryModel *model, GtkTreePath *retval; EphyNode *host; - retval = gtk_tree_path_new (); host = get_parent_node (model, page); + if (host != NULL) return NULL; + + retval = gtk_tree_path_new (); gtk_tree_path_append_index (retval, ephy_node_get_child_index (model->priv->root, host)); gtk_tree_path_append_index (retval, ephy_node_get_child_index (host, page)); @@ -776,8 +779,12 @@ root_child_removed_cb (EphyNode *node, { path = get_path_real (model, child); } - gtk_tree_model_row_deleted (GTK_TREE_MODEL (model), path); - gtk_tree_path_free (path); + + if (path) + { + gtk_tree_model_row_deleted (GTK_TREE_MODEL (model), path); + gtk_tree_path_free (path); + } } static void |