Correctly set SIP display names (Closes #134)

smack4
Ingo Bauersachs 11 years ago
parent 90876aaa33
commit a6b61c939b

@ -25,7 +25,7 @@
import net.java.sip.communicator.plugin.desktoputil.*;
import net.java.sip.communicator.plugin.desktoputil.wizard.*;
import net.java.sip.communicator.service.protocol.*;
import net.java.sip.communicator.service.protocol.sip.*;
import org.jitsi.util.*;
@ -362,7 +362,8 @@ public void loadAccount(SIPAccountRegistration sipAccReg)
String serverAddress = sipAccReg.getServerAddress();
String displayName = sipAccReg.getAccountDisplayName();
String displayName = sipAccReg.getAccountPropertyString(
ProtocolProviderFactory.DISPLAY_NAME);
String authName = sipAccReg.getAuthorizationName();
@ -420,8 +421,7 @@ public void loadAccount(SIPAccountRegistration sipAccReg)
connectionPanel.setServerAddress(serverAddress);
connectionPanel.setServerEnabled(isServerOverridden);
if (displayName != null && displayName.length() > 0)
accountPanel.setDisplayName(displayName);
accountPanel.setDisplayName(displayName);
if(authName != null && authName.length() > 0)
connectionPanel.setAuthenticationName(authName);

@ -167,7 +167,8 @@ public Iterator<Map.Entry<String, String>> getSummary()
boolean rememberPswd = registration.isRememberPassword();
String rememberPswdString = Resources.getString(
rememberPswd ? "service.gui.YES" : "service.gui.NO");
String displayName = registration.getAccountDisplayName();
String displayName = registration.getAccountPropertyString(
ProtocolProviderFactory.DISPLAY_NAME);
if(displayName != null && displayName.length() > 0)
summaryTable.put(
Resources.getString("plugin.sipaccregwizz.DISPLAY_NAME"),

@ -196,7 +196,8 @@ public String getUserID()
/**
* Returns a name that can be displayed to the user when referring to this
* account.
* account. WARNING: This property actually refers to
* <code>ACCOUNT_DISPLAY_NAME</code>!
*
* @return A String identifying the user inside this particular service.
*/
@ -494,29 +495,6 @@ public String getServerAddress()
return getAccountPropertyString(ProtocolProviderFactory.SERVER_ADDRESS);
}
/**
* Get the {@link ProtocolProviderFactory#ACCOUNT_DISPLAY_NAME} property.
*
* @return the {@link ProtocolProviderFactory#ACCOUNT_DISPLAY_NAME}
* property value.
*/
public String getAccountDisplayName()
{
return getAccountPropertyString(
ProtocolProviderFactory.ACCOUNT_DISPLAY_NAME);
}
/**
* Sets {@link ProtocolProviderFactory#ACCOUNT_DISPLAY_NAME} property value.
*
* @param displayName the account display name value to set.
*/
public void setAccountDisplayName(String displayName)
{
setOrRemoveIfEmpty(ProtocolProviderFactory.ACCOUNT_DISPLAY_NAME,
displayName);
}
/**
* Returns the password of the account.
*

Loading…
Cancel
Save