-
Notifications
You must be signed in to change notification settings - Fork 37.7k
gui: Disable unavailable context menu items in transactions tab #17956
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@kristapsk screenshots "before" and "after" are welcome for GUI-related PRs ;) |
@hebasto Functionality seemed so simple and obvious (just menu items being disabled) that there isn't need for screenshots. But could add. All four pairs of possible before and after screenshots? |
@@ -395,6 +396,8 @@ void TransactionView::contextualMenu(const QPoint &point) | |||
hash.SetHex(selection.at(0).data(TransactionTableModel::TxHashRole).toString().toStdString()); | |||
abandonAction->setEnabled(model->wallet().transactionCanBeAbandoned(hash)); | |||
bumpFeeAction->setEnabled(model->wallet().transactionCanBeBumped(hash)); | |||
copyAddressAction->setEnabled(GUIUtil::hasEntryData(transactionView, 0, TransactionTableModel::AddressRole)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How to test this line of the code?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tested with some JoinMarket transactions, where I had partially imported JM wallet addresses as watchonly (some of tx inputs belonged to the wallet, but no output addresses).
Nice! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Concept ACK.
Looks like I fucked this up. Any hints how to undo this git merge mess? |
475aabc
to
f780d5a
Compare
Ok, figured out myself, addressed comments by @promag. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. ConflictsNo conflicts as of last run. |
Concept ACK. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, good to see user-facing improvements like this.
Tested ACK f780d5a modulo docstring fix.
f780d5a
to
2b18fd2
Compare
Re-ACK 2b18fd2
-/** Check whether a field of the currently selected entry of a view is not empty. Does nothing if
- nothing is selected.
+/** Returns true if the specified field of the currently selected view entry is not empty. |
Is there anything anyone expects me to do more here or this is just forgotten in a long list of pending pull requests? |
@kristapsk the latter, I think. I agree this would be good, for now it needs a couple more reviewers' eyes on it. |
Concept ACK. May I suggest to:
? |
codereview utACK 2b18fd2 |
…ransactions tab 2b18fd2 Disable unavailable context menu items in transactions tab (Kristaps Kaupe) Pull request description: Fixes bitcoin#9192. ACKs for top commit: jonatack: Re-ACK 2b18fd2 jonasschnelli: codereview utACK 2b18fd2 Tree-SHA512: 4ea19c7b5976f1f0b1baecccb3077cf82f078af7257f92162686bcce2188efe49511a5f557853bc5fe0b10616708957d61c006944babbe60b8105e78751e865f
Summary: Disable "Copy label" and "Copy address" context menu actions when no label or address is available for a transaction. This is a backport of [[bitcoin/bitcoin#17956 | core#17956]] Test Plan: `ninja && src/qt/bitcoin-qt` Right click on a transaction with no label. Reviewers: #bitcoin_abc, majcosta Reviewed By: #bitcoin_abc, majcosta Differential Revision: https://reviews.bitcoinabc.org/D9925
Fixes #9192.