aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/widgets/ephy-node-view.c19
-rw-r--r--lib/widgets/ephy-node-view.h4
2 files changed, 23 insertions, 0 deletions
diff --git a/lib/widgets/ephy-node-view.c b/lib/widgets/ephy-node-view.c
index abd1f0f41..1be6c93d0 100644
--- a/lib/widgets/ephy-node-view.c
+++ b/lib/widgets/ephy-node-view.c
@@ -1809,6 +1809,25 @@ ephy_node_view_popup (EphyNodeView *view, GtkWidget *menu)
}
}
+gboolean
+ephy_node_view_get_iter_for_node (EphyNodeView *view,
+ GtkTreeIter *iter,
+ EphyNode *node)
+{
+ GtkTreeIter node_iter, filter_iter;
+
+ ephy_tree_model_node_iter_from_node (EPHY_TREE_MODEL_NODE (view->priv->nodemodel), node, &node_iter);
+ if (!gtk_tree_model_filter_convert_child_iter_to_iter (GTK_TREE_MODEL_FILTER (view->priv->filtermodel),
+ &filter_iter, &node_iter))
+ return FALSE;
+
+ if (!gtk_tree_model_sort_convert_child_iter_to_iter (GTK_TREE_MODEL_SORT (view->priv->sortmodel),
+ iter, &filter_iter))
+ return FALSE;
+
+ return TRUE;
+}
+
static void
ephy_node_view_class_init (EphyNodeViewClass *klass)
{
diff --git a/lib/widgets/ephy-node-view.h b/lib/widgets/ephy-node-view.h
index 70f503991..423292593 100644
--- a/lib/widgets/ephy-node-view.h
+++ b/lib/widgets/ephy-node-view.h
@@ -129,6 +129,10 @@ gboolean ephy_node_view_is_target (EphyNodeView *view);
void ephy_node_view_popup (EphyNodeView *view,
GtkWidget *menu);
+gboolean ephy_node_view_get_iter_for_node (EphyNodeView *view,
+ GtkTreeIter *iter,
+ EphyNode *node);
+
G_END_DECLS
#if !defined (__EPHY_EPIPHANY_H_INSIDE__) && !defined (EPIPHANY_COMPILATION)