Changeset 5145 in josm
- Timestamp:
- 2012-03-31T19:22:21+02:00 (13 years ago)
- Location:
- trunk/src/org/openstreetmap/josm
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/preferences/plugin/PluginUpdatePolicyPanel.java
r4310 r5145 22 22 import org.openstreetmap.josm.gui.JMultilineLabel; 23 23 import org.openstreetmap.josm.gui.widgets.SelectAllOnFocusGainedDecorator; 24 import org.openstreetmap.josm.plugins.PluginHandler; 24 25 25 26 /** … … 192 193 } 193 194 if (days <= 0) { 194 days = 60;195 days = PluginHandler.DEFAULT_TIME_BASED_UPDATE_INTERVAL; 195 196 } 196 197 } 197 198 if (days == 0) { 198 days = Main.pref.getInteger("pluginmanager.time-based-update.interval", 60);199 days = Main.pref.getInteger("pluginmanager.time-based-update.interval", PluginHandler.DEFAULT_TIME_BASED_UPDATE_INTERVAL); 199 200 } 200 201 tfUpdateInterval.setText(Integer.toString(days)); … … 230 231 days = Integer.parseInt(tfUpdateInterval.getText().trim()); 231 232 if (days <= 0) { 232 days = 60;233 days = PluginHandler.DEFAULT_TIME_BASED_UPDATE_INTERVAL; 233 234 } 234 235 } catch(NumberFormatException e) { 235 days = 60;236 days = PluginHandler.DEFAULT_TIME_BASED_UPDATE_INTERVAL; 236 237 } 237 238 Main.pref.putInteger("pluginmanager.time-based-update.interval", days); -
trunk/src/org/openstreetmap/josm/plugins/PluginHandler.java
r5121 r5145 145 145 146 146 final public static String [] UNMAINTAINED_PLUGINS = new String[] {"gpsbabelgui", "Intersect_way"}; 147 148 /** 149 * Default time-based update interval, in days (pluginmanager.time-based-update.interval) 150 */ 151 public static final int DEFAULT_TIME_BASED_UPDATE_INTERVAL = 30; 147 152 148 153 /** … … 268 273 long tim = System.currentTimeMillis(); 269 274 long last = Main.pref.getLong("pluginmanager.lastupdate", 0); 270 Integer maxTime = Main.pref.getInteger("pluginmanager.time-based-update.interval", 60);275 Integer maxTime = Main.pref.getInteger("pluginmanager.time-based-update.interval", DEFAULT_TIME_BASED_UPDATE_INTERVAL); 271 276 long d = (tim - last) / (24 * 60 * 60 * 1000l); 272 277 if ((last <= 0) || (maxTime <= 0)) {
Note:
See TracChangeset
for help on using the changeset viewer.