Binding set problems



I'm implementing a widget for editing feature-structure grammars. I'm
trying to add key bindings to the widget, but am failing to get signals
for what should be key binding events.

1) The widget is sub-classed from GtkEventBox. It is a compound widget
which contains (primarily) a number of labels inside GtkHBox's.

2) I'm setting the CAN_FOCUS flag, and have overridden the focus_in and
focus_out events to draw a focused version (this works).

3) If I override key_press_event I can see that the widget is indeed
receiving key press events (normally I do not override this, so normally
the key_press_event is handled by GtkWidget, this was just to
demonstrate that I was receiving key press events).

4) When I do not have key_press_event overridden,
gtk_widget_real_key_press_event does get called, which in turn activates
the bindings for that event. Poking inside _gtk_bindings_activate_event
when, for example GDK_Delete is registered by my binding set, however
only shows GtkEntry registered for that key in the KeyHash. One
therefore might think that I'm adding new items to the binding set
wrong, however...

5) I do not receive the popup_menu signal when I override it in the
widget class. popup_menu is registered into the widgets binding set as
F10 in GtkWidget. Therefore it appears that *no* binding set
"registrations" are working, even those I did not register.

6) Even when I try to activate my own bindings, I'm just using
"gtk_binding_set_by_class" to get a reference and then calling
gtk_binding_entry_add_signal to register, e.g. GDK_Delete (and I've
tested to make sure I can emit the signal that I'm passing in there, so
the signal is working correctly I think)

I'm at my wit's end... I've been stuck on this for a few days now. Any
ideas or conjectures would be *really* appreciated. Its probably
something dumb I'm doing, but I can't imagine what.

-Seth




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