1
0
Fork 0
mirror of https://github.com/geometer/FBReaderJ.git synced 2025-10-04 02:09:35 +02:00

cleanup; language sorting

This commit is contained in:
Nikolay Pultsin 2010-12-02 12:35:05 +00:00
parent 3370d413fa
commit efcd60f48d
6 changed files with 181 additions and 176 deletions

View file

@ -114,7 +114,10 @@ public class NetworkLibrary {
}
public void setActiveLanguageCodes(Collection<String> codes) {
activeLanguageCodesOption().setValue(commaSeparatedString(codes));
final TreeSet<String> allCodes = new TreeSet<String>(ZLibrary.Instance().defaultLanguageCodes());
allCodes.removeAll(languageCodes());
allCodes.addAll(codes);
activeLanguageCodesOption().setValue(commaSeparatedString(allCodes));
}
private String commaSeparatedString(Collection<String> codes) {