PCB said: >ghid_load_menus(): Mouse resources are currently ignored by the GTK HID. >Please feel free to submit a patch to implement this! I had some free time over the weekend and have been wanting to get my hands dirty in the PCB code so I took a crack at this and wanted to get some feedback. Attached is a patch with a detailed commit message of what I did, but the general idea was to move the lesstif hid's handling of the mouse resources into a common hid file (which I called hid_resource) and have the gtk hid use that instead of being hardcoded. This way the hid's are only responsible for catching the button press, determining which modifier keys were active, then calling the common code to handle it. The common code does what the lesstif hid does, calls the actions defined in the resource file. In theory more common stuff could be moved to hid_resource, the code to find and load the resource file, for example, is nearly identical in both hids. I changed up the Mouse resource in gpcb-menu.res to match the hardcoded behavior of the gtk hid as closely as possible (see the commit message for details). I've played around with it a bit and it seems to be working, but as this my first time meddling with the code, I'm sure I missed some stuff. If anybody has time to look it over and/or try it out that would be great. Comments regarding the approach, formatting, style, etc. are all appreciated (I did my best to match the style of the surrounding code). Jared
Attachment:
0001-Teaching-GTK-hid-to-use-mouse-resources.patch
Description: Binary data
_______________________________________________ geda-user mailing list geda-user@xxxxxxxxxxxxxx http://www.seul.org/cgi-bin/mailman/listinfo/geda-user