When changing keyboard shortcuts in the Window Manager settings dialog, pressing RETURN to change the shortcut causes the shortcut to be set to RETURN.
I thought I would find this quite straightforward, but I was wrong. I am new to programming in Linux, and hence also new to GTK and Xfce. What I want to do is one of: 1) When calling g_signal_connect(...) in cb_activate_treeview{3,4} somehow wait until the key-release-event initiating the change has occured. I don't see a way to do this at all. 2) Bail out of cb_compose_dialog_key_release if event->keyval == GDK_Return and event->state == 0. I could not do this without cancelling the change entirely. or 3) Ignore any event in cb_compose_dialog_key_release where event->window is not the dialog. The two problems I see with this are: the same problem as in (2) above; and because releasing the initiating RETURN happens after the dialog is shown, event->window is the dialog anyways. (I'm not sure on this, but it seemed to be that way.) I may give this some more time this weekend. I have been reading the GTK API but did not find anything that helped me out. I think there must be an easy way to fix this, but I have nothing so far. I'm not even sure if I am on the right track. If you have any advice, I'd like to give this a few more shots. [Hrm, should be studying... but it's not nearly as fun as this. :) ]
in fact, it was due to the fact that the cb_compose_dialog_key_release intercepted the release of the Return key on the treeview, i changed to key-press-event and everything seems normal please test it... so you can study now ;p
I think changes have yet to propagate to anon cvs, however s/release/press in the 3 related funcs fixed it here, so yes the fix works. I guess I need to read up on key-release-event and key-press-event, since it seems to me like the press event would be triggered before the keys are released. I guess this is not so. Thanks for the quick fix! :) No studying this weekend, it's a long weekend here in Canada.