allow emit message() in sendcoinsdialog and walletview#3144
allow emit message() in sendcoinsdialog and walletview#3144laanwj merged 1 commit intobitcoin:masterfrom Diapolo:message_sendcoinsdialog
Conversation
src/qt/walletview.cpp
Outdated
There was a problem hiding this comment.
Shouldn't this be gui->gotoSendCoinsPage(), to make sure that the right "tab" button is set as well?
There was a problem hiding this comment.
[snip]
No longer valid after merge of new receive workflow
There was a problem hiding this comment.
Will you fix them or shall I do this via this pr?
There was a problem hiding this comment.
If you want to fix it in this PR that'd be easier, otherwise we'll create conflicting pulls, and it's only a two-line change.
There was a problem hiding this comment.
I've got a brain-blocker I guess, this should be gui->gotoSendCoinsPage()->walletFrame->gotoSendCoinsPage()->WalletView::gotoSendCoinsPage()... im afraid, this seems still too complex ^^.
There was a problem hiding this comment.
There is another, better way to go at this; split up the function.
Put the top level handling back in bitcoingui.cpp, where it belongs:
bool BitcoinGUI::handlePaymentRequest(const SendCoinsRecipient& recipient)
{
// URI has to be valid
if (walletFrame->handlePaymentRequest(recipient))
{
gotoSendCoinsPage();
showNormalIfMinimized();
return true;
}
else
return false;
}
Then make the WalletView function simply
bool WalletView::handlePaymentRequest(const SendCoinsRecipient& recipient)
{
return sendCoinsPage->handlePaymentRequest(recipient));
}
This removes all the awkwardness.
|
It also seems to make no sense, as you already use gui->message() anyway, why should we add a connect for message() here? I'm so much confused, need a break. |
|
@laanwj I upated the pull with your recent suggestion and moved |
- this allows us to use emit message() over MessageBox:: or gui->message() calls in sendcoinsdialog and walletview - move main handlePaymentRequest() functionality back to BitcoinGUI - move a showNormalIfMinimized() before gotoSendCoinsPage()
|
Automatic sanity-testing: PASSED, see http://jenkins.bluematt.me/pull-tester/2384a2864b6a0b29eec6410057aefe1fd8e7e585 for binaries and test log. |
allow emit message() in sendcoinsdialog and walletview
5fa28e9 refactor: Remove unused signal (Hennadii Stepanov) Pull request description: `WalletView::showNormalIfMinimized()` signal was introduced in #2872 (dbc0a6a). The only signal emit command was removed in #3144 (2384a28) ACKs for top commit: promag: ACK 5fa28e9. practicalswift: ACK 5fa28e9: nice find emilengler: ACK 5fa28e9 jonasschnelli: utACK 5fa28e9 Tree-SHA512: 4714acf8c683594d3c00523c7b14bc6b94d469418f0cebe4f4b5266ca0e4c45c80d4caf358739eae9231ee4a69c9c902caeb35f3866b99443cf653f89d6d825b
* Fix cache usage in SelectCoinsGroupedByAddresses * Reset cache flags in SelectCoinsGroupedByAddresses when a block is (dis)connected * MakeCollateralAmounts should call SelectCoinsGroupedByAddresses with a limited number of inputs
* Fix cache usage in SelectCoinsGroupedByAddresses * Reset cache flags in SelectCoinsGroupedByAddresses when a block is (dis)connected * MakeCollateralAmounts should call SelectCoinsGroupedByAddresses with a limited number of inputs
calls in sendcoinsdialog and walletview