mirror of
https://github.com/moparisthebest/davmail
synced 2025-01-12 05:58:48 -05:00
Display settings frame on first start
git-svn-id: http://svn.code.sf.net/p/davmail/code/trunk@71 3d1905a2-6b24-0410-a738-b14d5a86fcbd
This commit is contained in:
parent
de0f622378
commit
a91a0e159d
@ -183,6 +183,11 @@ public class DavGatewayTray {
|
||||
} catch (AWTException e) {
|
||||
System.err.println(e);
|
||||
}
|
||||
|
||||
// display settings frame on first start
|
||||
if (Settings.isFirstStart()) {
|
||||
settingsFrame.setVisible(true);
|
||||
}
|
||||
}
|
||||
|
||||
} catch (NoClassDefFoundError e) {
|
||||
|
@ -15,10 +15,15 @@ public class Settings {
|
||||
|
||||
private static final Properties SETTINGS = new Properties();
|
||||
private static String configFilePath;
|
||||
private static boolean isFirstStart;
|
||||
|
||||
public static synchronized void setConfigFilePath(String value) {
|
||||
configFilePath = value;
|
||||
}
|
||||
|
||||
public static boolean isFirstStart() {
|
||||
return isFirstStart;
|
||||
}
|
||||
|
||||
public static synchronized void load() {
|
||||
FileReader fileReader = null;
|
||||
@ -32,9 +37,12 @@ public class Settings {
|
||||
fileReader = new FileReader(configFile);
|
||||
SETTINGS.load(fileReader);
|
||||
} else {
|
||||
isFirstStart = true;
|
||||
|
||||
// first start : set default values, ports above 1024 for linux
|
||||
SETTINGS.put("davmail.url", "http://exchangeServer/exchange/");
|
||||
SETTINGS.put("davmail.popPort", "110");
|
||||
SETTINGS.put("davmail.smtpPort", "25");
|
||||
SETTINGS.put("davmail.popPort", "1110");
|
||||
SETTINGS.put("davmail.smtpPort", "1025");
|
||||
SETTINGS.put("davmail.keepDelay", "30");
|
||||
SETTINGS.put("davmail.enableProxy", "false");
|
||||
SETTINGS.put("davmail.proxyHost", "");
|
||||
|
Loading…
Reference in New Issue
Block a user