Changeset 12766 in josm for trunk/src/org/openstreetmap/josm/gui
- Timestamp:
- 2017-09-07T00:41:30+02:00 (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/MainApplication.java
r12760 r12766 8 8 import java.awt.Dimension; 9 9 import java.awt.GraphicsEnvironment; 10 import java.awt.GridBagLayout; 10 11 import java.awt.event.KeyEvent; 11 12 import java.io.File; … … 48 49 import javax.swing.InputMap; 49 50 import javax.swing.JComponent; 51 import javax.swing.JLabel; 50 52 import javax.swing.JOptionPane; 53 import javax.swing.JPanel; 51 54 import javax.swing.KeyStroke; 52 55 import javax.swing.LookAndFeel; … … 80 83 import org.openstreetmap.josm.data.osm.DataSet; 81 84 import org.openstreetmap.josm.data.osm.OsmPrimitive; 85 import org.openstreetmap.josm.data.osm.UserInfo; 82 86 import org.openstreetmap.josm.data.osm.search.SearchMode; 83 87 import org.openstreetmap.josm.data.validation.OsmValidator; … … 107 111 import org.openstreetmap.josm.gui.util.RedirectInputMap; 108 112 import org.openstreetmap.josm.gui.util.WindowGeometry; 113 import org.openstreetmap.josm.gui.widgets.UrlLabel; 109 114 import org.openstreetmap.josm.io.CertificateAmendment; 110 115 import org.openstreetmap.josm.io.DefaultProxySelector; … … 122 127 import org.openstreetmap.josm.plugins.PluginInformation; 123 128 import org.openstreetmap.josm.tools.FontsManager; 129 import org.openstreetmap.josm.tools.GBC; 124 130 import org.openstreetmap.josm.tools.HttpClient; 125 131 import org.openstreetmap.josm.tools.I18n; … … 968 974 969 975 static void setupCallbacks() { 976 MessageNotifier.setNotifierCallback(MainApplication::notifyNewMessages); 970 977 DeleteCommand.setDeletionCallback(DeleteAction.defaultDeletionCallback); 971 978 } … … 1307 1314 } 1308 1315 } 1316 1317 static void notifyNewMessages(UserInfo userInfo) { 1318 GuiHelper.runInEDT(() -> { 1319 JPanel panel = new JPanel(new GridBagLayout()); 1320 panel.add(new JLabel(trn("You have {0} unread message.", "You have {0} unread messages.", 1321 userInfo.getUnreadMessages(), userInfo.getUnreadMessages())), 1322 GBC.eol()); 1323 panel.add(new UrlLabel(Main.getBaseUserUrl() + '/' + userInfo.getDisplayName() + "/inbox", 1324 tr("Click here to see your inbox.")), GBC.eol()); 1325 panel.setOpaque(false); 1326 new Notification().setContent(panel) 1327 .setIcon(JOptionPane.INFORMATION_MESSAGE) 1328 .setDuration(Notification.TIME_LONG) 1329 .show(); 1330 }); 1331 } 1309 1332 }
Note: See TracChangeset
for help on using the changeset viewer.