diff options
author | Yana Stamcheva <yana@jitsi.org> | 2011-06-21 14:58:39 +0000 |
---|---|---|
committer | Yana Stamcheva <yana@jitsi.org> | 2011-06-21 14:58:39 +0000 |
commit | 76cecff08d03207c38e32abd8ec81852d5521fb7 (patch) | |
tree | 9c96209ccee9b99fdc407cb2a0ee19227a603178 /src/net/java/sip/communicator/impl/gui/main/contactlist/UnknownContactPanel.java | |
parent | eaa0616e04740eb3a173147b8ac3edbe579c7edc (diff) | |
download | jitsi-76cecff08d03207c38e32abd8ec81852d5521fb7.zip jitsi-76cecff08d03207c38e32abd8ec81852d5521fb7.tar.gz jitsi-76cecff08d03207c38e32abd8ec81852d5521fb7.tar.bz2 |
Adds a configuration property allowing to enable/disable add/remove contact functionality from provisioning.
Diffstat (limited to 'src/net/java/sip/communicator/impl/gui/main/contactlist/UnknownContactPanel.java')
-rw-r--r-- | src/net/java/sip/communicator/impl/gui/main/contactlist/UnknownContactPanel.java | 50 |
1 files changed, 29 insertions, 21 deletions
diff --git a/src/net/java/sip/communicator/impl/gui/main/contactlist/UnknownContactPanel.java b/src/net/java/sip/communicator/impl/gui/main/contactlist/UnknownContactPanel.java index d78f010..21f50a8 100644 --- a/src/net/java/sip/communicator/impl/gui/main/contactlist/UnknownContactPanel.java +++ b/src/net/java/sip/communicator/impl/gui/main/contactlist/UnknownContactPanel.java @@ -15,6 +15,7 @@ import javax.swing.text.*; import net.java.sip.communicator.impl.gui.*; import net.java.sip.communicator.impl.gui.main.*; import net.java.sip.communicator.impl.gui.main.call.*; +import net.java.sip.communicator.impl.gui.utils.*; import net.java.sip.communicator.util.skin.*; import net.java.sip.communicator.util.swing.*; import net.java.sip.communicator.util.swing.event.*; @@ -65,14 +66,6 @@ public class UnknownContactPanel this.add(mainPanel, BorderLayout.NORTH); - addContact.setAlignmentX(JButton.CENTER_ALIGNMENT); - callContact.setAlignmentX(JButton.CENTER_ALIGNMENT); - - addContact.setMnemonic(GuiActivator.getResources() - .getI18nMnemonic("service.gui.ADD_CONTACT")); - callContact.setMnemonic(GuiActivator.getResources() - .getI18nMnemonic("service.gui.CALL_CONTACT")); - initTextArea(parentWindow.getCurrentSearchText()); mainPanel.add(textArea, BorderLayout.CENTER); @@ -80,7 +73,34 @@ public class UnknownContactPanel TransparentPanel buttonPanel = new TransparentPanel(new GridLayout(0, 1)); - buttonPanel.add(addContact); + if (!ConfigurationManager.isAddContactDisabled()) + { + addContact.setAlignmentX(JButton.CENTER_ALIGNMENT); + + addContact.setMnemonic(GuiActivator.getResources() + .getI18nMnemonic("service.gui.ADD_CONTACT")); + + buttonPanel.add(addContact); + + addContact.addActionListener(new ActionListener() + { + public void actionPerformed(ActionEvent e) + { + AddContactDialog dialog + = new AddContactDialog(parentWindow); + + dialog.setContactAddress( + parentWindow.getCurrentSearchText()); + dialog.setVisible(true); + } + }); + } + + callContact.setAlignmentX(JButton.CENTER_ALIGNMENT); + + callContact.setMnemonic(GuiActivator.getResources() + .getI18nMnemonic("service.gui.CALL_CONTACT")); + buttonPanel.add(callContact); TransparentPanel southPanel @@ -89,18 +109,6 @@ public class UnknownContactPanel mainPanel.add(southPanel, BorderLayout.SOUTH); - addContact.addActionListener(new ActionListener() - { - public void actionPerformed(ActionEvent e) - { - AddContactDialog dialog - = new AddContactDialog(parentWindow); - - dialog.setContactAddress(parentWindow.getCurrentSearchText()); - dialog.setVisible(true); - } - }); - callContact.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) |