forked from I2P_Developers/i2p.i2p
When fetching a theme, if theme config key is not found, write out the default
This is required in order to get the theme config keys of the various apps into themes.config; this way, the routerconsole requires no knowledge of what apps support universal theming, and can just blanket apply themes to all known keys.
This commit is contained in:
@ -289,7 +289,14 @@ public class SnarkManager implements Snark.CompleteListener {
|
||||
if (!_config.containsKey(PROP_STARTUP_DELAY))
|
||||
_config.setProperty(PROP_STARTUP_DELAY, Integer.toString(DEFAULT_STARTUP_DELAY));
|
||||
// Fetch theme
|
||||
_theme = _context.readConfigFile(THEME_CONFIG_FILE).getProperty(PROP_THEME, DEFAULT_THEME);
|
||||
Properties themeProps = _context.readConfigFile(THEME_CONFIG_FILE);
|
||||
_theme = themeProps.getProperty(PROP_THEME);
|
||||
// Ensure that theme config line exists in config file
|
||||
if (_theme == null) {
|
||||
_theme = DEFAULT_THEME;
|
||||
themeProps.put(PROP_THEME, _theme);
|
||||
_context.writeConfigFile(THEME_CONFIG_FILE, themeProps);
|
||||
}
|
||||
updateConfig();
|
||||
}
|
||||
/**
|
||||
|
Reference in New Issue
Block a user