From 5d6b250942bc279f78d755f9e034aaedfcfa58f5 Mon Sep 17 00:00:00 2001 From: Vincent Lucas Date: Thu, 7 Jun 2012 12:02:07 +0000 Subject: Adds properties to custom the GUI. Patch proposed by Vieri (JIRA new feature JITSI-1045). --- .../securityconfig/SecurityConfigActivator.java | 36 ++++++++++++++-------- 1 file changed, 24 insertions(+), 12 deletions(-) (limited to 'src/net/java/sip/communicator/plugin/securityconfig/SecurityConfigActivator.java') diff --git a/src/net/java/sip/communicator/plugin/securityconfig/SecurityConfigActivator.java b/src/net/java/sip/communicator/plugin/securityconfig/SecurityConfigActivator.java index 23f56cc..dd3cdd6 100644 --- a/src/net/java/sip/communicator/plugin/securityconfig/SecurityConfigActivator.java +++ b/src/net/java/sip/communicator/plugin/securityconfig/SecurityConfigActivator.java @@ -68,6 +68,13 @@ public class SecurityConfigActivator = "net.java.sip.communicator.plugin.securityconfig.DISABLED"; /** + * Indicates if the master password config form should be disabled, i.e. + * not visible to the user. + */ + private static final String MASTER_PASSWORD_DISABLED_PROP + = "net.java.sip.communicator.plugin.securityconfig.MASTER_PASSWORD_DISABLED"; + + /** * Starts this plugin. * @param bc the BundleContext * @throws Exception if some of the operations executed in the start method @@ -97,18 +104,23 @@ public class SecurityConfigActivator 20), properties); - properties = new Hashtable(); - properties.put( ConfigurationForm.FORM_TYPE, - ConfigurationForm.SECURITY_TYPE); - bundleContext.registerService( - ConfigurationForm.class.getName(), - new LazyConfigurationForm( - "net.java.sip.communicator.plugin.securityconfig.masterpassword.ConfigurationPanel", - getClass().getClassLoader(), - null /* iconID */, - "plugin.securityconfig.masterpassword.TITLE", - 3), - properties); + // If the master password config form is disabled don't register it. + if(!getConfigurationService() + .getBoolean(MASTER_PASSWORD_DISABLED_PROP, false)) + { + properties = new Hashtable(); + properties.put( ConfigurationForm.FORM_TYPE, + ConfigurationForm.SECURITY_TYPE); + bundleContext.registerService( + ConfigurationForm.class.getName(), + new LazyConfigurationForm( + "net.java.sip.communicator.plugin.securityconfig.masterpassword.ConfigurationPanel", + getClass().getClassLoader(), + null /* iconID */, + "plugin.securityconfig.masterpassword.TITLE", + 3), + properties); + } } /** -- cgit v1.1