diff options
author | Vincent Lucas <chenzo@jitsi.org> | 2012-06-07 12:02:07 +0000 |
---|---|---|
committer | Vincent Lucas <chenzo@jitsi.org> | 2012-06-07 12:02:07 +0000 |
commit | 5d6b250942bc279f78d755f9e034aaedfcfa58f5 (patch) | |
tree | e4a65661999aadef4accd31e9f1bd78d97b44864 /src/net/java/sip/communicator/plugin/securityconfig/SecurityConfigActivator.java | |
parent | fb39a5cace8dd9fa4b5f2fadf3b13d384079b083 (diff) | |
download | jitsi-5d6b250942bc279f78d755f9e034aaedfcfa58f5.zip jitsi-5d6b250942bc279f78d755f9e034aaedfcfa58f5.tar.gz jitsi-5d6b250942bc279f78d755f9e034aaedfcfa58f5.tar.bz2 |
Adds properties to custom the GUI.
Patch proposed by Vieri (JIRA new feature JITSI-1045).
Diffstat (limited to 'src/net/java/sip/communicator/plugin/securityconfig/SecurityConfigActivator.java')
-rw-r--r-- | src/net/java/sip/communicator/plugin/securityconfig/SecurityConfigActivator.java | 36 |
1 files changed, 24 insertions, 12 deletions
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<String, String>(); - 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<String, String>(); + 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); + } } /** |