qt: Make it possible to show details for multiple transactions #7939

pull laanwj wants to merge 2 commits into bitcoin:master from laanwj:2016_04_qt_multiple_transaction_details changing 3 files +5 −3
  1. laanwj commented at 2:05 PM on April 25, 2016: member

    A small GUI annoyance for me has always been that it's impossible to have multiple transaction detail windows open, for example to compare transactions.

    This patch makes the window non-modal so that it is possible to open transaction details at will.

  2. laanwj added the label GUI on Apr 25, 2016
  3. qt: Make it possible to show details for multiple transactions
    A small GUI annoyance for me has always been that it's impossible to
    have multiple transaction detail windows open, for example to compare
    transactions.
    
    This patch makes the window non-modal so that it is possible to open
    transaction details at will.
    17a6a21786
  4. laanwj force-pushed on Apr 25, 2016
  5. jonasschnelli commented at 2:06 PM on April 25, 2016: contributor

    Nice! Also though about this. Thanks.

    utACK 1f3b3fd48bb6c5787893529862430bd77b2c7fb3

  6. laanwj commented at 3:14 PM on April 25, 2016: member

    Another thing to consider here now may be to add some information to the window title. After all if there are multiple open it may be useful to distinguish them in taskbars etc.

    I'm not sure on what to add though; transaction id seems to be of limited usefulness. Maybe date/recipient/amount.

  7. paveljanik commented at 3:19 PM on April 25, 2016: contributor

    Numbering the windows?

  8. laanwj commented at 3:21 PM on April 25, 2016: member

    Numbering doesn't seem more useful to me than just keeping them with the same window title. It needs to actually identify the transaction. (also this opens up issues with reusing or not reusing numbers, I'd rather just add (part of) the transaction id in that case)

  9. jonasschnelli commented at 3:23 PM on April 25, 2016: contributor

    What about the shortened transaction id (middle truncated). Something like 4d8fad...8dd9f9 for 4d8fad408da55d4b54e3be97960db06d78489f5984e0a6e8ada082295e8dd9f9?

  10. paveljanik commented at 3:48 PM on April 25, 2016: contributor

    Full tx ID. window manager/... will shorten it if needed (ie. Transaction details: tx_id).

  11. jonasschnelli commented at 4:35 PM on April 25, 2016: contributor

    To make this work on OSX (not sure about Windows) you need to make the dialog non-modal.

    diff --git a/src/qt/transactionview.cpp b/src/qt/transactionview.cpp
    index eb6111e..bfdd7a4 100644
    --- a/src/qt/transactionview.cpp
    +++ b/src/qt/transactionview.cpp
    @@ -480,6 +480,7 @@ void TransactionView::showDetails()
         {
             TransactionDescDialog *dlg = new TransactionDescDialog(selection.at(0));
             dlg->setAttribute(Qt::WA_DeleteOnClose);
    +        dlg->setModal(false);
             dlg->show();
         }
     }
    
  12. jonasschnelli commented at 7:29 PM on April 25, 2016: contributor

    I tested with the full transaction-ID as window title. LGTM. <img width="942" alt="bildschirmfoto 2016-04-25 um 21 27 50" src="https://cloud.githubusercontent.com/assets/178464/14796268/be111e20-0b2c-11e6-8b31-e55bb8584027.png">

    diff --git a/src/qt/transactiondescdialog.cpp b/src/qt/transactiondescdialog.cpp
    index f7b6995..5c10d84 100644
    --- a/src/qt/transactiondescdialog.cpp
    +++ b/src/qt/transactiondescdialog.cpp
    @@ -15,6 +15,7 @@ TransactionDescDialog::TransactionDescDialog(const QModelIndex &idx, QWidget *pa
     {
         ui->setupUi(this);
         QString desc = idx.data(TransactionTableModel::LongDescriptionRole).toString();
    +    setWindowTitle(tr("Details for %1").arg(idx.data(TransactionTableModel::TxHashRole).toString()));
         ui->detailText->setHtml(desc);
     }
    
  13. laanwj commented at 5:12 AM on April 26, 2016: member

    @jonasschnelli: Interesting, do you know why is this necessary specifically here, how about the other places where we use setAttribute(Qt::WA_DeleteOnClose)?

    • src/qt/receivecoinsdialog.cpp: on_receiveButton_clicked, on_recentRequestsView_doubleClicked
    • src/qt/walletview.cpp: WalletView::gotoSignMessageTab, WalletView::gotoVerifyMessageTab

    (excluding the splash window and the shutdown window as they are special cases anyway)

  14. laanwj commented at 5:17 AM on April 26, 2016: member

    From the QDialog documentation: http://doc.qt.io/qt-5/qdialog.html#modal-prop "By default, this property is false"

    It's only dlg->exec() which sets it to true, which we don't use anymore (here). I don't think we need to set it.

    Edit: screenshot looks good, I do think we should prefix the title Transaction details: though so we don't get an all-hex title :)

  15. paveljanik commented at 6:09 AM on April 26, 2016: contributor

    Works OK here, even without setModal(false).

  16. jonasschnelli commented at 6:10 AM on April 26, 2016: contributor

    Right. setModal() is not required. Was a local issue here.

  17. jonasschnelli commented at 6:15 AM on April 26, 2016: contributor

    Using "Details for" instead of "Transaction Details" would not truncate the window title (at least on OSX).

    <img width="732" alt="bildschirmfoto 2016-04-26 um 08 13 21" src="https://cloud.githubusercontent.com/assets/178464/14808587/c46bc766-0b86-11e6-8e60-a72abb420ca5.png">

    Tested ACK 17a6a217867603f349de676739f072c789c3918f.

  18. laanwj commented at 7:35 AM on April 26, 2016: member

    Yes, Abbreviating to "Details for %s" makes sense, will do that, it was just that having the whole title hex was a bit too cypherpunk even for me :)

  19. qt: Add transaction hash to details window title f135e3c943
  20. laanwj force-pushed on Apr 26, 2016
  21. laanwj commented at 2:05 PM on April 26, 2016: member

    Added a new commit that puts the tx id in the window title (as well as removes the old "Transaction details" translation string).

  22. laanwj merged this on Apr 28, 2016
  23. laanwj closed this on Apr 28, 2016

  24. laanwj referenced this in commit 574ddc63d6 on Apr 28, 2016
  25. codablock referenced this in commit 8ff296abe5 on Sep 16, 2017
  26. codablock referenced this in commit 231f4620e2 on Sep 19, 2017
  27. codablock referenced this in commit c8bb792f41 on Dec 20, 2017
  28. 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-13 15:15 UTC

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