Correct Goldleaf supported versions list
This commit is contained in:
parent
8348c9f2ab
commit
fa236cb1ad
4 changed files with 9 additions and 9 deletions
|
@ -29,7 +29,7 @@ public class AppPreferences {
|
|||
|
||||
private final Preferences preferences;
|
||||
private final Locale locale;
|
||||
public static final String[] goldleafSupportedVersions = {"v0.5", "v0.7.x", "v0.8-0.9", "v0.10"};
|
||||
public static final String[] GOLDLEAF_SUPPORTED_VERSIONS = {"v0.5", "v0.7.x", "v0.8-0.9", "v0.10+"};
|
||||
private static final Font DEFAULT_FONT = Font.getDefault();
|
||||
|
||||
private AppPreferences(){
|
||||
|
@ -42,13 +42,13 @@ public class AppPreferences {
|
|||
}
|
||||
|
||||
public String getTheme(){
|
||||
String theme = preferences.get("THEME", "/res/app_dark.css"); // Don't let user to change settings manually
|
||||
String theme = preferences.get("THEME", "/res/app_dark.css"); // Don't let user change settings manually
|
||||
if (!theme.matches("(^/res/app_dark.css$)|(^/res/app_light.css$)"))
|
||||
theme = "/res/app_dark.css";
|
||||
return theme;
|
||||
}
|
||||
public int getProtocol(){
|
||||
int protocolIndex = preferences.getInt("protocol_index", 0); // Don't let user to change settings manually
|
||||
int protocolIndex = preferences.getInt("protocol_index", 0); // Don't let user change settings manually
|
||||
if (protocolIndex < 0 || protocolIndex > 1)
|
||||
protocolIndex = 0;
|
||||
return protocolIndex;
|
||||
|
@ -56,7 +56,7 @@ public class AppPreferences {
|
|||
public void setProtocol(int protocolIndex){ preferences.putInt("protocol_index", protocolIndex); }
|
||||
|
||||
public String getNetUsb(){
|
||||
String netUsb = preferences.get("NETUSB", "USB"); // Don't let user to change settings manually
|
||||
String netUsb = preferences.get("NETUSB", "USB"); // Don't let user change settings manually
|
||||
if (!netUsb.matches("(^USB$)|(^NET$)"))
|
||||
netUsb = "USB";
|
||||
return netUsb;
|
||||
|
@ -120,7 +120,7 @@ public class AppPreferences {
|
|||
public void setNspFileFilterGL(boolean prop){preferences.putBoolean("GL_NSP_FILTER", prop);}
|
||||
|
||||
public int getGlVersion(){
|
||||
return preferences.getInt("gl_ver", goldleafSupportedVersions.length - 1);
|
||||
return preferences.getInt("gl_ver", GOLDLEAF_SUPPORTED_VERSIONS.length - 1);
|
||||
}
|
||||
public void setGlVersion(int version){ preferences.putInt("gl_ver", version);}
|
||||
|
||||
|
|
|
@ -38,7 +38,7 @@ public class SettingsBlockGoldleafController implements Initializable {
|
|||
final AppPreferences preferences = AppPreferences.getInstance();
|
||||
|
||||
nspFilesFilterForGLCB.setSelected(preferences.getNspFileFilterGL());
|
||||
glVersionChoiceBox.getItems().addAll(AppPreferences.goldleafSupportedVersions);
|
||||
glVersionChoiceBox.getItems().addAll(AppPreferences.GOLDLEAF_SUPPORTED_VERSIONS);
|
||||
|
||||
glVersionChoiceBox.getSelectionModel().select(preferences.getGlVersion());
|
||||
}
|
||||
|
|
|
@ -75,7 +75,7 @@ public class GoldLeafCli {
|
|||
private String getGlSupportedVersions(){
|
||||
StringBuilder builder = new StringBuilder("Supported versions: \n");
|
||||
|
||||
for (String a : AppPreferences.goldleafSupportedVersions){
|
||||
for (String a : AppPreferences.GOLDLEAF_SUPPORTED_VERSIONS){
|
||||
builder.append("\t");
|
||||
builder.append(a);
|
||||
builder.append("\n");
|
||||
|
@ -98,7 +98,7 @@ public class GoldLeafCli {
|
|||
"Try 'ns-usbloader -g help' for more information.");
|
||||
}
|
||||
|
||||
for (String version : AppPreferences.goldleafSupportedVersions){
|
||||
for (String version : AppPreferences.GOLDLEAF_SUPPORTED_VERSIONS){
|
||||
if (version.equals(goldLeafVersion))
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -66,7 +66,7 @@ public class UsbCommunications extends CancellableRunnable {
|
|||
case "TinFoil":
|
||||
module = new TinFoil(handler, nspMap, this, logPrinter);
|
||||
break;
|
||||
case "GoldLeafv0.10":
|
||||
case "GoldLeafv0.10+":
|
||||
module = new GoldLeaf_010(handler, nspMap, this, logPrinter, nspFilterForGl);
|
||||
break;
|
||||
case "GoldLeafv0.8-0.9":
|
||||
|
|
Loading…
Reference in a new issue