mirror of
https://github.com/processing/processing4.git
synced 2026-02-11 09:39:19 +01:00
new foundation icons and other cleaning
This commit is contained in:
@@ -96,7 +96,7 @@ public class ContributionListPanel extends JPanel implements Scrollable, Contrib
|
||||
return c;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
// There is a space before Status
|
||||
String[] colName = { " Status", "Name", "Author" };
|
||||
dtm.setColumnIdentifiers(colName);
|
||||
@@ -345,9 +345,11 @@ public class ContributionListPanel extends JPanel implements Scrollable, Contrib
|
||||
label.setFont(ContributionManagerDialog.myFont);
|
||||
label.setOpaque(true);
|
||||
} else {
|
||||
label = new JLabel(
|
||||
contribution.isSpecial() ? Toolkit
|
||||
.getLibIcon("icons/pde-16.png") : null);
|
||||
if (contribution.isSpecial()) {
|
||||
label = new JLabel(Toolkit.getLibIcon("icons/foundation-16.png"));
|
||||
} else {
|
||||
label = new JLabel();
|
||||
}
|
||||
String authorList = contribution.getAuthorList();
|
||||
String name = getAuthorNameWithoutMarkup(authorList);
|
||||
label.setText(name.toString());
|
||||
@@ -379,7 +381,7 @@ public class ContributionListPanel extends JPanel implements Scrollable, Contrib
|
||||
return Contribution.class;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
String getAuthorNameWithoutMarkup(String authorList) {
|
||||
StringBuilder name = new StringBuilder("");
|
||||
if (authorList != null) {
|
||||
|
||||
@@ -68,9 +68,9 @@ public class ContributionManager {
|
||||
if (post == null) {
|
||||
conn.setRequestMethod("GET");
|
||||
conn.connect();
|
||||
|
||||
} else {
|
||||
post = gzipEncode(post);
|
||||
|
||||
conn.setRequestMethod("POST");
|
||||
conn.setRequestProperty("Content-Type", "application/x-www-form-urlencoded");
|
||||
conn.setRequestProperty("Content-Encoding", "gzip");
|
||||
@@ -597,8 +597,8 @@ public class ContributionManager {
|
||||
static private void updateFlagged(Base base, File root) throws Exception {
|
||||
File[] markedForUpdate = root.listFiles(new FileFilter() {
|
||||
public boolean accept(File folder) {
|
||||
return (folder.isDirectory() && LocalContribution
|
||||
.isUpdateFlagged(folder));
|
||||
return (folder.isDirectory() &&
|
||||
LocalContribution.isUpdateFlagged(folder));
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
@@ -447,8 +447,8 @@ class ContributionPanel extends JPanel {
|
||||
this.contrib = contrib;
|
||||
|
||||
if (contrib.isSpecial()) {
|
||||
ImageIcon processingIcon = Toolkit.getLibIcon("icons/pde-48.png");
|
||||
JLabel iconLabel = new JLabel(processingIcon);
|
||||
JLabel iconLabel =
|
||||
new JLabel(Toolkit.getLibIcon("icons/foundation-32.png")); // was 48?
|
||||
iconLabel.setBorder(new EmptyBorder(4, 7, 7, 7));
|
||||
iconLabel.setVerticalAlignment(SwingConstants.TOP);
|
||||
add(iconLabel, BorderLayout.WEST);
|
||||
@@ -462,7 +462,7 @@ class ContributionPanel extends JPanel {
|
||||
description.append("<a href=\"" + contrib.getUrl() + "\">" + contrib.getName() + "</a>");
|
||||
}
|
||||
description.append("</b> ");
|
||||
|
||||
|
||||
String version = contrib.getPrettyVersion();
|
||||
|
||||
// TODO this has no place here, we shouldn't be cleaning up contrib
|
||||
@@ -476,7 +476,7 @@ class ContributionPanel extends JPanel {
|
||||
description.append(version);
|
||||
}
|
||||
description.append(" <br/>");
|
||||
|
||||
|
||||
String authorList = contrib.getAuthorList();
|
||||
if (authorList != null && !authorList.isEmpty()) {
|
||||
description.append(toHtmlLinks(contrib.getAuthorList()));
|
||||
|
||||
@@ -29,7 +29,6 @@ import java.awt.event.ActionListener;
|
||||
|
||||
import javax.swing.GroupLayout;
|
||||
import javax.swing.Icon;
|
||||
import javax.swing.ImageIcon;
|
||||
import javax.swing.JButton;
|
||||
import javax.swing.JLabel;
|
||||
import javax.swing.JPanel;
|
||||
@@ -44,6 +43,7 @@ import processing.app.ui.Toolkit;
|
||||
import processing.app.Base;
|
||||
import processing.app.Platform;
|
||||
|
||||
|
||||
class StatusPanel extends JPanel {
|
||||
static final int BUTTON_WIDTH = 150;
|
||||
|
||||
@@ -216,15 +216,13 @@ class StatusPanel extends JPanel {
|
||||
}
|
||||
|
||||
public void update(ContributionPanel panel) {
|
||||
|
||||
progressBarPanel.removeAll();
|
||||
|
||||
Icon icon = null;
|
||||
if (panel.getContrib().isSpecial()) {
|
||||
Icon contribIcon = new ImageIcon(Toolkit.getLibImage("/icons/pde-48.png"));
|
||||
iconLabel.setIcon(contribIcon);
|
||||
} else {
|
||||
iconLabel.setIcon(null);
|
||||
icon = Toolkit.getLibIcon("icons/foundation-32.png"); // was 48?
|
||||
}
|
||||
iconLabel.setIcon(icon);
|
||||
label.setText(panel.description.toString());
|
||||
((HTMLDocument)label.getDocument()).getStyleSheet().addRule(bodyRule);
|
||||
|
||||
@@ -232,8 +230,8 @@ class StatusPanel extends JPanel {
|
||||
&& (contributionListing.hasUpdates(panel.getContrib()) && !panel
|
||||
.getContrib().isUpdateFlagged()));
|
||||
|
||||
String latestVersion = contributionListing.getLatestVersion(panel
|
||||
.getContrib());
|
||||
String latestVersion =
|
||||
contributionListing.getLatestVersion(panel.getContrib());
|
||||
String currentVersion = panel.getContrib().getPrettyVersion();
|
||||
|
||||
if (latestVersion != null) {
|
||||
|
||||
Reference in New Issue
Block a user