Validated using newest GoldLeaf v0.9 and works fine. Updated text, application preferences record, fxml, readme.
This commit is contained in:
parent
825af65ff2
commit
3f2e986aed
6 changed files with 11 additions and 15 deletions
|
@ -65,7 +65,7 @@ JDK 11 for MacOS and Linux
|
||||||
| v0.6 | none |
|
| v0.6 | none |
|
||||||
| v0.6.1 | v0.6 |
|
| v0.6.1 | v0.6 |
|
||||||
| v0.7 - 0.7.3 | v0.7+ |
|
| v0.7 - 0.7.3 | v0.7+ |
|
||||||
| v0.8 | v1.0+ |
|
| v0.8 - 0.9 | v1.0+ |
|
||||||
|
|
||||||
where '+' means 'any next NS-USBloader version'.
|
where '+' means 'any next NS-USBloader version'.
|
||||||
|
|
||||||
|
|
|
@ -27,7 +27,7 @@ public class AppPreferences {
|
||||||
|
|
||||||
private final Preferences preferences;
|
private final Preferences preferences;
|
||||||
private final Locale locale;
|
private final Locale locale;
|
||||||
public static final String[] goldleafSupportedVersions = {"v0.5", "v0.7.x", "v0.8"};
|
public static final String[] goldleafSupportedVersions = {"v0.5", "v0.7.x", "v0.8-0.9"};
|
||||||
|
|
||||||
private AppPreferences(){
|
private AppPreferences(){
|
||||||
this.preferences = Preferences.userRoot().node("NS-USBloader");
|
this.preferences = Preferences.userRoot().node("NS-USBloader");
|
||||||
|
@ -113,12 +113,10 @@ public class AppPreferences {
|
||||||
public boolean getNspFileFilterGL(){return preferences.getBoolean("GL_NSP_FILTER", false); }
|
public boolean getNspFileFilterGL(){return preferences.getBoolean("GL_NSP_FILTER", false); }
|
||||||
public void setNspFileFilterGL(boolean prop){preferences.putBoolean("GL_NSP_FILTER", prop);}
|
public void setNspFileFilterGL(boolean prop){preferences.putBoolean("GL_NSP_FILTER", prop);}
|
||||||
|
|
||||||
public String getGlVersion(){
|
public int getGlVersion(){
|
||||||
int recentGlVersionIndex = goldleafSupportedVersions.length - 1;
|
return preferences.getInt("gl_ver", goldleafSupportedVersions.length - 1);
|
||||||
String recentGlVersion = goldleafSupportedVersions[recentGlVersionIndex];
|
|
||||||
return preferences.get("gl_version", recentGlVersion);
|
|
||||||
}
|
}
|
||||||
public void setGlVersion(String version){ preferences.put("gl_version", version);}
|
public void setGlVersion(int version){ preferences.putInt("gl_ver", version);}
|
||||||
|
|
||||||
public double getSceneWidth(){ return preferences.getDouble("WIND_WIDTH", 850.0); }
|
public double getSceneWidth(){ return preferences.getDouble("WIND_WIDTH", 850.0); }
|
||||||
public void setSceneWidth(double value){ preferences.putDouble("WIND_WIDTH", value); }
|
public void setSceneWidth(double value){ preferences.putDouble("WIND_WIDTH", value); }
|
||||||
|
|
|
@ -53,6 +53,6 @@ public class SettingsBlockGoldleafController implements Initializable {
|
||||||
final AppPreferences preferences = AppPreferences.getInstance();
|
final AppPreferences preferences = AppPreferences.getInstance();
|
||||||
|
|
||||||
preferences.setNspFileFilterGL(getNSPFileFilterForGL());
|
preferences.setNspFileFilterGL(getNSPFileFilterForGL());
|
||||||
preferences.setGlVersion(getGlVer());
|
preferences.setGlVersion(glVersionChoiceBox.getSelectionModel().getSelectedIndex());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -103,7 +103,7 @@ class GoldLeaf_08 extends TransferModule {
|
||||||
|
|
||||||
this.nspFilterForGl = nspFilter;
|
this.nspFilterForGl = nspFilter;
|
||||||
|
|
||||||
print("============= GoldLeaf v0.8 =============\n\t" +
|
print("=========== GoldLeaf v0.8-0.9 ===========\n\t" +
|
||||||
"VIRT:/ equals files added into the application\n\t" +
|
"VIRT:/ equals files added into the application\n\t" +
|
||||||
"HOME:/ equals "
|
"HOME:/ equals "
|
||||||
+System.getProperty("user.home"), EMsgType.INFO);
|
+System.getProperty("user.home"), EMsgType.INFO);
|
||||||
|
|
|
@ -66,7 +66,7 @@ public class UsbCommunications extends CancellableRunnable {
|
||||||
case "TinFoil":
|
case "TinFoil":
|
||||||
module = new TinFoil(handler, nspMap, this, logPrinter);
|
module = new TinFoil(handler, nspMap, this, logPrinter);
|
||||||
break;
|
break;
|
||||||
case "GoldLeafv0.8":
|
case "GoldLeafv0.8-0.9":
|
||||||
module = new GoldLeaf_08(handler, nspMap, this, logPrinter, nspFilterForGl);
|
module = new GoldLeaf_08(handler, nspMap, this, logPrinter, nspFilterForGl);
|
||||||
break;
|
break;
|
||||||
case "GoldLeafv0.7.x":
|
case "GoldLeafv0.7.x":
|
||||||
|
|
|
@ -7,9 +7,7 @@
|
||||||
<?import javafx.scene.layout.HBox?>
|
<?import javafx.scene.layout.HBox?>
|
||||||
<?import javafx.scene.layout.VBox?>
|
<?import javafx.scene.layout.VBox?>
|
||||||
|
|
||||||
|
<VBox spacing="5.0" xmlns="http://javafx.com/javafx/8.0.141" xmlns:fx="http://javafx.com/fxml/1" fx:controller="nsusbloader.Controllers.SettingsBlockGoldleafController">
|
||||||
<VBox spacing="5.0" xmlns="http://javafx.com/javafx/8.0.141" xmlns:fx="http://javafx.com/fxml/1"
|
|
||||||
fx:controller="nsusbloader.Controllers.SettingsBlockGoldleafController">
|
|
||||||
<children>
|
<children>
|
||||||
<Label text="GoldLeaf" />
|
<Label text="GoldLeaf" />
|
||||||
<CheckBox fx:id="nspFilesFilterForGLCB" mnemonicParsing="false" text="%tab2_Cb_GLshowNspOnly">
|
<CheckBox fx:id="nspFilesFilterForGLCB" mnemonicParsing="false" text="%tab2_Cb_GLshowNspOnly">
|
||||||
|
@ -19,7 +17,7 @@
|
||||||
<HBox alignment="CENTER_LEFT" spacing="5.0">
|
<HBox alignment="CENTER_LEFT" spacing="5.0">
|
||||||
<children>
|
<children>
|
||||||
<Label text="%tab2_Cb_GlVersion" />
|
<Label text="%tab2_Cb_GlVersion" />
|
||||||
<ChoiceBox fx:id="glVersionChoiceBox" prefWidth="75.0" />
|
<ChoiceBox fx:id="glVersionChoiceBox" prefWidth="120.0" />
|
||||||
</children>
|
</children>
|
||||||
<VBox.margin>
|
<VBox.margin>
|
||||||
<Insets left="5.0" />
|
<Insets left="5.0" />
|
||||||
|
|
Loading…
Reference in a new issue