Save config file
This commit is contained in:
@@ -49,6 +49,7 @@ import com.sheepit.client.SettingsLoader;
|
||||
import com.sheepit.client.Stats;
|
||||
import com.sheepit.client.standalone.swing.activity.Settings;
|
||||
import com.sheepit.client.standalone.swing.activity.Working;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
public class GuiSwing extends JFrame implements Gui {
|
||||
@@ -71,6 +72,7 @@ public class GuiSwing extends JFrame implements Gui {
|
||||
private boolean waitingForAuthentication;
|
||||
private Client client;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
private SettingsLoader settingsLoader;
|
||||
|
||||
|
||||
@@ -551,6 +551,12 @@ public class Settings implements Activity {
|
||||
|
||||
if (saveFile.isSelected()) {
|
||||
parent.setSettingsLoader(new SettingsLoader(config.getConfigFilePath(), login.getText(), new String(password.getPassword()), proxyText, hostnameText, method, selected_gpu, cpu_cores, max_ram, max_rendertime, cachePath, autoSignIn.isSelected(), GuiSwing.type, priority.getValue()));
|
||||
|
||||
// wait for successful authentication (to store the public key)
|
||||
// or do we already have one?
|
||||
if (parent.getClient().getServer().getServerConfig() != null && parent.getClient().getServer().getServerConfig().getPublickey() != null) {
|
||||
parent.getSettingsLoader().saveFile();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user