Actually remove history items with the Delete tool button

This commit is contained in:
Dale Whittaker 2008-12-15 20:12:51 +01:00 committed by Christian Dywan
parent 58b40bce38
commit 0fb55faf37

View file

@ -2491,6 +2491,7 @@ midori_browser_model_remove_item (GtkTreeModel* model,
{ {
GtkTreeIter child_iter; GtkTreeIter child_iter;
KatzeItem* child; KatzeItem* child;
KatzeArray* parent;
gint i, n; gint i, n;
if (KATZE_IS_ARRAY (item)) if (KATZE_IS_ARRAY (item))
@ -2504,6 +2505,11 @@ midori_browser_model_remove_item (GtkTreeModel* model,
while (gtk_tree_model_iter_nth_child (model, &child_iter, iter, 0)) while (gtk_tree_model_iter_nth_child (model, &child_iter, iter, 0))
gtk_tree_store_remove (GTK_TREE_STORE (model), &child_iter); gtk_tree_store_remove (GTK_TREE_STORE (model), &child_iter);
} }
else
{
parent = katze_item_get_parent (item);
katze_array_remove_item (parent, item);
}
gtk_tree_store_remove (GTK_TREE_STORE (model), iter); gtk_tree_store_remove (GTK_TREE_STORE (model), iter);
g_object_unref (item); g_object_unref (item);