added gtk_tree_view_expand_to_path.
Tue Jun 4 21:13:57 2002 Kristian Rietveld <kris@gtk.org> * gtk/gtktreeview.[ch]: added gtk_tree_view_expand_to_path.
This commit is contained in:

committed by
Kristian Rietveld

parent
f39b189d5c
commit
0219cc38d4
@ -1,3 +1,7 @@
|
||||
Tue Jun 4 21:13:57 2002 Kristian Rietveld <kris@gtk.org>
|
||||
|
||||
* gtk/gtktreeview.[ch]: added gtk_tree_view_expand_to_path.
|
||||
|
||||
Tue Jun 4 19:24:41 2002 Kristian Rietveld <kris@gtk.org>
|
||||
|
||||
Discussed in #76249.
|
||||
|
@ -1,3 +1,7 @@
|
||||
Tue Jun 4 21:13:57 2002 Kristian Rietveld <kris@gtk.org>
|
||||
|
||||
* gtk/gtktreeview.[ch]: added gtk_tree_view_expand_to_path.
|
||||
|
||||
Tue Jun 4 19:24:41 2002 Kristian Rietveld <kris@gtk.org>
|
||||
|
||||
Discussed in #76249.
|
||||
|
@ -1,3 +1,7 @@
|
||||
Tue Jun 4 21:13:57 2002 Kristian Rietveld <kris@gtk.org>
|
||||
|
||||
* gtk/gtktreeview.[ch]: added gtk_tree_view_expand_to_path.
|
||||
|
||||
Tue Jun 4 19:24:41 2002 Kristian Rietveld <kris@gtk.org>
|
||||
|
||||
Discussed in #76249.
|
||||
|
@ -1,3 +1,7 @@
|
||||
Tue Jun 4 21:13:57 2002 Kristian Rietveld <kris@gtk.org>
|
||||
|
||||
* gtk/gtktreeview.[ch]: added gtk_tree_view_expand_to_path.
|
||||
|
||||
Tue Jun 4 19:24:41 2002 Kristian Rietveld <kris@gtk.org>
|
||||
|
||||
Discussed in #76249.
|
||||
|
@ -1,3 +1,7 @@
|
||||
Tue Jun 4 21:13:57 2002 Kristian Rietveld <kris@gtk.org>
|
||||
|
||||
* gtk/gtktreeview.[ch]: added gtk_tree_view_expand_to_path.
|
||||
|
||||
Tue Jun 4 19:24:41 2002 Kristian Rietveld <kris@gtk.org>
|
||||
|
||||
Discussed in #76249.
|
||||
|
@ -1,3 +1,7 @@
|
||||
Tue Jun 4 21:13:57 2002 Kristian Rietveld <kris@gtk.org>
|
||||
|
||||
* gtk/gtktreeview.[ch]: added gtk_tree_view_expand_to_path.
|
||||
|
||||
Tue Jun 4 19:24:41 2002 Kristian Rietveld <kris@gtk.org>
|
||||
|
||||
Discussed in #76249.
|
||||
|
@ -8800,6 +8800,40 @@ gtk_tree_view_collapse_all (GtkTreeView *tree_view)
|
||||
gtk_tree_path_free (path);
|
||||
}
|
||||
|
||||
/**
|
||||
* gtk_tree_view_expand_to_path:
|
||||
* @tree_view: A #GtkTreeView.
|
||||
* @path: path to a row.
|
||||
*
|
||||
* Expands the row at @path. This will also expand all parent rows of
|
||||
* @path as necessary.
|
||||
**/
|
||||
void
|
||||
gtk_tree_view_expand_to_path (GtkTreeView *tree_view,
|
||||
GtkTreePath *path)
|
||||
{
|
||||
gint i, depth;
|
||||
gint *indices;
|
||||
GtkTreePath *tmp;
|
||||
|
||||
g_return_if_fail (GTK_IS_TREE_VIEW (tree_view));
|
||||
g_return_if_fail (path != NULL);
|
||||
|
||||
depth = gtk_tree_path_get_depth (path);
|
||||
indices = gtk_tree_path_get_indices (path);
|
||||
|
||||
tmp = gtk_tree_path_new ();
|
||||
g_return_if_fail (tmp != NULL);
|
||||
|
||||
for (i = 0; i < depth; i++)
|
||||
{
|
||||
gtk_tree_path_append_index (path, indices[i]);
|
||||
gtk_tree_view_expand_row (tree_view, path, FALSE);
|
||||
}
|
||||
|
||||
gtk_tree_path_free (path);
|
||||
}
|
||||
|
||||
/* FIXME the bool return values for expand_row and collapse_row are
|
||||
* not analagous; they should be TRUE if the row had children and
|
||||
* was not already in the requested state.
|
||||
|
@ -201,6 +201,8 @@ void gtk_tree_view_row_activated (GtkTreeView
|
||||
GtkTreeViewColumn *column);
|
||||
void gtk_tree_view_expand_all (GtkTreeView *tree_view);
|
||||
void gtk_tree_view_collapse_all (GtkTreeView *tree_view);
|
||||
void gtk_tree_view_expand_to_path (GtkTreeView *tree_view,
|
||||
GtkTreePath *path);
|
||||
gboolean gtk_tree_view_expand_row (GtkTreeView *tree_view,
|
||||
GtkTreePath *path,
|
||||
gboolean open_all);
|
||||
|
Reference in New Issue
Block a user