From 192bfc70b0a45ec93e6cbfe4b04afa9d41009c0d Mon Sep 17 00:00:00 2001 From: "moneromooo.monero" Date: Sat, 31 Dec 2016 13:47:40 +0000 Subject: [PATCH] Add "(syncing)" after balance when syncing Should cut down on people wondering why their balance is wrong --- LeftPanel.qml | 2 ++ MiddlePanel.qml | 5 +++-- main.qml | 7 +++++++ 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/LeftPanel.qml b/LeftPanel.qml index d4871059..2e926308 100644 --- a/LeftPanel.qml +++ b/LeftPanel.qml @@ -35,6 +35,7 @@ Rectangle { id: panel property alias unlockedBalanceText: unlockedBalanceText.text + property alias balanceLabelText: balanceLabel.text property alias balanceText: balanceText.text property alias networkStatus : networkStatus property alias progressBar : progressBar @@ -109,6 +110,7 @@ Rectangle { spacing: 5 Label { + id: balanceLabel text: qsTr("Balance") + translationManager.emptyString anchors.left: parent.left anchors.leftMargin: 50 diff --git a/MiddlePanel.qml b/MiddlePanel.qml index b21da0c0..94ecc17e 100644 --- a/MiddlePanel.qml +++ b/MiddlePanel.qml @@ -42,6 +42,7 @@ Rectangle { property Item currentView property Item previousView property bool basicMode : false + property string balanceLabelText: qsTr("Balance") property string balanceText property string unlockedBalanceText @@ -198,7 +199,7 @@ Rectangle { columns: 3 Text { - + id: balanceLabel width: 116 height: 20 font.family: "Arial" @@ -208,7 +209,7 @@ Rectangle { horizontalAlignment: Text.AlignLeft verticalAlignment: Text.AlignBottom color: "#535353" - text: qsTr("Balance:") + text: root.balanceLabelText + ":" } Text { diff --git a/main.qml b/main.qml index e3bc1871..1ee677a4 100644 --- a/main.qml +++ b/main.qml @@ -219,6 +219,7 @@ ApplicationWindow { function connectWallet(wallet) { showProcessingSplash("Please wait...") currentWallet = wallet + updateSyncing(false) // connect handlers currentWallet.refreshed.connect(onWalletRefresh) @@ -307,6 +308,7 @@ ApplicationWindow { // TODO: implement onDaemonSynced or similar in wallet API and don't start refresh thread before daemon is synced daemonSynced = (currentWallet.connected != Wallet.ConnectionStatus_Disconnected && dCurrentBlock >= dTargetBlock) leftPanel.progressBar.updateProgress(dCurrentBlock,dTargetBlock); + updateSyncing((currentWallet.connected !== Wallet.ConnectionStatus_Disconnected) && (dCurrentBlock < dTargetBlock)) middlePanel.updateStatus(); // If wallet isnt connected and no daemon is running - Ask @@ -615,6 +617,11 @@ ApplicationWindow { informationPopup.open() } + function updateSyncing(syncing) { + var text = (syncing ? qsTr("Balance (syncing)") : qsTr("Balance")) + translationManager.emptyString + leftPanel.balanceLabelText = text + middlePanel.balanceLabelText = text + } // blocks UI if wallet can't be opened or no connection to the daemon function enableUI(enable) {