SPARK-1332

title.advanced.connection.sso.noprincipal = Spark is unable to find the principal to use for Single Sign-On. This will prevent SSO from working.
title.login.no.account = Unable to determine


removed unnecessary system.out's


git-svn-id: http://svn.igniterealtime.org/svn/repos/spark/trunk@12422 b35dd754-fafc-0310-a699-88a17e54d16e
This commit is contained in:
Wolf Posdorfer
2011-05-25 06:33:49 +00:00
committed by wolf.posdorfer
parent 142c90c277
commit 2821007800
8 changed files with 18 additions and 16 deletions

View File

@ -807,7 +807,7 @@ public final class LoginDialog {
} }
catch (LoginException le) { catch (LoginException le) {
Log.debug(le.getMessage()); Log.debug(le.getMessage());
accountNameLabel.setText("Unable to determine."); accountNameLabel.setText(Res.getString("title.login.no.account"));
//useSSO(false); //useSSO(false);
} }
@ -980,9 +980,6 @@ public final class LoginDialog {
} }
String resource = localPref.getResource(); String resource = localPref.getResource();
if (!ModelUtil.hasLength(resource)) {
resource = "spark";
}
connection.login(getUsername(), getPassword(), connection.login(getUsername(), getPassword(),
org.jivesoftware.spark.util.StringUtils.modifyWildcards(resource)); org.jivesoftware.spark.util.StringUtils.modifyWildcards(resource));

View File

@ -227,10 +227,6 @@ public class LoginSettingDialog implements PropertyChangeListener {
xmppHostField.setText(localPreferences.getXmppHost()); xmppHostField.setText(localPreferences.getXmppHost());
resourceField.setText(localPreferences.getResource()); resourceField.setText(localPreferences.getResource());
if (localPreferences.getResource() == null) {
resourceField.setText("spark");
}
autoDiscoverBox.addActionListener(this); autoDiscoverBox.addActionListener(this);
autoDiscoverBox.setSelected(!localPreferences autoDiscoverBox.setSelected(!localPreferences
@ -692,8 +688,7 @@ public class LoginSettingDialog implements PropertyChangeListener {
if (ModelUtil.hasLength(principalName)) { if (ModelUtil.hasLength(principalName)) {
wrappedLabel.setText(Res.getString("title.advanced.connection.sso.account",principalName)); wrappedLabel.setText(Res.getString("title.advanced.connection.sso.account",principalName));
} else { } else {
wrappedLabel wrappedLabel.setText(Res.getString("title.advanced.connection.sso.noprincipal"));
.setText("Spark is unable to find the principal to use for Single Sign-On. This will prevent SSO from working.");
} }
wrappedLabel.setBackground(Color.white); wrappedLabel.setBackground(Color.white);

View File

@ -25,6 +25,8 @@ import javax.swing.text.PlainDocument;
import javax.swing.text.View; import javax.swing.text.View;
import javax.swing.text.html.HTMLDocument; import javax.swing.text.html.HTMLDocument;
import org.jivesoftware.spark.util.log.Log;
import java.awt.Graphics; import java.awt.Graphics;
import java.awt.Graphics2D; import java.awt.Graphics2D;
import java.awt.Rectangle; import java.awt.Rectangle;
@ -271,7 +273,7 @@ public class ChatPrinter implements Printable {
pageStartY = 0; pageStartY = 0;
pageEndY = 0; pageEndY = 0;
currentPage = -1; currentPage = -1;
System.out.println("Error Printing Document"); Log.error("Error Printing Document",printerException);
} }
} }
} }

View File

@ -185,7 +185,7 @@ public final class GraphicUtils {
try { try {
tracker.waitForID(0, 0); tracker.waitForID(0, 0);
} catch (InterruptedException e) { } catch (InterruptedException e) {
System.out.println("INTERRUPTED while loading Image"); Log.error("INTERRUPTED while loading Image",e);
} }
tracker.removeImage(image, 0); tracker.removeImage(image, 0);
} }

View File

