gtk_widget_event()



I'm trying to make a double-click on certain locations
equivalent to clicking the "OK" button in a window.

I had thought to do this by using gtk_signal_emit_by_name() in
the doubleclick callback to simulate a click on "OK", but it
seems this is the wrong thing to do (actually it has something
of the intended effect but obviously causes a mess, as seen in a
ton of warnings!)

I gather the right thing is to construct an appropriate GdkEvent
and pass it to gtk_widget_event() along with a pointer to the OK
button.  But I'm having trouble getting the event right.  Can
anyone tell me legitimate values for the "state" and "button"
fields in the GdkEventButton struct?

Specifically, I've got as far as making the OK button look
pressed momentarily by double-clicking, but the callback is
failing to invoke the "click" event for the button and I suspect
that's because my artificial event isn't quite right.

-- 
Allin Cottrell
Department of Economics
Wake Forest University, NC





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