reorganize resource files

This commit is contained in:
bancika
2020-03-22 00:38:19 +01:00
parent bc7df76c3e
commit e93a82f9fd
10 changed files with 16 additions and 10 deletions
@@ -61,7 +61,15 @@ public class DIYLCStarter {
public static void main(String[] args) {
// Initialize splash screen
final SplashScreen splash = SplashScreen.getSplashScreen();
new DIYLCSplash(splash).start();
URL splashUrl = Presenter.class.getClassLoader().getResource("org/diylc/splash.png");
if (splash != null) {
try {
splash.setImageURL(splashUrl);
new DIYLCSplash(splash).start();
} catch (NullPointerException | IllegalStateException | IOException e1) {
LOG.error("Could not initialize splash screen", e1);
}
}
URL url = DIYLCStarter.class.getResource("log4j.properties");
Properties properties = new Properties();
@@ -148,7 +156,7 @@ public class DIYLCStarter {
properties = new Properties();
try {
LOG.info("Injecting default properties.");
URL resource = Presenter.class.getClassLoader().getResource("config.properties");
URL resource = Presenter.class.getResource("config.properties");
if (resource != null) {
properties.load(resource.openStream());
PropertyInjector.injectProperties(properties);
@@ -0,0 +1,6 @@
# Uncomment lines you want to edit and change the part after the "=" sign.
#org.diylc.presenter.InstantiationManager.MAX_RECENT_COMPONENTS=20
#org.diylc.swing.plugins.canvas.CanvasPanel.USE_HARDWARE_ACCELLERATION=true
#org.diylc.swingframework.ruler.Ruler.USE_HARDWARE_ACCELLERATION=true
#org.diylc.swing.gui.editor.PropertyEditorDialog.SHOW_DEFAULT_BOXES=true
#org.diylc.swing.plugins.autosave.AutoSavePlugin.MAX_TOTAL_SIZE_MB=64
Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

@@ -442,7 +442,7 @@ public class MainFrame extends JFrame implements ISwingUI {
fileName = "Untitled";
}
String modified = (Boolean) params[1] ? " (modified)" : "";
setTitle(String.format("DIYLC G3 version %s.%s - %s %s", plugInPort.getCurrentVersionNumber().getMinor(),
setTitle(String.format("DIYLC G4 version %s.%s - %s %s", plugInPort.getCurrentVersionNumber().getMinor(),
plugInPort.getCurrentVersionNumber().getBuild(), fileName, modified));
}
}