allow emit message() in sendcoinsdialog and walletview #3144

pull Diapolo wants to merge 1 commits into bitcoin:master from Diapolo:message_sendcoinsdialog changing 5 files +30 −17
  1. Diapolo commented at 1:52 pm on October 24, 2013: none
    • 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()
  2. in src/qt/walletview.cpp: in f93c70edd4 outdated
    205@@ -203,8 +206,8 @@ bool WalletView::handlePaymentRequest(const SendCoinsRecipient& recipient)
    206     // URI has to be valid
    207     if (sendCoinsPage->handlePaymentRequest(recipient))
    208     {
    209-        gotoSendCoinsPage();
    210         emit showNormalIfMinimized();
    211+        gotoSendCoinsPage();
    


    laanwj commented at 1:57 pm on October 24, 2013:
    Shouldn’t this be gui->gotoSendCoinsPage(), to make sure that the right “tab” button is set as well?

    laanwj commented at 2:03 pm on October 24, 2013:
    [snip] No longer valid after merge of new receive workflow

    Diapolo commented at 2:21 pm on October 24, 2013:
    Will you fix them or shall I do this via this pr?

    laanwj commented at 2:27 pm on October 24, 2013:
    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.

    Diapolo commented at 2:52 pm on October 24, 2013:
    I’ve got a brain-blocker I guess, this should be gui->gotoSendCoinsPage()->walletFrame->gotoSendCoinsPage()->WalletView::gotoSendCoinsPage()… im afraid, this seems still too complex ^^.

    laanwj commented at 7:12 am on October 25, 2013:

    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:

     0bool BitcoinGUI::handlePaymentRequest(const SendCoinsRecipient& recipient)
     1{
     2    // URI has to be valid
     3    if (walletFrame->handlePaymentRequest(recipient))
     4    {
     5        gotoSendCoinsPage();
     6        showNormalIfMinimized();
     7        return true;
     8    }
     9    else
    10        return false;
    11}
    

    Then make the WalletView function simply

    0bool WalletView::handlePaymentRequest(const SendCoinsRecipient& recipient)
    1{
    2    return sendCoinsPage->handlePaymentRequest(recipient));
    3}
    

    This removes all the awkwardness.

  3. in src/qt/walletview.cpp: in f93c70edd4 outdated
    205@@ -203,8 +206,8 @@ bool WalletView::handlePaymentRequest(const SendCoinsRecipient& recipient)
    206     // URI has to be valid
    207     if (sendCoinsPage->handlePaymentRequest(recipient))
    208     {
    209-        gotoSendCoinsPage();
    210         emit showNormalIfMinimized();
    


    Diapolo commented at 2:54 pm on October 24, 2013:
    AFAIK this could also be a gui->showNormalIfMinimized(), which would remove a signal/connect in here?

    laanwj commented at 3:52 pm on October 24, 2013:
    Personally I prefer the signal; I’d like to get rid of propagating the direct gui reference downward some day, but the priority for now is to get this fixed.
  4. Diapolo commented at 2:56 pm on October 24, 2013: none
    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.
  5. Diapolo commented at 11:33 am on October 25, 2013: none
    @laanwj I upated the pull with your recent suggestion and moved handlePaymentRequest() main functionality back to BitcoinGUI. Perhaps you can take another look.
  6. allow emit message() in sendcoinsdialog and walletview
    - 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()
    2384a2864b
  7. BitcoinPullTester commented at 12:49 pm on October 25, 2013: none
    Automatic sanity-testing: PASSED, see http://jenkins.bluematt.me/pull-tester/2384a2864b6a0b29eec6410057aefe1fd8e7e585 for binaries and test log. This test script verifies pulls every time they are updated. It, however, dies sometimes and fails to test properly. If you are waiting on a test, please check timestamps to verify that the test.log is moving at http://jenkins.bluematt.me/pull-tester/current/ Contact BlueMatt on freenode if something looks broken.
  8. laanwj referenced this in commit 0d09b3e8b0 on Oct 25, 2013
  9. laanwj merged this on Oct 25, 2013
  10. laanwj closed this on Oct 25, 2013

  11. jonasschnelli referenced this in commit 7dbc33f617 on Nov 17, 2019
  12. Bushstar referenced this in commit 4b6af8f2c1 on Apr 8, 2020
  13. Bushstar referenced this in commit db7f471c7d on Apr 8, 2020
  14. DrahtBot locked this on Sep 8, 2021

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2024-10-05 07:12 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me