When a password mismatch in Google Contacts, open just one dialog.

cusax-fix
Sebastien Vincent 15 years ago
parent f7b8293e1b
commit 0be6c56a93

@ -49,6 +49,11 @@ public class GoogleContactsSourceService
*/
private GoogleContactsConnection cnx = null;
/**
* The account settings form.
*/
private AccountSettingsForm settings = null;
/**
* Constructor.
*
@ -181,8 +186,18 @@ public GoogleContactsConnectionImpl getConnection()
if(cnx.connect() == false)
{
AccountSettingsForm settings =
new AccountSettingsForm();
synchronized(this)
{
if(settings != null)
{
cnx = null;
return null;
}
else
{
settings = new AccountSettingsForm();
}
}
settings.setModal(true);
settings.loadData(cnx);
int ret = settings.showDialog();
@ -202,8 +217,18 @@ public GoogleContactsConnectionImpl getConnection()
}
else if(!cnx.connect())
{
AccountSettingsForm settings =
new AccountSettingsForm();
synchronized(this)
{
if(settings != null)
{
cnx = null;
return null;
}
else
{
settings = new AccountSettingsForm();
}
}
settings.setModal(true);
settings.loadData(cnx);
int ret = settings.showDialog();

Loading…
Cancel
Save