Application main constants moved to application.properties file in the main resources directory.

cusax-fix
Yana Stamcheva 18 years ago
parent 4395173b90
commit bba761f2b4

@ -1354,14 +1354,8 @@ javax.swing.event, javax.swing.border"/>
prefix="net/java/sip/communicator/service/gui"/>
<zipfileset dir="${dest}/net/java/sip/communicator/impl/gui"
prefix="net/java/sip/communicator/impl/gui"/>
<zipfileset dir="${resources}/images/logo"
prefix="resources/images/logo"/>
<zipfileset dir="${resources}/images/impl/gui"
prefix="resources/images/impl/gui"/>
<zipfileset dir="${resources}/styles"
prefix="resources/styles"/>
<zipfileset dir="${resources}/colors"
prefix="resources/colors"/>
<zipfileset dir="${resources}"
prefix="resources"/>
</jar>
</target>
@ -1561,12 +1555,8 @@ javax.swing.event, javax.swing.border"/>
manifest="${src}/net/java/sip/communicator/plugin/branding/branding.manifest.mf">
<zipfileset dir="${dest}/net/java/sip/communicator/plugin/branding"
prefix="net/java/sip/communicator/plugin/branding"/>
<zipfileset dir="${resources}/images/plugin/branding"
prefix="resources/images/plugin/branding"/>
<zipfileset dir="${resources}/styles"
prefix="resources/styles"/>
<zipfileset dir="${resources}/colors"
prefix="resources/colors"/>
<zipfileset dir="${resources}"
prefix="resources"/>
</jar>
</target>
@ -1619,6 +1609,8 @@ javax.swing.event, javax.swing.border"/>
<zipfileset src="${lib.noinst}/jcalendar-1.3.2.jar" prefix=""/>
<zipfileset dir="${resources}/images/plugin/extendedcallhistorysearch"
prefix="resources/images/plugin/extendedcallhistorysearch"/>
<zipfileset dir="${resources}/colors"
prefix="resources/colors"/>
</jar>
</target>

@ -0,0 +1,57 @@
/*
* SIP Communicator, the OpenSource Java VoIP and Instant Messaging client.
*
* Distributable under LGPL license.
* See terms of license at gnu.org.
*/
package net.java.sip.communicator.impl.gui.utils;
import java.util.*;
import net.java.sip.communicator.util.*;
/**
* Accesses all application properties saved in the application.properties file.
*
* @author Yana Stamcheva
*/
public class ApplicationProperties
{
/**
* Logger for this class.
*/
private static Logger log = Logger.getLogger(ColorResources.class);
/**
* Name of the bundle where we will search for color resources.
*/
private static final String BUNDLE_NAME
= "resources.application";
/**
* Bundle which handle access to localized resources.
*/
private static final ResourceBundle PROPERTIES_BUNDLE = ResourceBundle
.getBundle( BUNDLE_NAME);
/**
* Returns the application property corresponding to the given key.
*
* @param key The key of the string.
*
* @return the application property corresponding to the given key
*/
public static String getProperty(String key)
{
try
{
return PROPERTIES_BUNDLE.getString(key);
}
catch (MissingResourceException e)
{
log.error("Missing property.", e);
return "";
}
}
}
Loading…
Cancel
Save