diff options
author | Ingo Bauersachs <ingo@jitsi.org> | 2015-08-08 13:58:13 +0200 |
---|---|---|
committer | Ingo Bauersachs <ingo@jitsi.org> | 2015-08-08 13:58:13 +0200 |
commit | a6b61c939bb26dcb984fb22cd0818cb950e9d83e (patch) | |
tree | 48c85c9e7ac9225c4d6b376eef98fabd902d0a4d | |
parent | 90876aaa33cc8ca339f397f17f891daf7472ce40 (diff) | |
download | jitsi-a6b61c939bb26dcb984fb22cd0818cb950e9d83e.zip jitsi-a6b61c939bb26dcb984fb22cd0818cb950e9d83e.tar.gz jitsi-a6b61c939bb26dcb984fb22cd0818cb950e9d83e.tar.bz2 |
Correctly set SIP display names (Closes #134)
3 files changed, 8 insertions, 29 deletions
diff --git a/src/net/java/sip/communicator/plugin/sipaccregwizz/SIPAccountRegistrationForm.java b/src/net/java/sip/communicator/plugin/sipaccregwizz/SIPAccountRegistrationForm.java index c78dd19..8a2672e 100644 --- a/src/net/java/sip/communicator/plugin/sipaccregwizz/SIPAccountRegistrationForm.java +++ b/src/net/java/sip/communicator/plugin/sipaccregwizz/SIPAccountRegistrationForm.java @@ -25,7 +25,7 @@ import javax.swing.*; 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 class SIPAccountRegistrationForm String serverAddress = sipAccReg.getServerAddress(); - String displayName = sipAccReg.getAccountDisplayName(); + String displayName = sipAccReg.getAccountPropertyString( + ProtocolProviderFactory.DISPLAY_NAME); String authName = sipAccReg.getAuthorizationName(); @@ -420,8 +421,7 @@ public class SIPAccountRegistrationForm 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); diff --git a/src/net/java/sip/communicator/plugin/sipaccregwizz/SIPAccountRegistrationWizard.java b/src/net/java/sip/communicator/plugin/sipaccregwizz/SIPAccountRegistrationWizard.java index 7e73c07..c50bce8 100644 --- a/src/net/java/sip/communicator/plugin/sipaccregwizz/SIPAccountRegistrationWizard.java +++ b/src/net/java/sip/communicator/plugin/sipaccregwizz/SIPAccountRegistrationWizard.java @@ -167,7 +167,8 @@ public class SIPAccountRegistrationWizard 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"), diff --git a/src/net/java/sip/communicator/service/protocol/AccountID.java b/src/net/java/sip/communicator/service/protocol/AccountID.java index 3e12903..65ce042 100644 --- a/src/net/java/sip/communicator/service/protocol/AccountID.java +++ b/src/net/java/sip/communicator/service/protocol/AccountID.java @@ -196,7 +196,8 @@ public abstract class AccountID /** * 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. */ @@ -495,29 +496,6 @@ public abstract class AccountID } /** - * 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. * * @return the password of the account. |