Adds a default value for the account config property.

cusax-fix
Yana Stamcheva 13 years ago
parent 29cf3a8243
commit ddbac357d0

@ -45,6 +45,7 @@ impl.gui.GREY_HISTORY_ENABLED=false
impl.gui.SINGLE_WINDOW_INTERFACE=false
impl.gui.CALL_BUTTON_ENABLED=false
impl.gui.main.account.ADVANCED_CONFIG_DISABLED=false
impl.gui.main.account.ACCOUNT_CONFIG_DISABLED=false
# impl.msghistory
net.java.sip.communicator.service.msghistory.IS_MESSAGE_HISTORY_ENABLED=true

@ -14,6 +14,7 @@
import net.java.sip.communicator.impl.gui.main.*;
import net.java.sip.communicator.plugin.desktoputil.*;
import net.java.sip.communicator.service.gui.*;
import net.java.sip.communicator.util.*;
import net.java.sip.communicator.util.Logger;
import org.jitsi.util.*;
@ -188,11 +189,7 @@ private JComponent createTopComponent()
*/
public void addDefaultForms()
{
Boolean showAccountConfigProp
= GuiActivator.getConfigurationService()
.getBoolean(SHOW_ACCOUNT_CONFIG_PROPERTY, true);
if (showAccountConfigProp.booleanValue())
if (ConfigurationUtils.isShowAccountConfig())
addConfigurationForm(
new LazyConfigurationForm(
"net.java.sip.communicator.impl.gui.main."

@ -91,10 +91,7 @@ public FileMenu(MainFrame parentWindow)
// whether the last item added was a separator
boolean endsWithSeparator = false;
Boolean showAccountConfig = GuiActivator.getConfigurationService()
.getBoolean(ConfigurationFrame.SHOW_ACCOUNT_CONFIG_PROPERTY, true);
if (showAccountConfig.booleanValue())
if (ConfigurationUtils.isShowAccountConfig())
{
newAccountMenuItem = new JMenuItem(
resources.getI18NString("service.gui.NEW_ACCOUNT"));

@ -2283,6 +2283,29 @@ public static boolean isContactListGroupCollapsed(String groupID)
return false;
}
/**
* Indicates if the account configuration is disabled.
*
* @return <tt>true</tt> if the account manual configuration and creation
* is disabled, otherwise return <tt>false</tt>
*/
public static boolean isShowAccountConfig()
{
final String SHOW_ACCOUNT_CONFIG_PROP
= "net.java.sip.communicator.impl.gui.main."
+ "configforms.SHOW_ACCOUNT_CONFIG";
boolean defaultValue
= !Boolean.parseBoolean(UtilActivator.getResources()
.getSettingsString(
"impl.gui.main.account.ACCOUNT_CONFIG_DISABLED"));
Boolean showAccountConfigProp
= configService.getBoolean(SHOW_ACCOUNT_CONFIG_PROP, defaultValue);
return showAccountConfigProp.booleanValue();
}
/**
* Listens for changes of the properties.
*/

Loading…
Cancel
Save