forked from Qortal/qortal
Show version number in the "Starting Qortal Core" status.
This commit is contained in:
parent
f09fb5a209
commit
fc8e38e862
@ -312,6 +312,10 @@ public class Controller extends Thread {
|
||||
return this.buildVersion;
|
||||
}
|
||||
|
||||
public String getVersionStringWithoutPrefix() {
|
||||
return this.buildVersion.replaceFirst(VERSION_PREFIX, "");
|
||||
}
|
||||
|
||||
/** Returns current blockchain height, or 0 if it's not available. */
|
||||
public int getChainHeight() {
|
||||
synchronized (this.latestBlocks) {
|
||||
|
@ -9,6 +9,7 @@ import javax.swing.*;
|
||||
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.qortal.controller.Controller;
|
||||
|
||||
public class SplashFrame {
|
||||
|
||||
@ -39,7 +40,8 @@ public class SplashFrame {
|
||||
add(imageLabel);
|
||||
|
||||
// Add status label
|
||||
statusLabel = new JLabel("Starting Qortal Core...", JLabel.CENTER);
|
||||
String text = String.format("Starting Qortal Core v%s...", Controller.getInstance().getVersionStringWithoutPrefix());
|
||||
statusLabel = new JLabel(text, JLabel.CENTER);
|
||||
statusLabel.setMaximumSize(new Dimension(500, 50));
|
||||
statusLabel.setFont(new Font("Verdana", Font.PLAIN, 22));
|
||||
statusLabel.setBackground(new Color(255, 255, 255));
|
||||
|
@ -9,6 +9,7 @@ import java.util.stream.Collectors;
|
||||
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.qortal.controller.Controller;
|
||||
import org.qortal.controller.tradebot.BitcoinACCTv1TradeBot;
|
||||
import org.qortal.gui.SplashFrame;
|
||||
|
||||
@ -33,7 +34,8 @@ public class HSQLDBDatabaseUpdates {
|
||||
while (databaseUpdating(connection, wasPristine))
|
||||
incrementDatabaseVersion(connection);
|
||||
|
||||
SplashFrame.getInstance().updateStatus("Starting Qortal Core...");
|
||||
String text = String.format("Starting Qortal Core v%s...", Controller.getInstance().getVersionStringWithoutPrefix());
|
||||
SplashFrame.getInstance().updateStatus(text);
|
||||
|
||||
return wasPristine;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user