Adds property that can hide account configuration from the list of available accounts, this way making its configuration readonly.

cusax-fix 4916
Damian Minkov 12 years ago
parent 20db1b0bd9
commit 89ad25052f

@ -124,7 +124,8 @@ private void accountsInit()
{
AccountID accountID = storedAccounts.next();
if (accountID.isHidden())
if (accountID.isHidden()
|| accountID.isConfigHidden())
continue;
Account uiAccount = null;
@ -224,7 +225,8 @@ public void serviceChanged(ServiceEvent event)
// If the protocol provider is hidden we don't want to show it in the
// list.
if (protocolProvider.getAccountID().isHidden())
if (protocolProvider.getAccountID().isHidden()
&& protocolProvider.getAccountID().isConfigHidden())
return;
// Add or remove the protocol provider from our accounts list.

@ -708,6 +708,17 @@ public boolean isHidden()
ProtocolProviderFactory.IS_PROTOCOL_HIDDEN) != null;
}
/**
* Checks if the account config is hidden.
* @return <tt>true</tt> if the account config is hidden or <tt>false</tt>
* otherwise.
*/
public boolean isConfigHidden()
{
return getAccountPropertyString(
ProtocolProviderFactory.IS_ACCOUNT_CONFIG_HIDDEN) != null;
}
/**
* Returns the first <tt>ProtocolProviderService</tt> implementation
* corresponding to the preferred protocol

@ -307,6 +307,12 @@ public abstract class ProtocolProviderFactory
*/
public static final String IS_ACCOUNT_DISABLED = "IS_ACCOUNT_DISABLED";
/**
* The name of the property that would indicate if a given account
* configuration form is currently hidden.
*/
public static final String IS_ACCOUNT_CONFIG_HIDDEN = "IS_CONFIG_HIDDEN";
/**
* Indicates if ICE should be used.
*/

Loading…
Cancel
Save