Fix a bug in gtk hid which caused layer buttons to get confused (sourceforge bug...
commitd3449dfd68f6e751ffd760c0b7dcd96689b314d5
authorJared Casper <jaredcasper@gmail.com>
Wed, 21 Oct 2009 18:55:36 +0000 (21 19:55 +0100)
committerPeter Clifton <pcjc2@cam.ac.uk>
Wed, 21 Oct 2009 18:55:36 +0000 (21 19:55 +0100)
tree460c31bdd7ebd918773d2209efd95bf230bc7bb4
parentc200dd11f9c608a40db6e9894eafc34510aff220
Fix a bug in gtk hid which caused layer buttons to get confused (sourceforge bug 1988951)

In ghid_layer_enable_buttons_update, the layer_buttons array was being
indexed using a counter which stoped at the current max_layer, which
was wrong.  Changed this to use the constants LAYER_BUTTON_*.

Also made the handling of the silk and rats buttons match the
(slightly more correct) handling of the other buttons in
layer_enable_button_cb.
src/hid/gtk/gui-top-window.c