From 09f441450970ba531b2ed0ac2b22bd0a742e1db1 Mon Sep 17 00:00:00 2001 From: Jon Atack Date: Sun, 10 Jan 2021 14:42:28 +0100 Subject: [PATCH] gui: improve markup handling of connection type tooltip --- src/qt/forms/debugwindow.ui | 2 +- src/qt/rpcconsole.cpp | 14 +++++++++++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/src/qt/forms/debugwindow.ui b/src/qt/forms/debugwindow.ui index bce578a1584..3831852185a 100644 --- a/src/qt/forms/debugwindow.ui +++ b/src/qt/forms/debugwindow.ui @@ -1079,7 +1079,7 @@ - The type of peer connection:<ul><li>Inbound: initiated by peer</li><li>Outbound Full Relay: default</li><li>Outbound Block Relay: does not relay transactions or addresses</li><li>Outbound Manual: added using RPC %1 or %2/%3 configuration options</li><li>Outbound Feeler: short-lived, for testing addresses</li><li>Outbound Address Fetch: short-lived, for soliciting addresses</li></ul> + The type of peer connection: %1 Connection Type diff --git a/src/qt/rpcconsole.cpp b/src/qt/rpcconsole.cpp index 24fa9033753..1432f00d92c 100644 --- a/src/qt/rpcconsole.cpp +++ b/src/qt/rpcconsole.cpp @@ -463,7 +463,19 @@ RPCConsole::RPCConsole(interfaces::Node& node, const PlatformStyle *_platformSty ui->dataDir->setToolTip(ui->dataDir->toolTip().arg(QString(nonbreaking_hyphen) + "datadir")); ui->blocksDir->setToolTip(ui->blocksDir->toolTip().arg(QString(nonbreaking_hyphen) + "blocksdir")); ui->openDebugLogfileButton->setToolTip(ui->openDebugLogfileButton->toolTip().arg(PACKAGE_NAME)); - ui->peerConnectionTypeLabel->setToolTip(ui->peerConnectionTypeLabel->toolTip().arg("addnode").arg(QString(nonbreaking_hyphen) + "addnode").arg(QString(nonbreaking_hyphen) + "connect")); + ui->peerConnectionTypeLabel->setToolTip( + ui->peerConnectionTypeLabel->toolTip() + .arg(tr("
    " + "
  • Inbound Relay: initiated by peer
  • " + "
  • Outbound Full Relay: default
  • " + "
  • Outbound Block Relay: does not relay transactions or addresses
  • " + "
  • Outbound Manual: added using RPC %1 or %2/%3 configuration options
  • " + "
  • Outbound Feeler: short-lived, for testing addresses
  • " + "
  • Outbound Address Fetch: short-lived, for soliciting addresses
  • " + "
") + .arg("addnode") + .arg(QString(nonbreaking_hyphen) + "addnode") + .arg(QString(nonbreaking_hyphen) + "connect"))); if (platformStyle->getImagesOnButtons()) { ui->openDebugLogfileButton->setIcon(platformStyle->SingleColorIcon(":/icons/export"));