mirror of
https://github.com/arduino/Arduino.git
synced 2025-02-26 20:54:22 +01:00
Show "Manage Libraries" item in the Tools menu too
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.
This commit is contained in:
parent
4a80f50d28
commit
d860c907bb
@ -731,16 +731,16 @@ public class Editor extends JFrame implements RunnerListener {
|
||||
|
||||
addInternalTools(toolsMenu);
|
||||
|
||||
JMenuItem item = newJMenuItemShift(tr("Serial Monitor"), 'M');
|
||||
JMenuItem item = new JMenuItem(tr("Manage Libraries..."));
|
||||
item.addActionListener(e -> base.openLibraryManager("", ""));
|
||||
toolsMenu.add(item);
|
||||
|
||||
item = newJMenuItemShift(tr("Serial Monitor"), 'M');
|
||||
item.addActionListener(e -> handleSerial());
|
||||
toolsMenu.add(item);
|
||||
|
||||
item = newJMenuItemShift(tr("Serial Plotter"), 'L');
|
||||
item.addActionListener(new ActionListener() {
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
handlePlotter();
|
||||
}
|
||||
});
|
||||
item.addActionListener(e -> handlePlotter());
|
||||
toolsMenu.add(item);
|
||||
|
||||
addTools(toolsMenu, BaseNoGui.getToolsFolder());
|
||||
@ -1476,6 +1476,7 @@ public class Editor extends JFrame implements RunnerListener {
|
||||
/**
|
||||
* Like newJMenuItem() but adds shift as a modifier for the key command.
|
||||
*/
|
||||
// Control + Shift + K seems to not be working on linux (Xubuntu 17.04, 2017-08-19)
|
||||
static public JMenuItem newJMenuItemShift(String title, int what) {
|
||||
JMenuItem menuItem = new JMenuItem(title);
|
||||
menuItem.setAccelerator(KeyStroke.getKeyStroke(what, SHORTCUT_KEY_MASK | ActionEvent.SHIFT_MASK));
|
||||
|
Loading…
x
Reference in New Issue
Block a user