Fix metacontact searching for contacts when create address is different from the one returned by getAddress, was affecting setting the display name through add contact dialog.

In add contact dialog if we have only one account, now it is selected by default.
 Improve some error messages patch provided by Andreas Kuckartz in mail with subject "[jitsi-dev] [PATCH] improve error messages".
cusax-fix
Damian Minkov 15 years ago
parent 1ade15d9d9
commit 87b95d7fb3

@ -278,8 +278,9 @@ public Contact getContact(String contactAddress,
{
for (Contact contact : protoContacts)
{
if( contact.getProtocolProvider() == ownerProvider
&& contact.getAddress().equals(contactAddress))
if(contact.getProtocolProvider() == ownerProvider
&& (contact.getAddress().equals(contactAddress)
|| contact.equals(contactAddress)))
return contact;
}

@ -283,6 +283,11 @@ public void itemStateChanged(ItemEvent e)
accountCombo.addItem(provider);
}
// if we have only select account option and only one account
// select the available account
if(accountCombo.getItemCount() == 2)
accountCombo.setSelectedIndex(1);
}
/**

@ -608,7 +608,9 @@ private void connectAndLogin(SecurityAuthority authority,
}
catch(NumberFormatException ex)
{
throw new OperationFailedException("Wrong port",
throw new OperationFailedException("Wrong proxy port, "
+ globalProxyPortStr
+ " does not represent an integer",
OperationFailedException.INVALID_ACCOUNT_PROPERTIES,
ex);
}

@ -937,7 +937,8 @@ else if (response.getStatusCode() == Response.INTERVAL_TOO_BRIEF)
}
else if ( response.getStatusCode() >= 400 )
{
logger.error("Received an error response.");
logger.error("Received an error response ("
+ response.getStatusCode() + ")" );
int registrationStateReason =
RegistrationStateChangeEvent.REASON_NOT_SPECIFIED;

Loading…
Cancel
Save