mirror of
https://github.com/arduino/Arduino.git
synced 2024-12-01 12:24:14 +01:00
nicer port entry
This commit is contained in:
parent
ae852f8ab1
commit
8bc15c8c04
@ -1005,8 +1005,8 @@ public class Editor extends JFrame implements RunnerListener {
|
||||
}
|
||||
|
||||
for (Map.Entry<String, Map<String, Object>> entry : base.getBoardsViaNetwork().entrySet()) {
|
||||
Inet4Address[] a = (Inet4Address[]) entry.getValue().get("addresses");
|
||||
String label = entry.getKey() + "@" + a[0].toString();
|
||||
Inet4Address[] addresses = (Inet4Address[]) entry.getValue().get("addresses");
|
||||
String label = addresses[0].getHostAddress() + " (" + entry.getKey() + ")";
|
||||
JCheckBoxMenuItem rbMenuItem = new JCheckBoxMenuItem(label, label.equals(Preferences.get("serial.port")));
|
||||
rbMenuItem.addActionListener(new SerialMenuListener(label));
|
||||
serialMenu.add(rbMenuItem);
|
||||
|
Loading…
Reference in New Issue
Block a user