Since the method is called everywhere with the following parameters
isReadOnly(
BaseNoGui.librariesIndexer.getInstalledLibraries(),
BaseNoGui.getExamplesPath())
)
the static calls to BaseNoGui have been inlined into isReadOnly()
removing all the duplications around.
User testing on skilled devs showed that "buttons appear on click" behaviour is far from being understood.
Accessibility features (like moving with Arrow keys) should be untouched.
Still not a perfect solution; two compilation outputs will mix up anyway.
A major refactor should be needed to avoid using System.out anywhere and inverse multiplexing the streams so they can be muted or replicated on any Console.
This commit makes the Preferences dialog more usable by accessibility devices like screen readers.
Previously, a screen reader would only read the content of the text boxes. By using JLabel's setLabelFor() feature (and in some extreme cases, setAccessibleName()), a screen reader will know that a label is assigned to a text field. For example, instead of just reading "12", it will now read "Editor font size: 12".
This commit adds the Menu+Shift+I shortcut to the remaining menu entry in Base.java.
When the shortcut is called, the menu entry from Base.java is the one that will be called.
Please note that this commit actually adds the shortcut to its menu
entry under the "Tools" menu.
As a side effect, the shortcut tip is only shown in this entry and not
on the another one.
Menu usually means the Ctrl key on most modern systems.
This duplicates the entry, so now "Manage Libraries..." is available
in both under the "Tools" menu and inside the "Sketch" -> "Include
Library" menu.
The reasons for this change are:
- It makes sense for the entry to be there
- It makes easier for the user to click on the entry
Aditionally, I added a comment about a issue I found with the
newJMenuItemShift function on Xubuntu 17.04 regarding the Ctrl+Shift+K
shortcut.
In menu Sketch/Include Library/ library types (Arduino|Recommended|Contributed) are not translated into selected «Editor language» although types are translated in .po files.
There could be a couple of edge cases in this approach (for example, if someone wants to keep the serial monitor window only half visible).
However, it should be at least safe (no serial monitors on the second screen) if the Window Manager acts correctly (by moving all the windows on the second monitor to the primary on detach).