Re: clist signal select_row repetition



k_wayne linuxpower org wrote:

hi everyone,

A quick question about the clist select_row signal. I have a function
catching it but it appears to get called more than once...

I connect the signal as follows:

  gtk_signal_connect(GTK_OBJECT(wid), "select_row",
                       GTK_SIGNAL_FUNC(blah), NULL);

Then in function blah:
gint  blah (GtkWidget *clist, gint row, gint column, GdkEventButton *event,
gpointer data)

 /* Check for double click */
  if (event != NULL && event->button == 1 && event->type == 
GDK_2BUTTON_PRESS) {
        g_print("double click!\n");
 ....

Try using this instead:

if (event->button.type == GDK_2BUTTON_PRESS)
{
        ...
}


-Josh




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