diff --git a/app/src/processing/app/contrib/ContributionListing.java b/app/src/processing/app/contrib/ContributionListing.java index 828272d06b..ba2c3da1fb 100644 --- a/app/src/processing/app/contrib/ContributionListing.java +++ b/app/src/processing/app/contrib/ContributionListing.java @@ -515,8 +515,7 @@ boolean hasUpdates(Contribution contribution) { if (advertised == null) { return false; } - return advertised.getVersion() > contribution.getVersion() - && advertised.isCompatible(Base.getRevision()); + return advertised.getVersion() > contribution.getVersion(); } return false; } diff --git a/app/src/processing/app/contrib/StatusPanel.java b/app/src/processing/app/contrib/StatusPanel.java index a53777ac60..44465ae240 100644 --- a/app/src/processing/app/contrib/StatusPanel.java +++ b/app/src/processing/app/contrib/StatusPanel.java @@ -96,6 +96,7 @@ public void hyperlinkUpdate(HyperlinkEvent e) { @Override public void actionPerformed(ActionEvent e) { + installButton.setEnabled(false); ContributionPanel currentPanel = contributionTab.contributionListPanel .getSelectedPanel(); currentPanel.install(); @@ -119,6 +120,7 @@ public void actionPerformed(ActionEvent e) { @Override public void actionPerformed(ActionEvent e) { + updateButton.setEnabled(false); ContributionPanel currentPanel = contributionTab.contributionListPanel .getSelectedPanel(); currentPanel.update(); @@ -136,6 +138,7 @@ public void actionPerformed(ActionEvent e) { @Override public void actionPerformed(ActionEvent e) { + removeButton.setEnabled(false); ContributionPanel currentPanel = contributionTab.contributionListPanel .getSelectedPanel(); currentPanel.remove(); @@ -232,22 +235,12 @@ public void update(ContributionPanel panel) { updateButton.setEnabled(contributionListing.hasDownloadedLatestList() && (contributionListing.hasUpdates(panel.getContrib()) && !panel - .getContrib().isUpdateFlagged())); + .getContrib().isUpdateFlagged()) && !panel.isUpdateInProgress); String latestVersion = 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 { @@ -264,8 +257,19 @@ public void update(ContributionPanel panel) { updateButton.setText("Update"); } + installButton.setEnabled(!panel.getContrib().isInstalled() + && contributionListing.hasDownloadedLatestList() + && panel.getContrib().isCompatible(Base.getRevision()) + && !panel.isInstallInProgress); + + if (installButton.isEnabled()) { + updateLabel.setText(currentVersion + " available"); + } else { + updateLabel.setText(currentVersion + " installed"); + } - removeButton.setEnabled(panel.getContrib().isInstalled()); + removeButton.setEnabled(panel.getContrib().isInstalled() + && !panel.isRemoveInProgress); progressBarPanel.add(panel.installProgressBar); progressBarPanel.setVisible(false); updateLabel.setVisible(true);