tree_select_row vs. select_row




I want to catch a double click in a ctree, so what I wanted to do was
something like this:

void
foo_select_row (GtkWidget *pt, GList *row, gint col, GdkEvent *ev)
{
  if (ev->type == GDK_2BUTTON_PRESS) {
    /* do clever stuff */
  }
}

gtk_signal_connect (GTK_OBJECT (pt), "tree_select_row",
                    GTK_SIGNAL_FUNC (foo_select_row), NULL);


but to my horror I discover that the tree_select_row signal has
prototype:

  void (*tree_select_row)   (GtkCTree *ctree,
                             GList    *row,
                             gint      column);

Bummer! Now I need to catch the clist 'select_row' signal instead, to
get the event.


Why is the event not in the tree_select_row signal?  This is, IMHO a
Bad Thing.  It would be nice if tree_select_row behaved like
select_row (except for the row parameter).

Is there any good reason not to parse the event as a parameter?

/mailund



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