mirror of
https://github.com/processing/processing4.git
synced 2026-06-16 04:26:26 +02:00
Buttons working as desired
This commit is contained in:
@@ -87,6 +87,11 @@ class ContributionPanel extends JPanel {
|
||||
*/
|
||||
private Contribution contrib;
|
||||
|
||||
public Contribution getContrib() {
|
||||
return contrib;
|
||||
}
|
||||
|
||||
|
||||
private boolean alreadySelected;
|
||||
private boolean enableHyperlinks;
|
||||
private HyperlinkListener conditionalHyperlinkOpener;
|
||||
@@ -103,7 +108,7 @@ class ContributionPanel extends JPanel {
|
||||
private ActionListener installActionListener;
|
||||
private ActionListener undoActionListener;
|
||||
|
||||
private boolean isUpdateInProgress;
|
||||
boolean isUpdateInProgress;
|
||||
private boolean isInstallInProgress;
|
||||
private boolean isRemoveInProgress;
|
||||
|
||||
@@ -188,8 +193,8 @@ class ContributionPanel extends JPanel {
|
||||
if (contrib.isCompatible(Base.getRevision())) {
|
||||
listPanel.setSelectedPanel(ContributionPanel.this);
|
||||
} else {
|
||||
final String msg = contrib.getName() +
|
||||
" is not compatible with this version of Processing";
|
||||
final String msg = contrib.getName()
|
||||
+ " is not compatible with this version of Processing";
|
||||
listPanel.contributionTab.statusPanel.setErrorMessage(msg);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -166,6 +166,16 @@ class StatusPanel extends JPanel {
|
||||
public void update(ContributionPanel panel) {
|
||||
|
||||
label.setText(panel.description.toString());
|
||||
|
||||
updateButton.setEnabled(!contributionListing.hasListDownloadFailed()
|
||||
&& (contributionListing.hasUpdates(panel.getContrib()) && !panel
|
||||
.getContrib().isUpdateFlagged()));
|
||||
|
||||
installButton.setEnabled(!panel.getContrib().isInstalled() && !contributionListing.hasListDownloadFailed());
|
||||
|
||||
removeButton.setEnabled(panel.getContrib().isInstalled());
|
||||
// reorganizePaneComponents();
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user