Config config = _app.init(true);
if (preloads) doPredownloads(_app.getResources());
_ifc = new Application.UpdateInterface(config);
+ _status.setAppbase(_app.getAppbase());
}
/**
} else {
proc = _app.createProcess(false);
}
-
+
// close standard in to avoid choking standard out of the launched process
proc.getInputStream().close();
// close standard out, since we're not going to write to anything to it anyway
}
}
+ _container.setVisible(true);
+ _container.validate();
+
// if we have a UI open and we haven't been around for at least 5 seconds (the default
// for min_show_seconds), don't stick a fork in ourselves straight away but give our
// lovely user a chance to see what we're doing
try {
readConfig(false);
Graphics g = _container.getGraphics();
- String imageFile = _ifc.backgroundImage;
- BufferedImage bgImage = loadImage(_ifc.backgroundImage);
- int bwidth = bgImage.getWidth();
- int bheight = bgImage.getHeight();
-
- instantSplashPane = new JPanel() {
- @Override
- protected void paintComponent(Graphics g)
- {
- super.paintComponent(g);
- // attempt to draw a background image...
- if (bgImage != null) {
- g.drawImage(bgImage, 0, 0, this);
- }
- }
- };
-
- instantSplashPane.setSize(bwidth,bheight);
- instantSplashPane.setPreferredSize(new Dimension(bwidth,bheight));
-
- _layers.add(instantSplashPane, Integer.valueOf(0));
-
- _container.setPreferredSize(new Dimension(bwidth,bheight));
+ BufferedImage iBgImage = loadImage(_ifc.instantBackgroundImage);
+ boolean ibg = true;
+ if (iBgImage == null) {
+ iBgImage = loadImage(_ifc.backgroundImage);
+ ibg = false;
+ }
+ if (iBgImage != null) {
+ final BufferedImage bgImage = iBgImage;
+ int bwidth = bgImage.getWidth();
+ int bheight = bgImage.getHeight();
+
+ log.info("Displaying instant background image", ibg?"instant_background_image":"background_image");
+
+ instantSplashPane = new JPanel() {
+ @Override
+ protected void paintComponent(Graphics g)
+ {
+ super.paintComponent(g);
+ // attempt to draw a background image...
+ if (bgImage != null) {
+ g.drawImage(bgImage, 0, 0, this);
+ }
+ }
+ };
+
+ instantSplashPane.setSize(bwidth,bheight);
+ instantSplashPane.setPreferredSize(new Dimension(bwidth,bheight));
+
+ _layers.add(instantSplashPane, Integer.valueOf(0));
+
+ _container.setPreferredSize(new Dimension(bwidth,bheight));
+ }
} catch (Exception e) {
- log.warning("Failed to set instant background image", "bg", _ifc.backgroundImage);
+ log.warning("Failed to set instant background image", "ibg", _ifc.instantBackgroundImage);
}
-
-
_container.add(_layers, BorderLayout.CENTER);
_patchNotes = new JButton(new AbstractAction(_msgs.getString("m.patch_notes")) {
_status.init(_ifc, _background, getProgressImage());
Dimension size = _status.getPreferredSize();
_status.setSize(size);
+ //_status.updateStatusLabel();
_layers.setPreferredSize(size);
_patchNotes.setBounds(_ifc.patchNotes.x, _ifc.patchNotes.y,