File tree Expand file tree Collapse file tree 2 files changed +18
-3
lines changed
app/src/processing/app/contrib Expand file tree Collapse file tree 2 files changed +18
-3
lines changed Original file line number Diff line number Diff line change @@ -87,6 +87,11 @@ class ContributionPanel extends JPanel {
8787 */
8888 private Contribution contrib ;
8989
90+ public Contribution getContrib () {
91+ return contrib ;
92+ }
93+
94+
9095 private boolean alreadySelected ;
9196 private boolean enableHyperlinks ;
9297 private HyperlinkListener conditionalHyperlinkOpener ;
@@ -103,7 +108,7 @@ class ContributionPanel extends JPanel {
103108 private ActionListener installActionListener ;
104109 private ActionListener undoActionListener ;
105110
106- private boolean isUpdateInProgress ;
111+ boolean isUpdateInProgress ;
107112 private boolean isInstallInProgress ;
108113 private boolean isRemoveInProgress ;
109114
@@ -188,8 +193,8 @@ public void mousePressed(MouseEvent e) {
188193 if (contrib .isCompatible (Base .getRevision ())) {
189194 listPanel .setSelectedPanel (ContributionPanel .this );
190195 } else {
191- final String msg = contrib .getName () +
192- " is not compatible with this version of Processing" ;
196+ final String msg = contrib .getName ()
197+ + " is not compatible with this version of Processing" ;
193198 listPanel .contributionTab .statusPanel .setErrorMessage (msg );
194199 }
195200 }
Original file line number Diff line number Diff line change @@ -166,6 +166,16 @@ void clear() {
166166 public void update (ContributionPanel panel ) {
167167
168168 label .setText (panel .description .toString ());
169+
170+ updateButton .setEnabled (!contributionListing .hasListDownloadFailed ()
171+ && (contributionListing .hasUpdates (panel .getContrib ()) && !panel
172+ .getContrib ().isUpdateFlagged ()));
173+
174+ installButton .setEnabled (!panel .getContrib ().isInstalled () && !contributionListing .hasListDownloadFailed ());
175+
176+ removeButton .setEnabled (panel .getContrib ().isInstalled ());
177+ // reorganizePaneComponents();
178+
169179 }
170180}
171181
You can’t perform that action at this time.
0 commit comments