login.properties file moved to main resources folder

cusax-fix
Yana Stamcheva 18 years ago
parent 8edbff0198
commit 197ef9d6c3

@ -15,6 +15,7 @@
import net.java.sip.communicator.impl.gui.main.*;
import net.java.sip.communicator.impl.gui.main.account.*;
import net.java.sip.communicator.impl.gui.main.authorization.*;
import net.java.sip.communicator.impl.gui.utils.*;
import net.java.sip.communicator.impl.gui.utils.Constants;
import net.java.sip.communicator.service.gui.*;
import net.java.sip.communicator.service.protocol.*;
@ -47,12 +48,6 @@ public class LoginManager
private boolean manuallyDisconnected = false;
private static final String RESOURCE_NAME
= "net.java.sip.communicator.impl.gui.main.login.login";
private static final ResourceBundle LOGIN_RESOURCE_BUNDLE
= ResourceBundle.getBundle(RESOURCE_NAME);
/**
* Creates an instance of the <tt>LoginManager</tt>, by specifying the main
* application window.
@ -199,7 +194,7 @@ private void showAccountRegistrationWizard()
// we return and when the requested wizard is added in the gui we will
// directly show it.
String preferredWizardName
= LOGIN_RESOURCE_BUNDLE.getString("preferredAccountWizard");
= LoginProperties.getProperty("preferredAccountWizard");
if (preferredWizardName != null && preferredWizardName.length() > 0)
return;

@ -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 login properties saved in the login.properties file.
*
* @author Yana Stamcheva
*/
public class LoginProperties
{
/**
* 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.login";
/**
* 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