@ -453,7 +453,6 @@ public class SysTrayPlugin implements Plugin, NativeHandler,
@Override @Override
public void composingNotification(String from, String packetID) { public void composingNotification(String from, String packetID) {
if (pref.isTypingNotificationShown()) { if (pref.isTypingNotificationShown()) {
System.out.println("set typing");
trayIcon.setImage(typingIcon.getImage()); trayIcon.setImage(typingIcon.getImage());
} }
} }

View File

@ -31,6 +31,7 @@ import java.util.Properties;
import javax.swing.UIManager; import javax.swing.UIManager;
import org.jivesoftware.spark.util.Encryptor; import org.jivesoftware.spark.util.Encryptor;
import org.jivesoftware.spark.util.ModelUtil;
import org.jivesoftware.spark.util.log.Log; import org.jivesoftware.spark.util.log.Log;
/** /**
@ -448,6 +449,10 @@ public class LocalPreferences {
} }
public String getResource() { public String getResource() {
if (!ModelUtil.hasLength(props.getProperty("resource", "spark"))) {
return "";
}
return props.getProperty("resource", "spark"); return props.getProperty("resource", "spark");
} }

View File

@ -870,6 +870,7 @@ title.advanced.connection.sso = Using Single Sign-On (SSO)
title.advanced.connection.usesso = Use Single Sign-On (SSO) via GSSAPI title.advanced.connection.usesso = Use Single Sign-On (SSO) via GSSAPI
title.advanced.connection.sso.account = This will use the Desktop Account for "{0}" to login to the server. title.advanced.connection.sso.account = This will use the Desktop Account for "{0}" to login to the server.
title.advanced.connection.sso.unable = Unable to connect using Single Sign-On. Please check your principal and server settings. title.advanced.connection.sso.unable = Unable to connect using Single Sign-On. Please check your principal and server settings.
title.advanced.connection.sso.noprincipal = Spark is unable to find the principal to use for Single Sign-On. This will prevent SSO from working.
title.alert = Alert title.alert = Alert
title.appearance = Appearance title.appearance = Appearance
title.appearance.preferences = Customization title.appearance.preferences = Customization
@ -939,6 +940,7 @@ title.last.activity = Last activity
title.login = Login title.login = Login
title.login.error = Login error title.login.error = Login error
title.login.settings = Login settings title.login.settings = Login settings
title.login.no.account = Unable to determine
title.lookup.profile = Lookup profile title.lookup.profile = Lookup profile
title.msn.registration = MSN account credentials title.msn.registration = MSN account credentials
title.name = Name title.name = Name

View File

@ -546,6 +546,7 @@ title.advanced.connection.sso = Verwende Single Sign-On (SSO)
title.advanced.connection.usesso = Verwende Single Sign-On (SSO) <20>ber GSSAPI title.advanced.connection.usesso = Verwende Single Sign-On (SSO) <20>ber GSSAPI
title.advanced.connection.sso.account = Den Desktopaccount "{0}" benutzen um mit dem Server zu verbinden. title.advanced.connection.sso.account = Den Desktopaccount "{0}" benutzen um mit dem Server zu verbinden.
title.advanced.connection.sso.unable = Single Sign-On fehlgeschlagen. Bitte die Einstellungen <20>berpr<70>fen. title.advanced.connection.sso.unable = Single Sign-On fehlgeschlagen. Bitte die Einstellungen <20>berpr<70>fen.
title.advanced.connection.sso.noprincipal = Spark kann den Klienten f<>r Single Sign-On nicht finden.
title.preferences = Einstellungen title.preferences = Einstellungen
title.error = Fehler title.error = Fehler
title.client.logs = Client Logs title.client.logs = Client Logs
@ -627,6 +628,7 @@ title.lookup.profile = Profil suchen
title.add.search.service = Such-Service hinzuf<75>gen title.add.search.service = Such-Service hinzuf<75>gen
title.person.search = Suche nach Personen title.person.search = Suche nach Personen
title.login.settings = Login Einstellungen title.login.settings = Login Einstellungen
title.login.no.account = Unbestimmbar
title.login = Login title.login = Login
title.downloading.im.client = Download IM Programm title.downloading.im.client = Download IM Programm
title.upgrading.client = Programm upgraden title.upgrading.client = Programm upgraden