|
|
@ -165,8 +165,8 @@ public class ApplicationSettings { |
|
|
|
return new ServerSetting(order, |
|
|
|
return new ServerSetting(order, |
|
|
|
prefs.getString("server_name_" + order, null), |
|
|
|
prefs.getString("server_name_" + order, null), |
|
|
|
type, |
|
|
|
type, |
|
|
|
prefs.getString("server_address_" + order, null), |
|
|
|
trim(prefs.getString("server_address_" + order, null)), |
|
|
|
prefs.getString("server_localaddress_" + order, null), |
|
|
|
trim(prefs.getString("server_localaddress_" + order, null)), |
|
|
|
Integer.parseInt(localPort), |
|
|
|
Integer.parseInt(localPort), |
|
|
|
prefs.getString("server_localnetwork_" + order, null), |
|
|
|
prefs.getString("server_localnetwork_" + order, null), |
|
|
|
Integer.parseInt(port), |
|
|
|
Integer.parseInt(port), |
|
|
@ -719,4 +719,14 @@ public class ApplicationSettings { |
|
|
|
edit.apply(); |
|
|
|
edit.apply(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
|
|
* Trims away whitespace around a string, or returns null if str is null |
|
|
|
|
|
|
|
* @param str The string to trim, or null |
|
|
|
|
|
|
|
* @return The trimmed string, or null if str is null |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
private String trim(String str) { |
|
|
|
|
|
|
|
if (str == null) return null; |
|
|
|
|
|
|
|
return str.trim(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|