|
|
|
|
@ -102,9 +102,9 @@ public PresenceStatusSelectorBox(MainFrame mainFrame,
|
|
|
|
|
this.offlineStatus = status;
|
|
|
|
|
}
|
|
|
|
|
else if ((onlineStatus != null
|
|
|
|
|
&& (onlineStatus.getStatus() < connectivity))
|
|
|
|
|
&& (onlineStatus.getStatus() < connectivity))
|
|
|
|
|
|| (onlineStatus == null
|
|
|
|
|
&& (connectivity > 50 && connectivity < 80)))
|
|
|
|
|
&& (connectivity > 50 && connectivity < 80)))
|
|
|
|
|
{
|
|
|
|
|
this.onlineStatus = status;
|
|
|
|
|
}
|
|
|
|
|
@ -143,7 +143,7 @@ public void actionPerformed(ActionEvent e)
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
if (protocolProvider.getRegistrationState()
|
|
|
|
|
== RegistrationState.REGISTERED
|
|
|
|
|
== RegistrationState.REGISTERED
|
|
|
|
|
&& !presence.getPresenceStatus().equals(status))
|
|
|
|
|
{
|
|
|
|
|
if (status.isOnline())
|
|
|
|
|
@ -174,7 +174,7 @@ else if (protocolProvider.getRegistrationState()
|
|
|
|
|
{
|
|
|
|
|
if (!status.isOnline()
|
|
|
|
|
&& !(protocolProvider.getRegistrationState()
|
|
|
|
|
== RegistrationState.UNREGISTERING))
|
|
|
|
|
== RegistrationState.UNREGISTERING))
|
|
|
|
|
{
|
|
|
|
|
loginManager.setManuallyDisconnected(true);
|
|
|
|
|
|
|
|
|
|
@ -378,25 +378,27 @@ public void run()
|
|
|
|
|
}
|
|
|
|
|
catch (OperationFailedException e1)
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
if (e1.getErrorCode()
|
|
|
|
|
== OperationFailedException.GENERAL_ERROR)
|
|
|
|
|
== OperationFailedException.GENERAL_ERROR)
|
|
|
|
|
{
|
|
|
|
|
String msgText =
|
|
|
|
|
Messages.getI18NString("statusChangeGeneralError")
|
|
|
|
|
.getText();
|
|
|
|
|
|
|
|
|
|
new ErrorDialog(null, msgText, e1, Messages.getI18NString(
|
|
|
|
|
"generalError").getText()).showDialog();
|
|
|
|
|
new ErrorDialog(null, Messages
|
|
|
|
|
.getI18NString("generalError").getText(), msgText, e1)
|
|
|
|
|
.showDialog();
|
|
|
|
|
}
|
|
|
|
|
else if (e1.getErrorCode()
|
|
|
|
|
== OperationFailedException.NETWORK_FAILURE)
|
|
|
|
|
== OperationFailedException.NETWORK_FAILURE)
|
|
|
|
|
{
|
|
|
|
|
String msgText =
|
|
|
|
|
Messages.getI18NString("statusChangeNetworkFailure")
|
|
|
|
|
.getText();
|
|
|
|
|
|
|
|
|
|
new ErrorDialog(null, msgText, e1, Messages.getI18NString(
|
|
|
|
|
"networkFailure").getText()).showDialog();
|
|
|
|
|
new ErrorDialog(null, Messages.getI18NString(
|
|
|
|
|
"networkFailure").getText(), msgText, e1).showDialog();
|
|
|
|
|
}
|
|
|
|
|
else if (e1.getErrorCode()
|
|
|
|
|
== OperationFailedException.PROVIDER_NOT_REGISTERED)
|
|
|
|
|
@ -405,8 +407,8 @@ else if (e1.getErrorCode()
|
|
|
|
|
Messages.getI18NString("statusChangeNetworkFailure")
|
|
|
|
|
.getText();
|
|
|
|
|
|
|
|
|
|
new ErrorDialog(null, msgText, e1, Messages.getI18NString(
|
|
|
|
|
"networkFailure").getText()).showDialog();
|
|
|
|
|
new ErrorDialog(null, Messages.getI18NString(
|
|
|
|
|
"networkFailure").getText(), msgText, e1).showDialog();
|
|
|
|
|
}
|
|
|
|
|
logger.error("Error - changing status", e1);
|
|
|
|
|
}
|
|
|
|
|
|