Move editor loading into splash loading thread

This commit is contained in:
skylarmt 2014-12-22 02:25:15 -07:00
parent 3e02924efb
commit 422b4bbbe7

View File

@ -106,22 +106,24 @@ public class SplashScreen extends javax.swing.JFrame {
@Override @Override
public void run() { public void run() {
setProgress(10, "Starting up"); setProgress(10, "Starting up...");
DotThread dt = new DotThread();
dt.start();
if (!MainGUI.skipPython) { if (!MainGUI.skipPython) {
// Python laggggsss when used for first time, this fixes the wait later. // Python laggggsss when used for first time, this fixes the wait later.
System.out.println("Warming up Python engine, to skip run with argument 'skippython'"); System.out.println("Warming up Python engine, to skip run with argument 'skippython'");
setProgress(20, "Initializing code engine"); setProgress(20, "Initializing code engine...");
try { try {
CodeRunner python = new CodeRunner(true); CodeRunner python = new CodeRunner(true);
} catch (Exception ex) { } catch (Exception ex) {
// Ignore // Ignore
} }
} }
setProgress(70, "Loading main interface");
setProgress(50, "Preparing editor...");
// Get editor going too
CodeEditor edit = new CodeEditor();
setProgress(70, "Loading main interface...");
new MainGUI().setVisible(true); new MainGUI().setVisible(true);
dt.kill();
setProgress(100, "Done!"); setProgress(100, "Done!");
dispose(); dispose();
} }