Commit 0f05628c authored by Kristian Rietveld's avatar Kristian Rietveld

cvs got a broken pipe signal, missed these two. ChangeLog is already there.

parent 90d6349c
......@@ -651,6 +651,39 @@ gtk_tree_model_get_iter (GtkTreeModel *tree_model,
return (* GTK_TREE_MODEL_GET_IFACE (tree_model)->get_iter) (tree_model, iter, path);
}
/**
* gtk_tree_model_get_iter_from_string:
* @tree_model: A #GtkTreeModel.
* @iter: An uninitialized #GtkTreeIter.
* @path_string: A string representation of a #GtkTreePath.
*
* Sets @iter to a valid iterator pointing to @path_string, if it
* exists. Otherwise, @iter is left invalid and %FALSE is returned.
*
* Return value: TRUE, if @iter was set.
**/
gboolean
gtk_tree_model_get_iter_from_string (GtkTreeModel *tree_model,
GtkTreeIter *iter,
const gchar *path_string)
{
gboolean retval;
GtkTreePath *path;
g_return_val_if_fail (GTK_IS_TREE_MODEL (tree_model), FALSE);
g_return_val_if_fail (iter != NULL, FALSE);
g_return_val_if_fail (path_string != NULL, FALSE);
path = gtk_tree_path_new_from_string (path_string);
g_return_val_if_fail (path != NULL, FALSE);
retval = gtk_tree_model_get_iter (tree_model, iter, path);
gtk_tree_path_free (path);
return retval;
}
/**
* gtk_tree_model_get_iter_root:
......
......@@ -176,6 +176,9 @@ GType gtk_tree_model_get_column_type (GtkTreeModel *tree_model,
gboolean gtk_tree_model_get_iter (GtkTreeModel *tree_model,
GtkTreeIter *iter,
GtkTreePath *path);
gboolean gtk_tree_model_get_iter_from_string (GtkTreeModel *tree_model,
GtkTreeIter *iter,
const gchar *path_string);
gboolean gtk_tree_model_get_iter_root (GtkTreeModel *tree_model,
GtkTreeIter *iter);
GtkTreePath * gtk_tree_model_get_path (GtkTreeModel *tree_model,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment