mirror of
https://github.com/processing/processing4.git
synced 2026-02-03 21:59:20 +01:00
Removing repeated code
This commit is contained in:
@@ -244,7 +244,8 @@ class StatusPanel extends JPanel {
|
||||
|
||||
installButton.setEnabled(!panel.getContrib().isInstalled()
|
||||
&& contributionListing.hasDownloadedLatestList()
|
||||
&& panel.getContrib().isCompatible(Base.getRevision()));
|
||||
&& panel.getContrib().isCompatible(Base.getRevision())
|
||||
&& !panel.isInstallInProgress);
|
||||
|
||||
if (installButton.isEnabled()) {
|
||||
updateLabel.setText(latestVersion + " available");
|
||||
@@ -268,17 +269,6 @@ class StatusPanel extends JPanel {
|
||||
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()
|
||||
&& !panel.isRemoveInProgress);
|
||||
progressBarPanel.add(panel.installProgressBar);
|
||||
|
||||
Reference in New Issue
Block a user