Re: Override some behavior of gtk_sheet_key_press



>I've added my handler like so:
>
>gtk_signal_connect(GTK_OBJECT(sheet), "key_press_event", (GtkSignalFunc) key_p
>ress_event_cb, NULL);
>
>But apparently gtk_sheet_key_press() is doing its thing before my handler.  Is
>there a way to have my handler called first and then pass on control for
>certain keys to the built-in handler?

within your handler:

   gtk_signal_emit_stop_by_name (GTK_OBJECT(sheet), "key_press_event");

for those keys that you don't want handled by the default handler. if
the archive was up, i'd point you to the half-dozen entries about this
that would be there. alternatively, i'd write a new FAQ entry. but
since this changes fairly significantly in GTK 1.3/2.0 so that this
kind of nonsense is no longer necessary, it doesn't seem worth it.

--p




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