1
0
mirror of https://github.com/arduino/Arduino.git synced 2024-11-29 10:24:12 +01:00
Arduino/app
Matthijs Kooijman 2f5375d523 Fix accelerator keybindings for the tab menu
Some items in this menu had accelerator keys (shortcuts) defined.
Normally, this automatically takes care of registering such keybindings
when the menu item is added to a menu. However, this requires adding the
item (indirectly) to a menubar, which is again added to a window. Since
the tab menu is just a separate popup menu, this did not work.

It seems an attempt was made to fix this by adding the popup menu to the
EditorHeader JComponent, which indeed made the keybindings work.
However, this is a hack at best, and as soon as the popup menu was
opened, it would be moved to another container and again detached when
the menu was closed, breaking the keyboard shortcuts again (re-adding
the popup menu turned out not to work either, then the menu would
actually be drawn on top of the tab bar).

To properly fix this, keybindings for the menu items are added to the
EditorHeader itself. By looking at the existing accelerator keystroke
property of the actions, there is no need to duplicate the keystrokes
themselves, and the displayed value will always match the actually bound
value. To simplify this, some methods are added to the Keys helper
class, which will likely come in handy in other places as well.
2015-12-11 19:31:15 +01:00
..
.settings Updated eclipse project files 2015-06-25 12:47:38 +02:00
lib Installing tools from packager (eg: arduino) in packager folder, thus avoiding 2015-11-20 17:15:53 +01:00
src Fix accelerator keybindings for the tab menu 2015-12-11 19:31:15 +01:00
test Upgrading arduino-builder to 1.3.7, which changes the way messages are sent 2015-12-11 14:25:13 +01:00
test-lib added files that state third party licenses 2013-08-28 10:12:33 +02:00
.classpath Installing tools from packager (eg: arduino) in packager folder, thus avoiding 2015-11-20 17:15:53 +01:00
.classpath_macosx Got rid of ANTLR: we never used it 2015-08-10 09:35:47 +02:00
.editorconfig Added .editorconfig files http://editorconfig.org/ 2015-05-08 10:18:43 +02:00
.project Importing Processing rev. 5503 (1.0.3). 2009-05-31 15:53:33 +00:00
build.xml Added proxy PAC file support functions 2015-08-21 08:41:50 +02:00