ctree - node from row number



One of the things missing in ctree is a way of finding the node by row
number. I propose the following:

GtkCTreeNode*
gtk_ctree_node_for_row(GtkCTree *ctree, gint row)
{

g_return_val_if_fail (ctree != NULL, NULL);
  g_return_val_if_fail
(GTK_IS_CTREE (ctree), NULL);

  if ((row < 0) || (row >= GTK_CLIST(
ctree)->rows))
    return NULL;
  
  return GTK_CTREE_NODE
(g_list_nth(GTK_CLIST (ctree)->row_list, row));
}



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]