diff options
| author | selsta <selsta@sent.at> | 2020-09-21 00:41:02 +0200 |
|---|---|---|
| committer | selsta <selsta@sent.at> | 2021-08-31 05:26:49 +0200 |
| commit | 99ad8ef1badb460679090b2b3ca64558d899c88e (patch) | |
| tree | 31dba1876803e923f13d5727eba3fd641312b8b2 /pages | |
| parent | d313c2de377e5163a27835d28a835c274ee7abf4 (diff) | |
| download | monzero-gui-99ad8ef1badb460679090b2b3ca64558d899c88e.tar.gz monzero-gui-99ad8ef1badb460679090b2b3ca64558d899c88e.tar.xz monzero-gui-99ad8ef1badb460679090b2b3ca64558d899c88e.zip | |
AddressBook: description edits, remove hack
Co-authored-by: dsc <dsc@xmr.pm>
Diffstat (limited to 'pages')
| -rw-r--r-- | pages/AddressBook.qml | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/pages/AddressBook.qml b/pages/AddressBook.qml index 315892ff..9bb4718e 100644 --- a/pages/AddressBook.qml +++ b/pages/AddressBook.qml @@ -286,11 +286,12 @@ Rectangle { MoneroComponents.Label { fontSize: 32 wrapMode: Text.WordWrap - text: (root.editEntry ? qsTr("Edit an address") : qsTr("Add an address")) + translationManager.emptyString + text: (root.editEntry ? qsTr("Edit entry") : qsTr("Add an address")) + translationManager.emptyString } MoneroComponents.LineEditMulti { id: addressLine + visible: !root.editEntry Layout.topMargin: 20 labelText: "<style type='text/css'>a {text-decoration: none; color: #858585; font-size: 14px;}</style> %1" .arg(qsTr("Address")) + translationManager.emptyString @@ -380,7 +381,7 @@ Rectangle { enabled: root.checkInformation(addressLine.text, appWindow.persistentSettings.nettype) onClicked: { console.log("Add") - if (!currentWallet.addressBook.addRow(addressLine.text.trim(),"", descriptionLine.text)) { + if (!root.editEntry && !currentWallet.addressBook.addRow(addressLine.text.trim(),"", descriptionLine.text)) { informationPopup.title = qsTr("Error") + translationManager.emptyString; // TODO: check currentWallet.addressBook.errorString() instead. if(currentWallet.addressBook.errorCode() === AddressBook.Invalid_Address) @@ -393,11 +394,9 @@ Rectangle { informationPopup.onCloseCallback = null informationPopup.open(); } else { - if (root.editEntry) { - currentWallet.addressBook.deleteRow(addressBookListView.currentIndex); - } - root.showAddressBook(); + currentWallet.addressBook.setDescription(addressBookListView.currentIndex, descriptionLine.text); } + root.showAddressBook() } } |
