Bitcoin-Qt: add "send coins" to context menu in addressbook #2215

pull Diapolo wants to merge 1 commits into bitcoin:master from Diapolo:Qt_sendfrom_addrbook changing 8 files +56 −4
  1. Diapolo commented at 5:51 PM on January 25, 2013: none
    • allows to directly select an address from the addressbook, chose "send coins" from the context menu, which sends you to sendcoins tab and fills in the selected address

    Fixes: #2176 and #861

  2. BitcoinPullTester commented at 6:04 PM on January 25, 2013: none

    Automatic sanity-testing: FAILED BUILD/TEST, see http://jenkins.bluematt.me/pull-tester/cf39a9f398e190199dd453947e2724ba860b9f98 for binaries and test log.

    This could happen for one of several reasons:

    1. It chanages paths in makefile.linux-mingw or otherwise changes build scripts in a way that made them incompatible with the automated testing scripts
    2. It does not build on either Linux i386 or Win32 (via MinGW cross compile)
    3. The test suite fails on either Linux i386 or Win32
    4. The block test-cases failed (lookup the first bNN identifier which failed in https://github.com/TheBlueMatt/test-scripts/blob/master/FullBlockTestGenerator.java)
  3. BitcoinPullTester commented at 6:33 PM on January 25, 2013: none

    Automatic sanity-testing: PASSED, see http://jenkins.bluematt.me/pull-tester/20b6c6089480e4d9ac9602dbfe5affd3f9625b23 for binaries and test log.

  4. Diapolo commented at 10:32 AM on January 27, 2013: none

    @luke-jr It was one of your feature-requests, can you take a look if this does what you wanted ;)?

  5. in src/qt/addressbookpage.cpp:None in 20b6c60894 outdated
      16 | @@ -17,6 +17,13 @@
      17 |  #include "qrcodedialog.h"
      18 |  #endif
      19 |  
      20 | +// Used to pass flags to the AddressBookPage::processCtxMenuClick() function
      21 | +enum CtxMenuClickFlags {
    


    laanwj commented at 5:47 PM on February 6, 2013:

    No need to make this 'flags', it can be simply an enum as you're using 'case' to distinguish the cases


    Diapolo commented at 5:51 PM on February 6, 2013:

    Are you talking about just renaming it to to CtxMenuClick?

  6. in src/qt/addressbookpage.cpp:None in 20b6c60894 outdated
     192 | @@ -182,7 +193,7 @@ void AddressBookPage::onEditAction()
     193 |      dlg.exec();
     194 |  }
     195 |  
     196 | -void AddressBookPage::on_signMessage_clicked()
     197 | +void AddressBookPage::processCtxMenuClick(unsigned int nFlags)
    


    laanwj commented at 5:49 PM on February 6, 2013:

    I'm not so happy with this intermediate function, as it adds an extra level of indirection thus makes the source harder to read; any reason not to just emit the signals from the signal handlers directly?


    Diapolo commented at 5:52 PM on February 6, 2013:

    I saw that we have to duplicate code in there, which I thought would fit into such a function.


    laanwj commented at 5:55 PM on February 6, 2013:

    True, but IMO the added case statement and enum definition adds as much code as you save, and is more complicated

  7. Diapolo commented at 6:58 AM on February 7, 2013: none

    @laanwj Addressed your concerns :).

  8. BitcoinPullTester commented at 7:33 AM on February 7, 2013: none

    Automatic sanity-testing: PASSED, see http://jenkins.bluematt.me/pull-tester/b621e2841b18822247bf18dab1b614182d55086a for binaries and test log.

  9. in src/qt/addressbookpage.cpp:None in b621e2841b outdated
     209 | @@ -206,6 +210,18 @@ void AddressBookPage::on_verifyMessage_clicked()
     210 |      }
     211 |  }
     212 |  
     213 | +void AddressBookPage::onSendCoins_clicked()
     214 | +{
     215 | +    QTableView *table = ui->tableView;
     216 | +    QModelIndexList indexes = table->selectionModel()->selectedRows(AddressTableModel::Address);
    


    laanwj commented at 10:02 AM on February 7, 2013:

    I see what you meant with duplicate code now. The best way to get rid of this would have been to factor out the utility code (ie, make a getSelectedIndices). Then again, the overhead is pretty minimal, so it's not really needed.

  10. laanwj commented at 10:02 AM on February 7, 2013: member

    ACK

  11. Diapolo commented at 5:59 PM on March 17, 2013: none

    @laanwj I'll rebase after the header / cpp cleanup got in, so perhaps we can also get this in soonTM.

  12. Bitcoin-Qt: add "send coins" to context menu in addressbook
    - allows to directly select an address from the addressbook, chose "send
      coins" from the context menu, which sends you to sendcoins tab and fills
      in the selected address
    311993ab10
  13. BitcoinPullTester commented at 7:58 AM on March 18, 2013: none

    Automatic sanity-testing: PASSED, see http://jenkins.bluematt.me/pull-tester/311993ab106c250a1779bfdb649cf4f8c2416fb5 for binaries and test log.

  14. laanwj commented at 9:00 AM on March 18, 2013: member

    Yes, this one should be merged asap

  15. laanwj referenced this in commit f42720d0f6 on Mar 19, 2013
  16. laanwj merged this on Mar 19, 2013
  17. laanwj closed this on Mar 19, 2013

  18. laudney referenced this in commit bd2bf82ae3 on Mar 19, 2014
  19. 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: 2026-04-14 18:16 UTC

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