mirror of
https://github.com/Retropex/bitcoin.git
synced 2025-06-01 23:12:33 +02:00
qt: ensure seperator when adding third-party transaction links
This ensures that if we're going to add an action to open up a transaction in a third-party link (block explorer) that it is seperated into it's own section.
This commit is contained in:
parent
a70a98075a
commit
8177578b29
@ -222,14 +222,17 @@ void TransactionView::setModel(WalletModel *_model)
|
|||||||
{
|
{
|
||||||
// Add third party transaction URLs to context menu
|
// Add third party transaction URLs to context menu
|
||||||
QStringList listUrls = GUIUtil::SplitSkipEmptyParts(_model->getOptionsModel()->getThirdPartyTxUrls(), "|");
|
QStringList listUrls = GUIUtil::SplitSkipEmptyParts(_model->getOptionsModel()->getThirdPartyTxUrls(), "|");
|
||||||
|
bool actions_created = false;
|
||||||
for (int i = 0; i < listUrls.size(); ++i)
|
for (int i = 0; i < listUrls.size(); ++i)
|
||||||
{
|
{
|
||||||
QString url = listUrls[i].trimmed();
|
QString url = listUrls[i].trimmed();
|
||||||
QString host = QUrl(url, QUrl::StrictMode).host();
|
QString host = QUrl(url, QUrl::StrictMode).host();
|
||||||
if (!host.isEmpty())
|
if (!host.isEmpty())
|
||||||
{
|
{
|
||||||
if (i == 0)
|
if (!actions_created) {
|
||||||
contextMenu->addSeparator();
|
contextMenu->addSeparator();
|
||||||
|
actions_created = true;
|
||||||
|
}
|
||||||
/*: Transactions table context menu action to show the
|
/*: Transactions table context menu action to show the
|
||||||
selected transaction in a third-party block explorer.
|
selected transaction in a third-party block explorer.
|
||||||
%1 is a stand-in argument for the URL of the explorer. */
|
%1 is a stand-in argument for the URL of the explorer. */
|
||||||
|
Loading…
Reference in New Issue
Block a user