|
|
|
|
@ -24,6 +24,7 @@
|
|
|
|
|
/**
|
|
|
|
|
* @author Yana Stamcheva
|
|
|
|
|
* @author Adam Netocny
|
|
|
|
|
* @author Hristo Terezov
|
|
|
|
|
*/
|
|
|
|
|
public class AuthorizationRequestedDialog
|
|
|
|
|
extends SIPCommDialog
|
|
|
|
|
@ -116,13 +117,23 @@ public AuthorizationRequestedDialog(MainFrame mainFrame,
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
String displayName = contact.getDisplayName();
|
|
|
|
|
if(displayName.length() > 64)
|
|
|
|
|
{
|
|
|
|
|
displayName = displayName.substring(0, 47) + "...";
|
|
|
|
|
}
|
|
|
|
|
contactName
|
|
|
|
|
= contact.getDisplayName() + " <" + contact.getAddress() + ">";
|
|
|
|
|
= displayName + " <" + contact.getAddress() + ">";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
String infoText = GuiActivator.getResources().getI18NString(
|
|
|
|
|
"service.gui.AUTHORIZATION_REQUESTED_INFO",
|
|
|
|
|
new String[]{contactName});
|
|
|
|
|
if(infoText.length() > 256)
|
|
|
|
|
{
|
|
|
|
|
infoText = infoText.substring(0, 253) + "...";
|
|
|
|
|
}
|
|
|
|
|
infoTextArea.setText(
|
|
|
|
|
GuiActivator.getResources().getI18NString(
|
|
|
|
|
"service.gui.AUTHORIZATION_REQUESTED_INFO",
|
|
|
|
|
new String[]{contactName}));
|
|
|
|
|
infoTextArea.setText(infoText);
|
|
|
|
|
|
|
|
|
|
this.infoTextArea.setFont(infoTextArea.getFont().deriveFont(Font.BOLD));
|
|
|
|
|
this.infoTextArea.setLineWrap(true);
|
|
|
|
|
@ -156,21 +167,32 @@ public AuthorizationRequestedDialog(MainFrame mainFrame,
|
|
|
|
|
|
|
|
|
|
this.reasonsPanel.add(requestScrollPane);
|
|
|
|
|
|
|
|
|
|
this.mainPanel.setPreferredSize(new Dimension(500, 250));
|
|
|
|
|
this.mainPanel.setPreferredSize(new Dimension(700, 270));
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
this.mainPanel.setPreferredSize(new Dimension(500, 200));
|
|
|
|
|
this.mainPanel.setPreferredSize(new Dimension(700, 220));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// If the authorization request comes from a non-persistent contact,
|
|
|
|
|
// we'll suggest to the user to add it to the contact list.
|
|
|
|
|
if (!contact.isPersistent())
|
|
|
|
|
{
|
|
|
|
|
addContactCheckBox
|
|
|
|
|
= new SIPCommCheckBox(GuiActivator.getResources()
|
|
|
|
|
String addContactText = "";
|
|
|
|
|
if(contactName.length() > 50)
|
|
|
|
|
{
|
|
|
|
|
addContactText = GuiActivator.getResources()
|
|
|
|
|
.getI18NString("service.gui.ADD_CONTACT_TO_CONTACTLIST",
|
|
|
|
|
new String[]{contactName});
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
addContactText = GuiActivator.getResources()
|
|
|
|
|
.getI18NString("service.gui.ADD_AUTHORIZED_CONTACT",
|
|
|
|
|
new String[]{contactName}), true);
|
|
|
|
|
new String[]{contactName});
|
|
|
|
|
}
|
|
|
|
|
addContactCheckBox
|
|
|
|
|
= new SIPCommCheckBox(addContactText, true);
|
|
|
|
|
addContactCheckBox.setBorder(null);
|
|
|
|
|
|
|
|
|
|
JPanel checkBoxPanel
|
|
|
|
|
@ -223,8 +245,6 @@ public AuthorizationRequestedDialog(MainFrame mainFrame,
|
|
|
|
|
*/
|
|
|
|
|
public void showDialog()
|
|
|
|
|
{
|
|
|
|
|
pack();
|
|
|
|
|
repaint();
|
|
|
|
|
this.setVisible(true);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|