From fe5082c2c9ad8899ccabe8df6443a8d35af37bf3 Mon Sep 17 00:00:00 2001 From: Akarshit Wal Date: Fri, 18 Sep 2015 13:14:01 +0530 Subject: [PATCH] Revert "Revert "Update to a incompatible version is not possible"" This reverts commit 728a21a5571c82ea1eb94b141c2211f9306e06df. Conflicts: app/src/processing/app/contrib/StatusPanel.java --- .../processing/app/contrib/ContributionListing.java | 3 ++- app/src/processing/app/contrib/StatusPanel.java | 10 ++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/app/src/processing/app/contrib/ContributionListing.java b/app/src/processing/app/contrib/ContributionListing.java index ba2c3da1f..828272d06 100644 --- a/app/src/processing/app/contrib/ContributionListing.java +++ b/app/src/processing/app/contrib/ContributionListing.java @@ -515,7 +515,8 @@ public class ContributionListing { if (advertised == null) { return false; } - return advertised.getVersion() > contribution.getVersion(); + return advertised.getVersion() > contribution.getVersion() + && advertised.isCompatible(Base.getRevision()); } return false; } diff --git a/app/src/processing/app/contrib/StatusPanel.java b/app/src/processing/app/contrib/StatusPanel.java index 5f0dd70b4..60627ce27 100644 --- a/app/src/processing/app/contrib/StatusPanel.java +++ b/app/src/processing/app/contrib/StatusPanel.java @@ -242,6 +242,16 @@ class StatusPanel extends JPanel { contributionListing.getLatestVersion(panel.getContrib()); String currentVersion = panel.getContrib().getPrettyVersion(); + installButton.setEnabled(!panel.getContrib().isInstalled() + && contributionListing.hasDownloadedLatestList() + && panel.getContrib().isCompatible(Base.getRevision())); + + if (installButton.isEnabled()) { + updateLabel.setText(latestVersion + " available"); + } else { + updateLabel.setText(currentVersion + " installed"); + } + if (latestVersion != null) { latestVersion = "Update to " + latestVersion; } else {