Show message to the user when disconnected.

cusax-fix
Yana Stamcheva 20 years ago
parent 17b07a6242
commit ebcb056449

@ -33,7 +33,7 @@ public static String getString(String key, String param) {
try {
String sourceString = RESOURCE_BUNDLE.getString(key);
return sourceString.replaceAll("?", param);
return sourceString.replaceAll("\\?", param);
} catch (MissingResourceException e) {

@ -14,6 +14,7 @@ close=Close
configure=Configure
connectionFailed=Connection failed
connectionFailedMessage=The connection could not be established due to a network \n connection problem. Please check your network configuration.
connectionExpiredMessage=You are currently disconnected from the ? server.
contactPausedTyping=paused typing the message
contactTyping=is typing a message
contactTypingStateStale=typing state not updated
@ -72,6 +73,7 @@ today=Today
tools=Tools
uin=UIN:
unknown=Unknown user
unregisteredMessage=You have been disconnected from the ? server. Please check your network connection.
updateAutomatically=Automatically install new updates
updates=Updates
userInfo=User info

@ -176,10 +176,16 @@ else if(evt.getNewState()
}
else if(evt.getNewState()
.equals(RegistrationState.EXPIRED)){
//TODO: Implement registration state changed to: EXPIRED
JOptionPane.showMessageDialog(null,
Messages.getString("connectionExpiredMessage", protocolName),
Messages.getString("warning"),
JOptionPane.WARNING_MESSAGE);
}
else if(evt.getNewState().equals(RegistrationState.UNREGISTERED)){
//TODO: Implement registration state changed to UNREGISTERED
JOptionPane.showMessageDialog(null,
Messages.getString("unregisteredMessage", protocolName),
Messages.getString("warning"),
JOptionPane.WARNING_MESSAGE);
}
}

Loading…
Cancel
Save