diff options
| author | Andrew Branson <andrew.branson@cern.ch> | 2014-06-02 17:18:03 +0200 |
|---|---|---|
| committer | Andrew Branson <andrew.branson@cern.ch> | 2014-06-02 17:18:03 +0200 |
| commit | dc49f75a868ef0c12e97ce14ce9c0f5ce06fc470 (patch) | |
| tree | 389d41c7856348dccffa0ab6d295e4cba1aaa764 | |
| parent | 8b7aae17858579ff84b96bf50a3efe895a9a76da (diff) | |
Pass login title as resource
| -rw-r--r-- | src/main/java/com/c2kernel/gui/LoginBox.java | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/main/java/com/c2kernel/gui/LoginBox.java b/src/main/java/com/c2kernel/gui/LoginBox.java index ce7a48d..cae89ab 100644 --- a/src/main/java/com/c2kernel/gui/LoginBox.java +++ b/src/main/java/com/c2kernel/gui/LoginBox.java @@ -47,6 +47,7 @@ import com.c2kernel.utils.Logger; public class LoginBox extends JFrame {
public String errorMessage=new String("");
+ String title;
private int maxNumberLogon;
public boolean action = false;
public int loginAttemptNumber= 0;
@@ -83,9 +84,10 @@ public class LoginBox extends JFrame { if (attempt==0) maxNumberLogon=5;
else maxNumberLogon=attempt;
if (title == null)
- title = "Cristal2";
- title = Language.translate("Log in to ")+title;
- setTitle(title);
+ this.title = "Cristal";
+ else
+ this.title = title;
+ setTitle(Language.translate("Log in to ")+title);
username.setText(lastUser);
}
@@ -94,7 +96,7 @@ public class LoginBox extends JFrame { errorSet=false;
try {
if (this.getUser().length()>0 && this.getPassword().length()>0)
- userAgent = Gateway.connect(this.getUser(), this.getPassword());
+ userAgent = Gateway.connect(this.getUser(), this.getPassword(), title);
logged = (userAgent != null);
Logger.msg(7, "AbstractMain::standardSetUp() - Gateway.connect() OK.");
}
|
