Ticket #1795: josm-1795-updatecheck.2.patch
File josm-1795-updatecheck.2.patch, 1022 bytes (added by , 15 years ago) |
---|
-
src/org/openstreetmap/josm/Main.java
267 267 { 268 268 long tim = System.currentTimeMillis(); 269 269 long last = Main.pref.getLong("pluginmanager.lastupdate", 0); 270 Integer maxTime = Main.pref.getInteger("pluginmanager.warntime", 30 *24*60*60);270 Integer maxTime = Main.pref.getInteger("pluginmanager.warntime", 30); 271 271 if(last <= 0) 272 272 { 273 273 Main.pref.put("pluginmanager.lastupdate",Long.toString(tim)); … … 272 272 { 273 273 Main.pref.put("pluginmanager.lastupdate",Long.toString(tim)); 274 274 } 275 else if(tim - last >= maxTime*1000 *24*60*60)275 else if(tim - last >= maxTime*1000l*24*60*60) 276 276 { 277 long d = (tim - last)/(24*60*60*1000 );277 long d = (tim - last)/(24*60*60*1000l); 278 278 JOptionPane.showMessageDialog(Main.parent, tr("Last plugin update more than {0} days ago.", d)); 279 279 } 280 280 }