Makes single window user interface property configurable.

cusax-fix
Yana Stamcheva 13 years ago
parent 3f4fa600e0
commit a86e412e2e

@ -138,9 +138,7 @@ void loadApplicationGui()
// Initialize the single window container if we're in this case. This
// should be done before initializing the main window, because he'll
// search for it.
if (Boolean.parseBoolean(
GuiActivator.getResources().getSettingsString(
"impl.gui.SINGLE_WINDOW_INTERFACE")))
if (ConfigurationManager.isSingleWindowInterfaceEnabled())
singleWindowContainer = new SingleWindowContainer();
// Initialize the main window.

@ -243,6 +243,11 @@ public class ConfigurationManager
*/
private static boolean isChatRoomConfigDisabled = false;
/**
* Indicates if the single window interface is enabled.
*/
private static boolean isSingleWindowInterfaceEnabled = false;
/**
* The name of the show smileys property.
*/
@ -261,6 +266,12 @@ public class ConfigurationManager
private static final String CHAT_ROOM_CONFIG_DISABLED_PROP
= "net.java.sip.communicator.service.gui.CHAT_ROOM_CONFIG_DISABLED";
/**
* The name of the single interface property.
*/
private static final String SINGLE_WINDOW_INTERFACE_ENABLED
= "net.java.sip.communicator.service.gui.SINGLE_WINDOW_INTERFACE_ENABLED";
/**
* Loads all user interface configurations.
*/
@ -603,6 +614,25 @@ public static void loadGuiConfigurations()
"ADVANCED_CONFIG_DISABLED",
isAdvancedConfigDisabled);
// Single interface enabled property.
String singleInterfaceEnabledProp
= GuiActivator.getResources().getSettingsString(
SINGLE_WINDOW_INTERFACE_ENABLED);
boolean isEnabled = false;
if (singleInterfaceEnabledProp != null)
isEnabled = Boolean.parseBoolean(singleInterfaceEnabledProp);
else
isEnabled = Boolean.parseBoolean(
GuiActivator.getResources().getSettingsString(
"impl.gui.SINGLE_WINDOW_INTERFACE"));
// Load the advanced account configuration disabled.
isSingleWindowInterfaceEnabled
= configService.getBoolean( SINGLE_WINDOW_INTERFACE_ENABLED,
isEnabled);
if(isFontSupportEnabled())
{
// Load default font family string.
@ -1256,6 +1286,31 @@ public static boolean isAutoAnswerDisableSubmenu()
return autoAnswerDisableSubmenu;
}
/**
* Indicates if the single interface is enabled.
*
* @return <tt>true</tt> if the single window interface is enabled,
* <tt>false</tt> - otherwise
*/
public static boolean isSingleWindowInterfaceEnabled()
{
return isSingleWindowInterfaceEnabled;
}
/**
* Updates the "singleWindowInterface" property through the
* <tt>ConfigurationService</tt>.
*
* @param singleWindowInterface <code>true</code> to indicate that the
* single window interface is enabled, <tt>false</tt> - otherwise
*/
public static void setSingleWindowInterfaceEnabled(boolean isEnabled)
{
isSingleWindowInterfaceEnabled = isEnabled;
configService.setProperty(SINGLE_WINDOW_INTERFACE_ENABLED, isEnabled);
}
/**
* Sets the transparency value for all transparent windows.
*
@ -2090,4 +2145,4 @@ public static boolean hasEnabledVideoFormat(
return encodingConfiguration.hasEnabledFormat(MediaType.VIDEO);
}
}
}
Loading…
Cancel
Save