Skip to content

Commit

Permalink
gui: improve markup handling of connection type tooltip
Browse files Browse the repository at this point in the history
  • Loading branch information
jonatack committed Jan 10, 2021
1 parent 25203b9 commit 09f4414
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/qt/forms/debugwindow.ui
Original file line number Diff line number Diff line change
Expand Up @@ -1079,7 +1079,7 @@
<item row="1" column="0">
<widget class="QLabel" name="peerConnectionTypeLabel">
<property name="toolTip">
<string>The type of peer connection:&lt;ul&gt;&lt;li&gt;Inbound: initiated by peer&lt;/li&gt;&lt;li&gt;Outbound Full Relay: default&lt;/li&gt;&lt;li&gt;Outbound Block Relay: does not relay transactions or addresses&lt;/li&gt;&lt;li&gt;Outbound Manual: added using RPC %1 or %2/%3 configuration options&lt;/li&gt;&lt;li&gt;Outbound Feeler: short-lived, for testing addresses&lt;/li&gt;&lt;li&gt;Outbound Address Fetch: short-lived, for soliciting addresses&lt;/li&gt;&lt;/ul&gt;</string>
<string>The type of peer connection: %1</string>
</property>
<property name="text">
<string>Connection Type</string>
Expand Down
14 changes: 13 additions & 1 deletion src/qt/rpcconsole.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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("<ul>"
"<li>Inbound Relay: 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>")
.arg("addnode")
.arg(QString(nonbreaking_hyphen) + "addnode")
.arg(QString(nonbreaking_hyphen) + "connect")));

if (platformStyle->getImagesOnButtons()) {
ui->openDebugLogfileButton->setIcon(platformStyle->SingleColorIcon(":/icons/export"));
Expand Down

0 comments on commit 09f4414

Please sign in to comment.