now able to select the text which is displayed when automatically going idle with IdlePlugin in Preferences->Login

1 new String for Locales : label.time.till.idlemessage = Automatic idl&e message

adding super awesome stuff for Easter-time ;-)

git-svn-id: http://svn.igniterealtime.org/svn/repos/spark/trunk@12215 b35dd754-fafc-0310-a699-88a17e54d16e
This commit is contained in:
Wolf Posdorfer
2011-03-30 09:28:18 +00:00
committed by wolf.posdorfer
parent 2adda15ee2
commit 6f0e5c980c
9 changed files with 113 additions and 64 deletions

View File

@ -901,7 +901,9 @@ public final class LoginDialog {
if (!ModelUtil.hasLength(resource)) {
resource = "spark";
}
connection.login(getUsername(), getPassword(), modifyWildcards(resource));
connection.login(getUsername(), getPassword(),
org.jivesoftware.spark.util.StringUtils.modifyWildcards(resource));
sessionManager.setServerAddress(connection.getServiceName());
sessionManager.initializeSession(connection, getUsername(), getPassword());
@ -1009,26 +1011,6 @@ public final class LoginDialog {
return !hasErrors;
}
/**
* 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) {