gEDA-dev: Patches attached to fix new_page on spacebar bug
(#1552778)
Peter Clifton
pcjc2 at cam.ac.uk
Tue Sep 5 14:14:51 EDT 2006
Either of these patches fixes the bug logged in sourceforge today.
The toolbar widgets were becoming focused, and getting "activated" when
the user pressed "Spacebar".
Two approaches to fix this:
1. cvs_geda.new_page_bug.patch
(I think this is the better approach and patch)
Set the drawing area which gschem draws in to be focusable, then grab
the focus on it. Attach key-press events to the drawing-area, rather
than the main window.
Results:
Key-bindings work by default, toolbar isn't keyboard accessible until
"TAB" key is pressed to change focus. At this point, the toobar has
keyboard focus, and the individual elements can be selected by the
keyboard.
Due to moving the key-press events to the drawing-area, the left-right
keys used to move between toobar items don't pan the schematic whilst
using the keyboard to focus toolbar items as it did before.
Possible disadvatage:
Users can de-focus the drawing area with the "TAB" key, and this
de-activates their keybindings until they "TAB" back to it.
2. cvs_geda.new_page_bug.alt.patch
(More messy patch by the nature of the fix)
remove the CAN_FOCUS flag from each toolbar button as we add it. By
leaving no toobar-buttons focusable, key presses such as "SPACEBAR" no
longer activate any of the buttons.
I hope that one of these patches can be applied before the release. I
prefer the first (cvs_geda.new_page_bug.patch), as it is a more
generally applicable solution to the problem of other controls being
focused whilst keybindings are active.
Regards
Peter Clifton
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cvs_geda.new_page_bug.patch
Type: text/x-patch
Size: 1437 bytes
Desc: not available
Url : http://www.seul.org/pipermail/geda-dev/attachments/20060905/3aa58e96/cvs_geda.new_page_bug.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cvs_geda.new_page_bug.alt.patch
Type: text/x-patch
Size: 6334 bytes
Desc: not available
Url : http://www.seul.org/pipermail/geda-dev/attachments/20060905/3aa58e96/cvs_geda.new_page_bug.alt.bin
More information about the geda-dev
mailing list