forked from External/mage
Store usrName and password per server. Update input boxes with corresponding values when server is changed in ConnectDialog. Save prefs on successful requests in RegisterUserDialog and ResetPasswordDialog.
This commit is contained in:
parent
f5765383c7
commit
b114c17135
4 changed files with 48 additions and 10 deletions
|
|
@ -745,10 +745,13 @@ public class MageFrame extends javax.swing.JFrame implements MageClient {
|
|||
}
|
||||
|
||||
private boolean performConnect() {
|
||||
String userName = prefs.get("userName", "");
|
||||
String password = prefs.get("password", "");
|
||||
// TODO: Create MagePreference class to consolidate duplicated preference code in
|
||||
// MageFrame, ConnectDialog and PreferencesDialog.
|
||||
String server = prefs.get("serverAddress", "");
|
||||
int port = Integer.parseInt(prefs.get("serverPort", ""));
|
||||
// For userName and password we save preference per server.
|
||||
String userName = prefs.get(server + "/userName", "");
|
||||
String password = prefs.get(server + "/password", "");
|
||||
String proxyServer = prefs.get("proxyAddress", "");
|
||||
int proxyPort = Integer.parseInt(prefs.get("proxyPort", "0"));
|
||||
ProxyType proxyType = ProxyType.valueByText(prefs.get("proxyType", "None"));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue