forked from Public/monero-gui
pause refresh while starting daemon + startup timeout
This commit is contained in:
19
main.qml
19
main.qml
@@ -380,6 +380,9 @@ ApplicationWindow {
|
||||
}
|
||||
|
||||
function startDaemon(flags){
|
||||
// Pause refresh while starting daemon
|
||||
currentWallet.pauseRefresh();
|
||||
|
||||
appWindow.showProcessingSplash(qsTr("Waiting for daemon to start..."))
|
||||
daemonManager.start(flags, persistentSettings.testnet);
|
||||
persistentSettings.daemonFlags = flags
|
||||
@@ -395,6 +398,8 @@ ApplicationWindow {
|
||||
daemonRunning = true;
|
||||
hideProcessingSplash();
|
||||
currentWallet.connected(true);
|
||||
// resume refresh
|
||||
currentWallet.startRefresh();
|
||||
}
|
||||
function onDaemonStopped(){
|
||||
console.log("daemon stopped");
|
||||
@@ -403,6 +408,19 @@ ApplicationWindow {
|
||||
currentWallet.connected(true);
|
||||
}
|
||||
|
||||
function onDaemonStartFailure(){
|
||||
console.log("daemon start failed");
|
||||
hideProcessingSplash();
|
||||
// resume refresh
|
||||
currentWallet.startRefresh();
|
||||
daemonRunning = false;
|
||||
informationPopup.title = qsTr("Daemon failed to start") + translationManager.emptyString;
|
||||
informationPopup.text = qsTr("Please check your wallet and daemon log for errors. You can also try to start %1 manually.").arg((isWindows)? "monerod.exe" : "monerod")
|
||||
informationPopup.icon = StandardIcon.Critical
|
||||
informationPopup.onCloseCallback = null
|
||||
informationPopup.open();
|
||||
}
|
||||
|
||||
function onWalletNewBlock(blockHeight, targetHeight) {
|
||||
// Update progress bar
|
||||
leftPanel.progressBar.updateProgress(blockHeight,targetHeight);
|
||||
@@ -760,6 +778,7 @@ ApplicationWindow {
|
||||
walletManager.walletClosed.connect(onWalletClosed);
|
||||
|
||||
daemonManager.daemonStarted.connect(onDaemonStarted);
|
||||
daemonManager.daemonStartFailure.connect(onDaemonStartFailure);
|
||||
daemonManager.daemonStopped.connect(onDaemonStopped);
|
||||
|
||||
if(!walletsFound()) {
|
||||
|
||||
Reference in New Issue
Block a user