! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
Changing keyboard shortcuts with RETURN uses the RETURN as the shortcut
Status:
CLOSED: FIXED

Comments

Description Sami Samhuri 2004-10-07 02:51:17 CEST
When changing keyboard shortcuts in the Window Manager settings dialog, pressing
RETURN to change the shortcut causes the shortcut to be set to RETURN.
Comment 1 Sami Samhuri 2004-10-08 02:18:26 CEST
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. :) ]
Comment 2 Jean-François Wauthy editbugs 2004-10-09 19:17:01 CEST
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
Comment 3 Sami Samhuri 2004-10-09 20:38:09 CEST
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.

Bug #373

Reported by:
Sami Samhuri
Reported on: 2004-10-07
Last modified on: 2009-07-14

People

Assignee:
Jean-François Wauthy
CC List:
0 users

Version

Attachments

Additional information