File tree Expand file tree Collapse file tree 3 files changed +13
-9
lines changed Expand file tree Collapse file tree 3 files changed +13
-9
lines changed Original file line number Diff line number Diff line change @@ -766,15 +766,19 @@ QString NetworkToQString(Network net)
766
766
assert (false );
767
767
}
768
768
769
- QString ConnectionTypeToQString (ConnectionType conn_type)
769
+ QString ConnectionTypeToQString (ConnectionType conn_type, bool prepend_direction )
770
770
{
771
+ QString prefix;
772
+ if (prepend_direction) {
773
+ prefix = (conn_type == ConnectionType::INBOUND) ? QObject::tr (" Inbound" ) : QObject::tr (" Outbound" ) + " " ;
774
+ }
771
775
switch (conn_type) {
772
- case ConnectionType::INBOUND: return QObject::tr ( " Inbound " ) ;
773
- case ConnectionType::OUTBOUND_FULL_RELAY: return QObject::tr (" Outbound Full Relay" );
774
- case ConnectionType::BLOCK_RELAY: return QObject::tr (" Outbound Block Relay" );
775
- case ConnectionType::MANUAL: return QObject::tr (" Outbound Manual" );
776
- case ConnectionType::FEELER: return QObject::tr (" Outbound Feeler" );
777
- case ConnectionType::ADDR_FETCH: return QObject::tr (" Outbound Address Fetch" );
776
+ case ConnectionType::INBOUND: return prefix ;
777
+ case ConnectionType::OUTBOUND_FULL_RELAY: return prefix + QObject::tr (" Full Relay" );
778
+ case ConnectionType::BLOCK_RELAY: return prefix + QObject::tr (" Block Relay" );
779
+ case ConnectionType::MANUAL: return prefix + QObject::tr (" Manual" );
780
+ case ConnectionType::FEELER: return prefix + QObject::tr (" Feeler" );
781
+ case ConnectionType::ADDR_FETCH: return prefix + QObject::tr (" Address Fetch" );
778
782
} // no default case, so the compiler can warn about missing cases
779
783
assert (false );
780
784
}
Original file line number Diff line number Diff line change @@ -233,7 +233,7 @@ namespace GUIUtil
233
233
QString NetworkToQString (Network net);
234
234
235
235
/* * Convert enum ConnectionType to QString */
236
- QString ConnectionTypeToQString (ConnectionType conn_type);
236
+ QString ConnectionTypeToQString (ConnectionType conn_type, bool prepend_direction );
237
237
238
238
/* * Convert seconds into a QString with days, hours, mins, secs */
239
239
QString formatDurationStr (int secs);
Original file line number Diff line number Diff line change @@ -1120,7 +1120,7 @@ void RPCConsole::updateDetailWidget()
1120
1120
ui->timeoffset ->setText (GUIUtil::formatTimeOffset (stats->nodeStats .nTimeOffset ));
1121
1121
ui->peerVersion ->setText (QString::number (stats->nodeStats .nVersion ));
1122
1122
ui->peerSubversion ->setText (QString::fromStdString (stats->nodeStats .cleanSubVer ));
1123
- ui->peerConnectionType ->setText (GUIUtil::ConnectionTypeToQString (stats->nodeStats .m_conn_type ));
1123
+ ui->peerConnectionType ->setText (GUIUtil::ConnectionTypeToQString (stats->nodeStats .m_conn_type , /* prepend_direction */ true ));
1124
1124
ui->peerNetwork ->setText (GUIUtil::NetworkToQString (stats->nodeStats .m_network ));
1125
1125
if (stats->nodeStats .m_permissionFlags == PF_NONE) {
1126
1126
ui->peerPermissions ->setText (tr (" N/A" ));
You can’t perform that action at this time.
0 commit comments