}
private void fireOnSubscriptionRequestEvent(final JID from, final String id)
{
JIDStatus jidStatus = backend.getJIDStatus(from);
if (jidStatus != null)
{
Popups.OptionChoosed choose = new Popups.OptionChoosed()
{
public void optionChoosed(int option)
{
String type = "subscribed";
if (option == javax.swing.JOptionPane.YES_OPTION)
type = "unsubscribed";
sendSubscribed(from, type, id);
}
};
Object[] options = { I18N.gettext("main.popup.Deny_subscription"), I18N.gettext("OK") };
Popups.showOptionDialog(
MessageFormat.format(I18N.gettext("main.popup.{0}_wants_to_subscribe_to_your_presence"),new Object[]{jidStatus.getNick()}),
I18N.gettext("main.popup.Subscription_request"),
javax.swing.JOptionPane.YES_NO_OPTION,
javax.swing.JOptionPane.QUESTION_MESSAGE,
null,
options,