From 8bc15c8c04eb40c557f614f8028605c02067eceb Mon Sep 17 00:00:00 2001 From: Federico Fissore Date: Fri, 5 Apr 2013 12:06:59 +0200 Subject: [PATCH] nicer port entry --- app/src/processing/app/Editor.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/processing/app/Editor.java b/app/src/processing/app/Editor.java index 4709d99fb..1dff6316f 100644 --- a/app/src/processing/app/Editor.java +++ b/app/src/processing/app/Editor.java @@ -1005,8 +1005,8 @@ public class Editor extends JFrame implements RunnerListener { } for (Map.Entry> 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);