mirror of
https://github.com/processing/processing4.git
synced 2026-06-16 04:26:26 +02:00
fix more fake bold, version detection code that should not be there, other cleanups
This commit is contained in:
@@ -491,27 +491,9 @@ public class ContributionListPanel extends JPanel implements Scrollable, Contrib
|
||||
|
||||
public void filterLibraries(List<Contribution> filteredContributions) {
|
||||
synchronized (panelByContribution) {
|
||||
/*Set<Contribution> hiddenPanels =
|
||||
new TreeSet<Contribution>(contribListing.getComparator());
|
||||
hiddenPanels.addAll(panelByContribution.keySet());
|
||||
|
||||
for (Contribution info : filteredContributions) {
|
||||
ContributionPanel panel = panelByContribution.get(info);
|
||||
if (panel != null) {
|
||||
panel.setVisible(true);
|
||||
hiddenPanels.remove(info);
|
||||
}
|
||||
}
|
||||
|
||||
for (Contribution info : hiddenPanels) {
|
||||
ContributionPanel panel = panelByContribution.get(info);
|
||||
if (panel != null) {
|
||||
panel.setVisible(false);
|
||||
}
|
||||
}*/
|
||||
TreeSet<Contribution> panelInThisTab = new TreeSet<Contribution>(contribListing.getComparator());
|
||||
for (Contribution contribution : filteredContributions) {
|
||||
if(contribution.getType() == this.contributionTab.contributionType){
|
||||
if(contribution.getType() == this.contributionTab.contributionType) {
|
||||
panelInThisTab.add(contribution);
|
||||
}
|
||||
}
|
||||
@@ -522,11 +504,11 @@ public class ContributionListPanel extends JPanel implements Scrollable, Contrib
|
||||
|
||||
protected void setSelectedPanel(ContributionPanel contributionPanel) {
|
||||
contributionTab.updateStatusPanel(contributionPanel);
|
||||
|
||||
if (selectedPanel == contributionPanel) {
|
||||
selectedPanel.setSelected(true);
|
||||
|
||||
} else {
|
||||
|
||||
ContributionPanel lastSelected = selectedPanel;
|
||||
selectedPanel = contributionPanel;
|
||||
|
||||
|
||||
@@ -528,20 +528,6 @@ public class ContributionListing {
|
||||
return null;
|
||||
}
|
||||
return newestContrib.getPrettyVersion();
|
||||
/*
|
||||
String latestVersion = newestContrib.getPrettyVersion();
|
||||
if (latestVersion != null && !latestVersion.isEmpty()) {
|
||||
if (latestVersion.toLowerCase().startsWith("build")) // For Python mode
|
||||
return ("v" + latestVersion.substring(5, latestVersion.indexOf(','))
|
||||
.trim());
|
||||
else if (latestVersion.toLowerCase().startsWith("v")) // For ketai library
|
||||
return latestVersion;
|
||||
else
|
||||
return ("v" + latestVersion);
|
||||
}
|
||||
else
|
||||
return null;
|
||||
*/
|
||||
}
|
||||
|
||||
|
||||
@@ -556,36 +542,8 @@ public class ContributionListing {
|
||||
}
|
||||
|
||||
|
||||
// /**
|
||||
// * @return a lowercase string with all non-alphabetic characters removed
|
||||
// */
|
||||
// static protected String normalize(String s) {
|
||||
// return s.toLowerCase().replaceAll("^\\p{Lower}", "");
|
||||
// }
|
||||
|
||||
|
||||
// /**
|
||||
// * @return the proper, valid name of this category to be displayed in the UI
|
||||
// * (e.g. "Typography / Geometry"). "Unknown" if the category null.
|
||||
// */
|
||||
// static public String getCategory(String category) {
|
||||
// if (category == null) {
|
||||
// return "Unknown";
|
||||
// }
|
||||
// String normCatName = normalize(category);
|
||||
//
|
||||
// for (String validCatName : validCategories) {
|
||||
// String normValidCatName = normalize(validCatName);
|
||||
// if (normValidCatName.equals(normCatName)) {
|
||||
// return validCatName;
|
||||
// }
|
||||
// }
|
||||
// return category;
|
||||
// }
|
||||
|
||||
|
||||
ArrayList<AvailableContribution> parseContribList(File file) {
|
||||
ArrayList<AvailableContribution> outgoing = new ArrayList<AvailableContribution>();
|
||||
List<AvailableContribution> parseContribList(File file) {
|
||||
List<AvailableContribution> outgoing = new ArrayList<AvailableContribution>();
|
||||
|
||||
if (file != null && file.exists()) {
|
||||
String[] lines = PApplet.loadStrings(file);
|
||||
|
||||
@@ -454,26 +454,22 @@ class ContributionPanel extends JPanel {
|
||||
add(iconLabel, BorderLayout.WEST);
|
||||
}
|
||||
|
||||
// Avoid ugly synthesized bold
|
||||
Font boldFont = Toolkit.getSansFont(12, Font.BOLD);
|
||||
String fontFace = "<font face=\"" + boldFont.getName() + "\">";
|
||||
|
||||
description = new StringBuilder();
|
||||
description.append("<html><body><b>");
|
||||
description.append("<html><body>" + fontFace);
|
||||
if (contrib.getUrl() == null) {
|
||||
description.append(contrib.getName());
|
||||
} else {
|
||||
description.append("<a href=\"" + contrib.getUrl() + "\">" + contrib.getName() + "</a>");
|
||||
}
|
||||
description.append("</b> ");
|
||||
description.append("</font> ");
|
||||
|
||||
String version = contrib.getPrettyVersion();
|
||||
|
||||
// TODO this has no place here, we shouldn't be cleaning up contrib
|
||||
// information in the f*king GUI.
|
||||
if (version != null && !version.isEmpty()) {
|
||||
if (version.toLowerCase().startsWith("build")) // For Python mode
|
||||
description.append(version.substring(5, version.indexOf(',')).trim());
|
||||
else if (version.toLowerCase().startsWith("v")) // For ketai library
|
||||
description.append(version);
|
||||
else
|
||||
description.append(version);
|
||||
if (version != null) {
|
||||
description.append(version);
|
||||
}
|
||||
description.append(" <br/>");
|
||||
|
||||
|
||||
@@ -7,6 +7,8 @@ o the AST checker has better error message handling for those cases
|
||||
o and hitting Run replaces the useful error with something weird
|
||||
X https://github.com/processing/processing/issues/3408
|
||||
X not great because the error checker runs more slowly than your typing
|
||||
X SVG not highlighting as a keyword
|
||||
X https://github.com/processing/processing/issues/3752
|
||||
|
||||
manager
|
||||
X CM: Clicking item in Libraries list throws exception
|
||||
@@ -115,15 +117,20 @@ _ also change the revision in the "about processing" dialog
|
||||
_ https://github.com/processing/processing/issues/3665
|
||||
|
||||
|
||||
gui
|
||||
_ different design of squiggly line?
|
||||
_ build custom scroll bar since the OS versions are so ugly?
|
||||
_ error/warning location is awkward when no scroll bar is in use
|
||||
gui/3 final
|
||||
_ show hover text when the mouse is over the 'debug' button
|
||||
_ show number of updates available in the footer
|
||||
_ https://github.com/processing/processing/issues/3518
|
||||
_ finish the gui
|
||||
_ https://github.com/processing/processing/issues/3072
|
||||
|
||||
|
||||
gui
|
||||
_ different design of squiggly line?
|
||||
_ build custom scroll bar since the OS versions are so ugly?
|
||||
_ error/warning location is awkward when no scroll bar is in use
|
||||
_ when only one screen-full, show ticks at exact location
|
||||
_ simpler/less confusing to not show at all?
|
||||
_ see notes in the 'dialogs' section below, implement our own option panes?
|
||||
_ tiny trail of dots when moving the selection bar up/down on retina
|
||||
_ need 'actively pressed' version of 'play' and 'stop'
|
||||
@@ -141,27 +148,28 @@ _ rather than post-compile
|
||||
_ https://github.com/processing/processing/issues/136
|
||||
|
||||
|
||||
gui/low
|
||||
_ welcome screen tweaks
|
||||
_ click "show this welcome" text to check/uncheck the box
|
||||
_ submit the form (as if 'get started' clicked) when closing the window
|
||||
_ whether hitting ESC or the close box on the window
|
||||
|
||||
|
||||
manager
|
||||
_ scrolling "past" top/bottom causes the screen to jiggle
|
||||
_ total number of updates available is not correct
|
||||
_ implement 2x versions of icons
|
||||
_ https://github.com/processing/processing/issues/3478
|
||||
_ foundation icon in list
|
||||
_ foundation icon below next to description when lib selected
|
||||
_ icons on the install/update/remove buttons
|
||||
_ search eyeglass icon
|
||||
_
|
||||
_ fix bold version used in the description below, when an item is selected
|
||||
|
||||
_ scrolling "past" top/bottom causes the screen to jiggle (OS X and Trackpad)
|
||||
_ total number of updates available is not correct
|
||||
_ Examples window closes and re-opens during library install/remove
|
||||
_ https://github.com/processing/processing/issues/3304
|
||||
|
||||
|
||||
gui/low
|
||||
_ welcome screen tweaks
|
||||
_ click "show this welcome" text to check/uncheck the box
|
||||
_ submit the form (as if 'get started' clicked) when closing the window
|
||||
_ whether hitting ESC or the close box on the window
|
||||
|
||||
|
||||
fonts
|
||||
_ fonts are still really ugly (on non-retina)
|
||||
_ may need to drop use of Source Sans
|
||||
@@ -917,6 +925,8 @@ _ this may already work with SingleInstance stuff
|
||||
|
||||
DIST / Mac OS X
|
||||
|
||||
|
||||
_ built-in images: http://nadeausoftware.com/articles/2008/12/mac_java_tip_how_access_mac_specific_nsimage_icons
|
||||
_ replace appbundler with the Java 8 packager
|
||||
_ https://github.com/processing/processing/issues/3071
|
||||
_ fix appbundler problems due to rollback
|
||||
|
||||
Reference in New Issue
Block a user