aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorDiego Escalante Urrelo <diegoe@svn.gnome.org>2007-01-09 06:53:47 +0800
committerDiego Escalante Urrelo <diegoe@src.gnome.org>2007-01-09 06:53:47 +0800
commiteeae242437aca16e9b7d6d6cc45f3e5bf90f4aaa (patch)
tree38e9a58032427b032aa55b37a78b5c5538218bcf /lib
parenta090eff785cd6c75eb70905b91adea159d64d648 (diff)
downloadgsoc2013-epiphany-eeae242437aca16e9b7d6d6cc45f3e5bf90f4aaa.tar.gz
gsoc2013-epiphany-eeae242437aca16e9b7d6d6cc45f3e5bf90f4aaa.tar.zst
gsoc2013-epiphany-eeae242437aca16e9b7d6d6cc45f3e5bf90f4aaa.zip
Workaround/semi-fix for bug #351814. The real cause of the problem is the
2007-01-08 Diego Escalante Urrelo <diegoe@svn.gnome.org> * src/bookmarks/ephy-bookmarks-editor.c: * lib/widgets/ephy-node-view.c: Workaround/semi-fix for bug #351814. The real cause of the problem is the user_data that is never set on a GtkTreeIter, so the Ephy implementation of the tree makes it to have a stamp of 0 being that way an invalid iter. Patch by Diego Escalante Urrelo. svn path=/trunk/; revision=6796
Diffstat (limited to 'lib')
-rw-r--r--lib/widgets/ephy-node-view.c17
1 files changed, 11 insertions, 6 deletions
diff --git a/lib/widgets/ephy-node-view.c b/lib/widgets/ephy-node-view.c
index b94867cf3..078496591 100644
--- a/lib/widgets/ephy-node-view.c
+++ b/lib/widgets/ephy-node-view.c
@@ -160,16 +160,21 @@ static EphyNode *
get_node_from_path (EphyNodeView *view, GtkTreePath *path)
{
EphyNode *node;
- GtkTreeIter iter, iter2;
+ GtkTreeIter iter, iter2, iter3;
if (path == NULL) return NULL;
gtk_tree_model_get_iter (view->priv->sortmodel, &iter, path);
gtk_tree_model_sort_convert_iter_to_child_iter
(GTK_TREE_MODEL_SORT (view->priv->sortmodel), &iter2, &iter);
+
+ if (iter2.stamp == 0) {
+ return NULL;
+ }
gtk_tree_model_filter_convert_iter_to_child_iter
- (GTK_TREE_MODEL_FILTER (view->priv->filtermodel), &iter, &iter2);
- node = ephy_tree_model_node_node_from_iter (view->priv->nodemodel, &iter);
+ (GTK_TREE_MODEL_FILTER (view->priv->filtermodel), &iter3, &iter2);
+
+ node = ephy_tree_model_node_node_from_iter (view->priv->nodemodel, &iter3);
return node;
}
@@ -1373,7 +1378,7 @@ ephy_node_view_remove (EphyNodeView *view)
EphyNodeViewPrivate *priv = view->priv;
GList *list, *l;
EphyNode *node;
- GtkTreeIter iter, iter2;
+ GtkTreeIter iter, iter2, iter3;
GtkTreePath *path;
GtkTreeRowReference *row_ref = NULL;
GtkTreeSelection *selection;
@@ -1388,9 +1393,9 @@ ephy_node_view_remove (EphyNodeView *view)
node = g_list_first (list)->data;
ephy_tree_model_node_iter_from_node (EPHY_TREE_MODEL_NODE (view->priv->nodemodel),
- node, &iter);
+ node, &iter3);
gtk_tree_model_filter_convert_child_iter_to_iter (GTK_TREE_MODEL_FILTER (view->priv->filtermodel),
- &iter2, &iter);
+ &iter2, &iter3);
gtk_tree_model_sort_convert_child_iter_to_iter (GTK_TREE_MODEL_SORT (view->priv->sortmodel),
&iter, &iter2);
iter2 = iter;