mirror of
https://github.com/processing/processing4.git
synced 2026-06-16 04:26:26 +02:00
Merge pull request #3817 from Akarshit/CM-ButtonTwice
Buttons disabled when clicked
This commit is contained in:
@@ -96,6 +96,7 @@ class StatusPanel extends JPanel {
|
||||
|
||||
@Override
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
installButton.setEnabled(false);
|
||||
ContributionPanel currentPanel = contributionTab.contributionListPanel
|
||||
.getSelectedPanel();
|
||||
currentPanel.install();
|
||||
@@ -119,6 +120,7 @@ class StatusPanel extends JPanel {
|
||||
|
||||
@Override
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
updateButton.setEnabled(false);
|
||||
ContributionPanel currentPanel = contributionTab.contributionListPanel
|
||||
.getSelectedPanel();
|
||||
currentPanel.update();
|
||||
@@ -136,6 +138,7 @@ class StatusPanel extends JPanel {
|
||||
|
||||
@Override
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
removeButton.setEnabled(false);
|
||||
ContributionPanel currentPanel = contributionTab.contributionListPanel
|
||||
.getSelectedPanel();
|
||||
currentPanel.remove();
|
||||
@@ -232,7 +235,8 @@ class StatusPanel extends JPanel {
|
||||
|
||||
updateButton.setEnabled(contributionListing.hasDownloadedLatestList()
|
||||
&& (contributionListing.hasUpdates(panel.getContrib()) && !panel
|
||||
.getContrib().isUpdateFlagged()));
|
||||
.getContrib().isUpdateFlagged())
|
||||
&& !panel.isUpdateInProgress);
|
||||
|
||||
String latestVersion =
|
||||
contributionListing.getLatestVersion(panel.getContrib());
|
||||
@@ -240,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");
|
||||
@@ -264,8 +269,8 @@ class StatusPanel extends JPanel {
|
||||
updateButton.setText("Update");
|
||||
}
|
||||
|
||||
|
||||
removeButton.setEnabled(panel.getContrib().isInstalled());
|
||||
removeButton.setEnabled(panel.getContrib().isInstalled()
|
||||
&& !panel.isRemoveInProgress);
|
||||
progressBarPanel.add(panel.installProgressBar);
|
||||
progressBarPanel.setVisible(false);
|
||||
updateLabel.setVisible(true);
|
||||
|
||||
@@ -328,7 +328,6 @@ public class UpdateContributionTab extends ContributionTab {
|
||||
updateButton.addActionListener(new ActionListener() {
|
||||
@Override
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
// TODO Auto-generated method stub
|
||||
for(ContributionPanel contributionPanel : contributionTab.contributionListPanel.panelByContribution.values()){
|
||||
contributionPanel.update();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user