FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

new foundation icons and other cleaning · 2php/processing@41aecc0 · GitHub

Repository navigation

Commit 41aecc0

Browse files
committed
new foundation icons and other cleaning
1 parent 15ee534 commit 41aecc0

7 files changed

Lines changed: 20 additions & 20 deletions

File tree

‎app/src/processing/app/contrib/ContributionListPanel.java‎

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ public Component prepareRenderer(
9696
return c;
9797
}
9898
};
99-
99+
100100
// There is a space before Status
101101
String[] colName = { " Status", "Name", "Author" };
102102
dtm.setColumnIdentifiers(colName);
@@ -345,9 +345,11 @@ public Component getTableCellRendererComponent(JTable table, Object value,
345345
label.setFont(ContributionManagerDialog.myFont);
346346
label.setOpaque(true);
347347
} 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+
}
351353
String authorList = contribution.getAuthorList();
352354
String name = getAuthorNameWithoutMarkup(authorList);
353355
label.setText(name.toString());
@@ -379,7 +381,7 @@ public Class<?> getColumnClass(int columnIndex) {
379381
return Contribution.class;
380382
}
381383
}
382-
384+
383385
String getAuthorNameWithoutMarkup(String authorList) {
384386
StringBuilder name = new StringBuilder("");
385387
if (authorList != null) {

‎app/src/processing/app/contrib/ContributionManager.java‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,9 +68,9 @@ static boolean download(URL source, byte[] post,
6868
if (post == null) {
6969
conn.setRequestMethod("GET");
7070
conn.connect();
71+
7172
} else {
7273
post = gzipEncode(post);
73-
7474
conn.setRequestMethod("POST");
7575
conn.setRequestProperty("Content-Type", "application/x-www-form-urlencoded");
7676
conn.setRequestProperty("Content-Encoding", "gzip");
@@ -597,8 +597,8 @@ public boolean accept(File folder) {
597597
static private void updateFlagged(Base base, File root) throws Exception {
598598
File[] markedForUpdate = root.listFiles(new FileFilter() {
599599
public boolean accept(File folder) {
600-
return (folder.isDirectory() && LocalContribution
601-
.isUpdateFlagged(folder));
600+
return (folder.isDirectory() &&
601+
LocalContribution.isUpdateFlagged(folder));
602602
}
603603
});
604604

‎app/src/processing/app/contrib/ContributionPanel.java‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -447,8 +447,8 @@ public void setContribution(Contribution contrib) {
447447
this.contrib = contrib;
448448

449449
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?
452452
iconLabel.setBorder(new EmptyBorder(4, 7, 7, 7));
453453
iconLabel.setVerticalAlignment(SwingConstants.TOP);
454454
add(iconLabel, BorderLayout.WEST);
@@ -462,7 +462,7 @@ public void setContribution(Contribution contrib) {
462462
description.append("<a href=\"" + contrib.getUrl() + "\">" + contrib.getName() + "</a>");
463463
}
464464
description.append("</b> ");
465-
465+
466466
String version = contrib.getPrettyVersion();
467467

468468
// 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
476476
description.append(version);
477477
}
478478
description.append(" <br/>");
479-
479+
480480
String authorList = contrib.getAuthorList();
481481
if (authorList != null && !authorList.isEmpty()) {
482482
description.append(toHtmlLinks(contrib.getAuthorList()));

‎app/src/processing/app/contrib/StatusPanel.java‎

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@
2929

3030
import javax.swing.GroupLayout;
3131
import javax.swing.Icon;
32-
import javax.swing.ImageIcon;
3332
import javax.swing.JButton;
3433
import javax.swing.JLabel;
3534
import javax.swing.JPanel;
@@ -44,6 +43,7 @@
4443
import processing.app.Base;
4544
import processing.app.Platform;
4645

46+
4747
class StatusPanel extends JPanel {
4848
static final int BUTTON_WIDTH = 150;
4949

@@ -216,24 +216,22 @@ void clear() {
216216
}
217217

218218
public void update(ContributionPanel panel) {
219-
220219
progressBarPanel.removeAll();
221220

221+
Icon icon = null;
222222
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?
227224
}
225+
iconLabel.setIcon(icon);
228226
label.setText(panel.description.toString());
229227
((HTMLDocument)label.getDocument()).getStyleSheet().addRule(bodyRule);
230228

231229
updateButton.setEnabled(contributionListing.hasDownloadedLatestList()
232230
&& (contributionListing.hasUpdates(panel.getContrib()) && !panel
233231
.getContrib().isUpdateFlagged()));
234232

235-
String latestVersion = contributionListing.getLatestVersion(panel
236-
.getContrib());
233+
String latestVersion =
234+
contributionListing.getLatestVersion(panel.getContrib());
237235
String currentVersion = panel.getContrib().getPrettyVersion();
238236

239237
if (latestVersion != null) {
203 Bytes
LoadingViewer requires iframe.
354 Bytes
LoadingViewer requires iframe.
651 Bytes
LoadingViewer requires iframe.

0 commit comments

Comments
 (0)

Back | FazBrowse Home | New Git URL