X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Fnet%2Fpterodactylus%2Fjsite%2Fgui%2FNodeLabel.java;h=46e8be1186b81744da97450b2a5d1e0df5682f05;hb=d3717de303befe6ba591106ee2b240b8a4fab243;hp=ca3bbfd5326c763950a24df5d466750228a07098;hpb=119b109fd29f4efa4756cef4daa43398d22cf7a0;p=jSite2.git diff --git a/src/net/pterodactylus/jsite/gui/NodeLabel.java b/src/net/pterodactylus/jsite/gui/NodeLabel.java index ca3bbfd..46e8be1 100644 --- a/src/net/pterodactylus/jsite/gui/NodeLabel.java +++ b/src/net/pterodactylus/jsite/gui/NodeLabel.java @@ -34,6 +34,7 @@ import javax.swing.SwingConstants; import javax.swing.border.EtchedBorder; import net.pterodactylus.jsite.core.Node; +import net.pterodactylus.jsite.i18n.I18n; import net.pterodactylus.jsite.i18n.I18nable; import net.pterodactylus.jsite.i18n.gui.I18nLabel; @@ -89,6 +90,7 @@ public class NodeLabel extends JLabel implements PropertyChangeListener, MouseLi this.offlineIcon = offlineIcon; this.errorIcon = errorIcon; initComponents(); + node.addPropertyChangeListener(this); } // @@ -161,9 +163,10 @@ public class NodeLabel extends JLabel implements PropertyChangeListener, MouseLi if (propertyChangeEvent.getSource() != node) { return; } - if (propertyChangeEvent.getPropagationId().equals(Node.PROPERTY_NAME)) { + if (propertyChangeEvent.getPropertyName().equals(Node.PROPERTY_NAME)) { setText(node.getName()); - menuLabel.updateI18n(); + /* TODO - find way to get around this hack */ + menuLabel.setText(I18n.get("mainWindow.statusBar.nodeLabel.name", node.getName())); } }