| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -96,7 +96,7 @@ public Component prepareRenderer( | |||
| 96 | 96 | return c; | |
| 97 | 97 | } | |
| 98 | 98 | }; | |
| 99 | - | ||
| 99 | + | ||
| 100 | 100 | // There is a space before Status | |
| 101 | 101 | String[] colName = { " Status", "Name", "Author" }; | |
| 102 | 102 | dtm.setColumnIdentifiers(colName); | |
@@ -345,9 +345,11 @@ public Component getTableCellRendererComponent(JTable table, Object value, | |||
| 345 | 345 | label.setFont(ContributionManagerDialog.myFont); | |
| 346 | 346 | label.setOpaque(true); | |
| 347 | 347 | } else { | |
| 348 | - label = new JLabel( | ||
| 349 | - contribution.isSpecial() ? Toolkit | ||
| 350 | - .getLibIcon("icons/pde-16.png") : null); | ||
| 348 | + if (contribution.isSpecial()) { | ||
| 349 | + label = new JLabel(Toolkit.getLibIcon("icons/foundation-16.png")); | ||
| 350 | + } else { | ||
| 351 | + label = new JLabel(); | ||
| 352 | + } | ||
| 351 | 353 | String authorList = contribution.getAuthorList(); | |
| 352 | 354 | String name = getAuthorNameWithoutMarkup(authorList); | |
| 353 | 355 | label.setText(name.toString()); | |
@@ -379,7 +381,7 @@ public Class<?> getColumnClass(int columnIndex) { | |||
| 379 | 381 | return Contribution.class; | |
| 380 | 382 | } | |
| 381 | 383 | } | |
| 382 | - | ||
| 384 | + | ||
| 383 | 385 | String getAuthorNameWithoutMarkup(String authorList) { | |
| 384 | 386 | StringBuilder name = new StringBuilder(""); | |
| 385 | 387 | if (authorList != null) { | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -68,9 +68,9 @@ static boolean download(URL source, byte[] post, | |||
| 68 | 68 | if (post == null) { | |
| 69 | 69 | conn.setRequestMethod("GET"); | |
| 70 | 70 | conn.connect(); | |
| 71 | + | ||
| 71 | 72 | } else { | |
| 72 | 73 | post = gzipEncode(post); | |
| 73 | - | ||
| 74 | 74 | conn.setRequestMethod("POST"); | |
| 75 | 75 | conn.setRequestProperty("Content-Type", "application/x-www-form-urlencoded"); | |
| 76 | 76 | conn.setRequestProperty("Content-Encoding", "gzip"); | |
@@ -597,8 +597,8 @@ public boolean accept(File folder) { | |||
| 597 | 597 | static private void updateFlagged(Base base, File root) throws Exception { | |
| 598 | 598 | File[] markedForUpdate = root.listFiles(new FileFilter() { | |
| 599 | 599 | public boolean accept(File folder) { | |
| 600 | - return (folder.isDirectory() && LocalContribution | ||
| 601 | - .isUpdateFlagged(folder)); | ||
| 600 | + return (folder.isDirectory() && | ||
| 601 | + LocalContribution.isUpdateFlagged(folder)); | ||
| 602 | 602 | } | |
| 603 | 603 | }); | |
| 604 | 604 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -447,8 +447,8 @@ public void setContribution(Contribution contrib) { | |||
| 447 | 447 | this.contrib = contrib; | |
| 448 | 448 | ||
| 449 | 449 | if (contrib.isSpecial()) { | |
| 450 | - ImageIcon processingIcon = Toolkit.getLibIcon("icons/pde-48.png"); | ||
| 451 | - JLabel iconLabel = new JLabel(processingIcon); | ||
| 450 | + JLabel iconLabel = | ||
| 451 | + new JLabel(Toolkit.getLibIcon("icons/foundation-32.png")); // was 48? | ||
| 452 | 452 | iconLabel.setBorder(new EmptyBorder(4, 7, 7, 7)); | |
| 453 | 453 | iconLabel.setVerticalAlignment(SwingConstants.TOP); | |
| 454 | 454 | add(iconLabel, BorderLayout.WEST); | |
@@ -462,7 +462,7 @@ public void setContribution(Contribution contrib) { | |||
| 462 | 462 | description.append("<a href=\"" + contrib.getUrl() + "\">" + contrib.getName() + "</a>"); | |
| 463 | 463 | } | |
| 464 | 464 | description.append("</b> "); | |
| 465 | - | ||
| 465 | + | ||
| 466 | 466 | String version = contrib.getPrettyVersion(); | |
| 467 | 467 | ||
| 468 | 468 | // TODO this has no place here, we shouldn't be cleaning up contrib | |
@@ -476,7 +476,7 @@ else if (version.toLowerCase().startsWith("v")) // For ketai library | |||
| 476 | 476 | description.append(version); | |
| 477 | 477 | } | |
| 478 | 478 | description.append(" <br/>"); | |
| 479 | - | ||
| 479 | + | ||
| 480 | 480 | String authorList = contrib.getAuthorList(); | |
| 481 | 481 | if (authorList != null && !authorList.isEmpty()) { | |
| 482 | 482 | description.append(toHtmlLinks(contrib.getAuthorList())); | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -29,7 +29,6 @@ | |||
| 29 | 29 | ||
| 30 | 30 | import javax.swing.GroupLayout; | |
| 31 | 31 | import javax.swing.Icon; | |
| 32 | - import javax.swing.ImageIcon; | ||
| 33 | 32 | import javax.swing.JButton; | |
| 34 | 33 | import javax.swing.JLabel; | |
| 35 | 34 | import javax.swing.JPanel; | |
@@ -44,6 +43,7 @@ | |||
| 44 | 43 | import processing.app.Base; | |
| 45 | 44 | import processing.app.Platform; | |
| 46 | 45 | ||
| 46 | + | ||
| 47 | 47 | class StatusPanel extends JPanel { | |
| 48 | 48 | static final int BUTTON_WIDTH = 150; | |
| 49 | 49 | ||
@@ -216,24 +216,22 @@ void clear() { | |||
| 216 | 216 | } | |
| 217 | 217 | ||
| 218 | 218 | public void update(ContributionPanel panel) { | |
| 219 | - | ||
| 220 | 219 | progressBarPanel.removeAll(); | |
| 221 | 220 | ||
| 221 | + Icon icon = null; | ||
| 222 | 222 | if (panel.getContrib().isSpecial()) { | |
| 223 | - Icon contribIcon = new ImageIcon(Toolkit.getLibImage("/icons/pde-48.png")); | ||
| 224 | - iconLabel.setIcon(contribIcon); | ||
| 225 | - } else { | ||
| 226 | - iconLabel.setIcon(null); | ||
| 223 | + icon = Toolkit.getLibIcon("icons/foundation-32.png"); // was 48? | ||
| 227 | 224 | } | |
| 225 | + iconLabel.setIcon(icon); | ||
| 228 | 226 | label.setText(panel.description.toString()); | |
| 229 | 227 | ((HTMLDocument)label.getDocument()).getStyleSheet().addRule(bodyRule); | |
| 230 | 228 | ||
| 231 | 229 | updateButton.setEnabled(contributionListing.hasDownloadedLatestList() | |
| 232 | 230 | && (contributionListing.hasUpdates(panel.getContrib()) && !panel | |
| 233 | 231 | .getContrib().isUpdateFlagged())); | |
| 234 | 232 | ||
| 235 | - String latestVersion = contributionListing.getLatestVersion(panel | ||
| 236 | - .getContrib()); | ||
| 233 | + String latestVersion = | ||
| 234 | + contributionListing.getLatestVersion(panel.getContrib()); | ||
| 237 | 235 | String currentVersion = panel.getContrib().getPrettyVersion(); | |
| 238 | 236 | ||
| 239 | 237 | if (latestVersion != null) { | |
| Back | FazBrowse Home | New Git URL |
0 commit comments