aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog10
-rw-r--r--lib/widgets/ephy-node-view.c17
-rw-r--r--src/bookmarks/ephy-bookmarks-editor.c2
3 files changed, 22 insertions, 7 deletions
diff --git a/ChangeLog b/ChangeLog
index 753dc12d3..53b5ce0c4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -9,6 +9,16 @@
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.
+
+2007-01-08 Diego Escalante Urrelo <diegoe@svn.gnome.org>
+
* data/glade/form-signing-dialog.glade:
* data/glade/prefs-dialog.glade:
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;
diff --git a/src/bookmarks/ephy-bookmarks-editor.c b/src/bookmarks/ephy-bookmarks-editor.c
index 5d637c080..b10a87bb2 100644
--- a/src/bookmarks/ephy-bookmarks-editor.c
+++ b/src/bookmarks/ephy-bookmarks-editor.c
@@ -1366,7 +1366,7 @@ ephy_bookmarks_editor_update_menu (EphyBookmarksEditor *editor)
EphyNode *node = selected->data;
char name[EPHY_BOOKMARK_ACTION_NAME_BUFFER_SIZE];
- g_return_if_fail (node != NULL);
+ if (node == NULL) return;
mutable = !ephy_node_get_property_boolean (node, EPHY_NODE_BMK_PROP_IMMUTABLE);