mirror of
https://github.com/igniterealtime/Spark.git
synced 2025-12-01 12:27:58 +00:00
SPARK-1258
default.properties Plugins downloading setting plugins deleting setting look and feel change setting look and feel default setting --------------------------------- polish update in spellchecker git-svn-id: http://svn.igniterealtime.org/svn/repos/spark/trunk@12158 b35dd754-fafc-0310-a699-88a17e54d16e
This commit is contained in:
committed by
wolf.posdorfer
parent
a1ade79122
commit
8eed6dc308
@ -329,7 +329,7 @@ public final class LoginDialog {
|
||||
autoLoginBox.addActionListener(this);
|
||||
|
||||
|
||||
if (!"true".equals(Default.getString(Default.ACCOUNT_DISABLED))) {
|
||||
if (!Default.getBoolean(Default.ACCOUNT_DISABLED)) {
|
||||
buttonPanel.add(createAccountButton,
|
||||
new GridBagConstraints(1, 0, 1, 1, 0.0, 0.0,
|
||||
GridBagConstraints.EAST, GridBagConstraints.HORIZONTAL, new Insets(5, 5, 0, 5), 0, 0));
|
||||
@ -899,7 +899,7 @@ public final class LoginDialog {
|
||||
if (!ModelUtil.hasLength(resource)) {
|
||||
resource = "spark";
|
||||
}
|
||||
connection.login(getUsername(), getPassword(), resource);
|
||||
connection.login(getUsername(), getPassword(), modifyWildcards(resource));
|
||||
|
||||
sessionManager.setServerAddress(connection.getServiceName());
|
||||
sessionManager.initializeSession(connection, getUsername(), getPassword());
|
||||
@ -1007,7 +1007,27 @@ public final class LoginDialog {
|
||||
return !hasErrors;
|
||||
}
|
||||
|
||||
public void handle(Callback[] callbacks) throws IOException {
|
||||
/**
|
||||
* Modifies Wildcards such as <code>$r</code>,<code>$s</code>,<code>$v</code>
|
||||
* into what they represent r = randomnumber , s=os.name, v=os.version
|
||||
* @param resource
|
||||
* @return
|
||||
*/
|
||||
private String modifyWildcards(String resource) {
|
||||
|
||||
resource = resource.replace("$r",
|
||||
"" + Math.round((Math.random() * 1000)));
|
||||
|
||||
resource = resource.replace("$s", System.getProperty("os.name")
|
||||
.replace(" ", ""));
|
||||
|
||||
resource = resource.replace("$v", System.getProperty("os.version")
|
||||
.replace(" ", ""));
|
||||
|
||||
return resource;
|
||||
}
|
||||
|
||||
public void handle(Callback[] callbacks) throws IOException {
|
||||
for (Callback callback : callbacks) {
|
||||
if (callback instanceof NameCallback) {
|
||||
NameCallback ncb = (NameCallback) callback;
|
||||
|
||||
Reference in New Issue
Block a user