From: <aki...@us...> - 2011-11-17 06:01:19
|
Revision: 9109 http://gridarta.svn.sourceforge.net/gridarta/?rev=9109&view=rev Author: akirschbaum Date: 2011-11-17 06:01:12 +0000 (Thu, 17 Nov 2011) Log Message: ----------- Ignore "enable updates" setting for builds without valid update URLs. Modified Paths: -------------- trunk/atrinik/ChangeLog trunk/crossfire/ChangeLog trunk/daimonin/ChangeLog trunk/src/app/net/sf/gridarta/updater/UpdaterManager.java Modified: trunk/atrinik/ChangeLog =================================================================== --- trunk/atrinik/ChangeLog 2011-11-13 08:45:19 UTC (rev 9108) +++ trunk/atrinik/ChangeLog 2011-11-17 06:01:12 UTC (rev 9109) @@ -1,3 +1,10 @@ +2011-11-17 Andreas Kirschbaum + + * Ignore "enable updates" setting for builds without valid update + URLs. This prevents possbile errors 'Error while updating: + java.net.MalformedURLException: no protocol: Please Update + manually.' + 2011-11-12 Andreas Kirschbaum * Implement Edit|Find... which searches the current map. Relocate Modified: trunk/crossfire/ChangeLog =================================================================== --- trunk/crossfire/ChangeLog 2011-11-13 08:45:19 UTC (rev 9108) +++ trunk/crossfire/ChangeLog 2011-11-17 06:01:12 UTC (rev 9109) @@ -1,3 +1,10 @@ +2011-11-17 Andreas Kirschbaum + + * Ignore "enable updates" setting for builds without valid update + URLs. This prevents possbile errors 'Error while updating: + java.net.MalformedURLException: no protocol: Please Update + manually.' + 2011-11-12 Andreas Kirschbaum * Implement Edit|Find... which searches the current map. Relocate Modified: trunk/daimonin/ChangeLog =================================================================== --- trunk/daimonin/ChangeLog 2011-11-13 08:45:19 UTC (rev 9108) +++ trunk/daimonin/ChangeLog 2011-11-17 06:01:12 UTC (rev 9109) @@ -1,3 +1,10 @@ +2011-11-17 Andreas Kirschbaum + + * Ignore "enable updates" setting for builds without valid update + URLs. This prevents possbile errors 'Error while updating: + java.net.MalformedURLException: no protocol: Please Update + manually.' + 2011-11-12 Andreas Kirschbaum * Implement Edit|Find... which searches the current map. Relocate Modified: trunk/src/app/net/sf/gridarta/updater/UpdaterManager.java =================================================================== --- trunk/src/app/net/sf/gridarta/updater/UpdaterManager.java 2011-11-13 08:45:19 UTC (rev 9108) +++ trunk/src/app/net/sf/gridarta/updater/UpdaterManager.java 2011-11-17 06:01:12 UTC (rev 9109) @@ -98,6 +98,11 @@ private final String updateFileName; /** + * Whether an update URL is defined. + */ + private final boolean hasUpdateURL; + + /** * Creates a new instance. * @param exiter the exiter for terminating the application * @param mapManager the map manager to use @@ -112,14 +117,15 @@ final Action aUpdate = ActionUtils.newAction(ACTION_BUILDER, "Tool", this, "update"); final CharSequence propUrl = ACTION_BUILDER.getString("update.url"); - aUpdate.setEnabled(propUrl != null && propUrl.length() > 0); + hasUpdateURL = propUrl != null && propUrl.length() > 0; + aUpdate.setEnabled(hasUpdateURL); } /** * Eventually perform an update during startup. */ public void startup() { - if (!preferences.getBoolean(AUTO_CHECK_KEY, AUTO_CHECK_DEFAULT)) { + if (!hasUpdateURL || !preferences.getBoolean(AUTO_CHECK_KEY, AUTO_CHECK_DEFAULT)) { return; } final long timeDifference = UPDATE_TIMES[preferences.getInt(INTERVAL_KEY, INTERVAL_DEFAULT)]; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |