Skip to content

Commit 00adca2

Browse files
committed
change download location for contribs listing
1 parent 82d551f commit 00adca2

1 file changed

Lines changed: 31 additions & 31 deletions

File tree

app/src/processing/app/contrib/ContributionListing.java

Lines changed: 31 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1616
GNU General Public License for more details.
1717
18-
You should have received a copy of the GNU General Public License along
18+
You should have received a copy of the GNU General Public License along
1919
with this program; if not, write to the Free Software Foundation, Inc.
2020
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
2121
*/
@@ -31,11 +31,11 @@
3131

3232

3333
public class ContributionListing {
34-
static final String LISTING_URL =
35-
"https://raw.github.com/processing/processing-web/master/contrib_generate/contributions.txt";
34+
static final String LISTING_URL =
35+
"http://processing.org/contrib_generate/contributions.txt"
3636

3737
static ContributionListing singleInstance;
38-
38+
3939
File listingFile;
4040
ArrayList<ContributionChangeListener> listeners;
4141
ArrayList<AvailableContribution> advertisedContributions;
@@ -45,9 +45,9 @@ public class ContributionListing {
4545
ReentrantLock downloadingListingLock;
4646

4747
static final String[] validCategories = {
48-
"3D", "Animation", "Compilations", "Data", "Geometry", "GUI",
48+
"3D", "Animation", "Compilations", "Data", "Geometry", "GUI",
4949
"Hardware", "I/O", "Math", "Simulation", "Sound", "Typography",
50-
"Utilities", "Video & Vision"
50+
"Utilities", "Video & Vision"
5151
};
5252

5353

@@ -85,7 +85,7 @@ void setAdvertisedList(File file) {
8585
Collections.sort(allContributions, nameComparator);
8686
}
8787

88-
88+
8989
/**
9090
* Adds the installed libraries to the listing of libraries, replacing any
9191
* pre-existing libraries by the same name as one in the list.
@@ -132,7 +132,7 @@ private void addContribution(Contribution contribution) {
132132
List<Contribution> list = librariesByCategory.get(contribution.getCategory());
133133
list.add(contribution);
134134
Collections.sort(list, nameComparator);
135-
135+
136136
} else {
137137
ArrayList<Contribution> list = new ArrayList<Contribution>();
138138
list.add(contribution);
@@ -155,7 +155,7 @@ protected void removeContribution(Contribution info) {
155155

156156
private Contribution getContribution(Contribution contribution) {
157157
for (Contribution c : allContributions) {
158-
if (c.getName().equals(contribution.getName()) &&
158+
if (c.getName().equals(contribution.getName()) &&
159159
c.getType() == contribution.getType()) {
160160
return c;
161161
}
@@ -166,15 +166,15 @@ private Contribution getContribution(Contribution contribution) {
166166

167167
protected AvailableContribution getAvailableContribution(Contribution info) {
168168
for (AvailableContribution advertised : advertisedContributions) {
169-
if (advertised.getType() == info.getType() &&
169+
if (advertised.getType() == info.getType() &&
170170
advertised.getName().equals(info.getName())) {
171171
return advertised;
172172
}
173173
}
174174
return null;
175175
}
176176

177-
177+
178178
protected Set<String> getCategories(ContributionFilter filter) {
179179
Set<String> outgoing = new HashSet<String>();
180180

@@ -194,20 +194,20 @@ protected Set<String> getCategories(ContributionFilter filter) {
194194
return outgoing;
195195
}
196196

197-
197+
198198
// public List<Contribution> getAllContributions() {
199199
// return new ArrayList<Contribution>(allContributions);
200200
// }
201201

202-
202+
203203
// public List<Contribution> getLibararies(String category) {
204204
// ArrayList<Contribution> libinfos =
205205
// new ArrayList<Contribution>(librariesByCategory.get(category));
206206
// Collections.sort(libinfos, nameComparator);
207207
// return libinfos;
208208
// }
209209

210-
210+
211211
protected List<Contribution> getFilteredLibraryList(String category, List<String> filters) {
212212
ArrayList<Contribution> filteredList = new ArrayList<Contribution>(allContributions);
213213

@@ -267,9 +267,9 @@ private boolean isProperty(String property) {
267267
}
268268

269269

270-
/**
270+
/**
271271
* Returns true if the contribution fits the given property, false otherwise.
272-
* If the property is invalid, returns false.
272+
* If the property is invalid, returns false.
273273
*/
274274
private boolean hasProperty(Contribution contrib, String property) {
275275
// update, updates, updatable, upgrade
@@ -318,29 +318,29 @@ private void notifyChange(Contribution oldLib, Contribution newLib) {
318318
}
319319
}
320320

321-
321+
322322
protected void addContributionListener(ContributionChangeListener listener) {
323323
for (Contribution contrib : allContributions) {
324324
listener.contributionAdded(contrib);
325325
}
326326
listeners.add(listener);
327327
}
328328

329-
329+
330330
/*
331331
private void removeContributionListener(ContributionChangeListener listener) {
332332
listeners.remove(listener);
333333
}
334334
335-
335+
336336
private ArrayList<ContributionChangeListener> getContributionListeners() {
337337
return new ArrayList<ContributionChangeListener>(listeners);
338338
}
339339
*/
340340

341-
341+
342342
/**
343-
* Starts a new thread to download the advertised list of contributions.
343+
* Starts a new thread to download the advertised list of contributions.
344344
* Only one instance will run at a time.
345345
*/
346346
protected void downloadAvailableList(final ProgressMonitor progress) {
@@ -367,8 +367,8 @@ public void run() {
367367
}
368368
}).start();
369369
}
370-
371-
370+
371+
372372
boolean hasUpdates() {
373373
for (Contribution info : allContributions) {
374374
if (hasUpdates(info)) {
@@ -390,20 +390,20 @@ boolean hasUpdates(Contribution contribution) {
390390
return false;
391391
}
392392

393-
393+
394394
boolean hasDownloadedLatestList() {
395395
return hasDownloadedLatestList;
396396
}
397397

398-
398+
399399
/**
400400
* @return a lowercase string with all non-alphabetic characters removed
401401
*/
402402
static protected String normalize(String s) {
403403
return s.toLowerCase().replaceAll("^\\p{Lower}", "");
404404
}
405405

406-
406+
407407
/**
408408
* @return the proper, valid name of this category to be displayed in the UI
409409
* (e.g. "Typography / Geometry"). "Unknown" if the category null.
@@ -423,7 +423,7 @@ static public String getCategory(String category) {
423423
return category;
424424
}
425425

426-
426+
427427
ArrayList<AvailableContribution> parseContribList(File file) {
428428
ArrayList<AvailableContribution> outgoing = new ArrayList<AvailableContribution>();
429429

@@ -454,7 +454,7 @@ ArrayList<AvailableContribution> parseContribList(File file) {
454454

455455
HashMap<String,String> contribParams = new HashMap<String,String>();
456456
Base.readSettings(file.getName(), contribLines, contribParams);
457-
457+
458458
outgoing.add(new AvailableContribution(contribType, contribParams));
459459
start = end + 1;
460460
// } else {
@@ -465,17 +465,17 @@ ArrayList<AvailableContribution> parseContribList(File file) {
465465
return outgoing;
466466
}
467467

468-
468+
469469
// boolean isDownloadingListing() {
470470
// return downloadingListingLock.isLocked();
471471
// }
472472

473-
473+
474474
public Comparator<? super Contribution> getComparator() {
475475
return nameComparator;
476476
}
477477

478-
478+
479479
static Comparator<Contribution> nameComparator = new Comparator<Contribution>() {
480480
public int compare(Contribution o1, Contribution o2) {
481481
return o1.getName().toLowerCase().compareTo(o2.getName().toLowerCase());

0 commit comments

Comments
 (0)