From dc49f75a868ef0c12e97ce14ce9c0f5ce06fc470 Mon Sep 17 00:00:00 2001 From: Andrew Branson Date: Mon, 2 Jun 2014 17:18:03 +0200 Subject: Pass login title as resource --- src/main/java/com/c2kernel/gui/LoginBox.java | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'src/main/java/com') 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."); } -- cgit v1.2.3