Read/preserve shared zip config in settings file

This commit is contained in:
Chris Bond
2022-05-22 15:59:44 +10:00
parent 6ed7aec650
commit 810ee5766a
2 changed files with 28 additions and 8 deletions

View File

@@ -748,8 +748,9 @@ public class Settings implements Activity {
if (saveFile.isSelected()) {
parent.getSettingsLoader()
.setSettings(config.getConfigFilePath(), login.getText(), new String(password.getPassword()), proxyText, hostnameText, method,
selected_gpu, cpu_cores, max_ram, max_rendertime, getCachePath(config), autoSignIn.isSelected(), useSysTray.isSelected(),
headlessCheckbox.isSelected(), GuiSwing.type, themeOptionsGroup.getSelection().getActionCommand(), config.getPriority());
selected_gpu, cpu_cores, max_ram, max_rendertime, getCachePath(config), getSharedPath(config), autoSignIn.isSelected(),
useSysTray.isSelected(), headlessCheckbox.isSelected(), GuiSwing.type, themeOptionsGroup.getSelection().getActionCommand(),
config.getPriority());
// wait for successful authentication (to store the public key)
// or do we already have one?
@@ -802,6 +803,14 @@ public class Settings implements Activity {
}
return cachePath;
}
private String getSharedPath(Configuration config) {
String sharedPath = null;
if (config.getSharedDownloadsDirectory() != null) {
sharedPath = config.getSharedDownloadsDirectory().getAbsolutePath();
}
return sharedPath;
}
}
class JCheckBoxGPU extends JCheckBox {