keep all models and various UI items updated on new transactions
This commit is contained in:
@@ -45,6 +45,8 @@ Frame {
|
||||
}
|
||||
}
|
||||
|
||||
// instead of all these explicit connections, we should expose
|
||||
// formatted balances directly as a property
|
||||
Connections {
|
||||
target: Config
|
||||
function onBaseUnitChanged() { setBalances() }
|
||||
@@ -56,5 +58,12 @@ Frame {
|
||||
function onWalletLoaded() { setBalances() }
|
||||
}
|
||||
|
||||
Connections {
|
||||
target: Daemon.currentWallet
|
||||
function onBalanceChanged() {
|
||||
setBalances()
|
||||
}
|
||||
}
|
||||
|
||||
Component.onCompleted: setBalances()
|
||||
}
|
||||
|
||||
@@ -133,4 +133,10 @@ Pane {
|
||||
|
||||
}
|
||||
|
||||
Connections {
|
||||
target: Network
|
||||
function onHeightChanged(height) {
|
||||
Daemon.currentWallet.historyModel.updateBlockchainHeight(height)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -347,4 +347,11 @@ Pane {
|
||||
}
|
||||
}
|
||||
|
||||
Connections {
|
||||
target: Daemon.currentWallet
|
||||
function onRequestStatusChanged(key, status) {
|
||||
Daemon.currentWallet.requestModel.updateRequest(key, status)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -13,11 +13,10 @@ Dialog {
|
||||
|
||||
parent: Overlay.overlay
|
||||
modal: true
|
||||
standardButtons: Dialog.Ok
|
||||
|
||||
width: parent.width - constants.paddingXLarge
|
||||
height: parent.height - constants.paddingXLarge
|
||||
x: (parent.width - width) / 2
|
||||
y: (parent.height - height) / 2
|
||||
width: parent.width
|
||||
height: parent.height
|
||||
|
||||
Overlay.modal: Rectangle {
|
||||
color: "#aa000000"
|
||||
@@ -42,6 +41,7 @@ Dialog {
|
||||
icon.width: 32
|
||||
icon.height: 32
|
||||
onClicked: dialog.close()
|
||||
visible: false
|
||||
}
|
||||
}
|
||||
GridLayout {
|
||||
@@ -122,13 +122,19 @@ Dialog {
|
||||
text: qsTr('Address')
|
||||
}
|
||||
Label {
|
||||
Layout.columnSpan: 2
|
||||
Layout.fillWidth: true
|
||||
font.family: FixedFont
|
||||
font.pixelSize: constants.fontSizeLarge
|
||||
wrapMode: Text.WrapAnywhere
|
||||
text: modelItem.address
|
||||
}
|
||||
ToolButton {
|
||||
icon.source: '../../icons/copy.png'
|
||||
icon.color: 'transparent'
|
||||
onClicked: {
|
||||
AppController.textToClipboard(modelItem.address)
|
||||
}
|
||||
}
|
||||
|
||||
Label {
|
||||
text: qsTr('Status')
|
||||
@@ -162,4 +168,12 @@ Dialog {
|
||||
}
|
||||
}
|
||||
|
||||
Connections {
|
||||
target: Daemon.currentWallet
|
||||
function onRequestStatusChanged(key, code) {
|
||||
if (key != modelItem.key)
|
||||
return
|
||||
modelItem = Daemon.currentWallet.get_request(key)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user