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)
766766 assert (false );
767767}
768768
769- QString ConnectionTypeToQString (ConnectionType conn_type)
769+ QString ConnectionTypeToQString (ConnectionType conn_type, bool prepend_direction )
770770{
771+ QString prefix;
772+ if (prepend_direction) {
773+ prefix = (conn_type == ConnectionType::INBOUND) ? QObject::tr (" Inbound" ) : QObject::tr (" Outbound" ) + " " ;
774+ }
771775 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" );
778782 } // no default case, so the compiler can warn about missing cases
779783 assert (false );
780784}
Original file line number Diff line number Diff line change @@ -233,7 +233,7 @@ namespace GUIUtil
233233 QString NetworkToQString (Network net);
234234
235235 /* * Convert enum ConnectionType to QString */
236- QString ConnectionTypeToQString (ConnectionType conn_type);
236+ QString ConnectionTypeToQString (ConnectionType conn_type, bool prepend_direction );
237237
238238 /* * Convert seconds into a QString with days, hours, mins, secs */
239239 QString formatDurationStr (int secs);
Original file line number Diff line number Diff line change @@ -1120,7 +1120,7 @@ void RPCConsole::updateDetailWidget()
11201120 ui->timeoffset ->setText (GUIUtil::formatTimeOffset (stats->nodeStats .nTimeOffset ));
11211121 ui->peerVersion ->setText (QString::number (stats->nodeStats .nVersion ));
11221122 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 ));
11241124 ui->peerNetwork ->setText (GUIUtil::NetworkToQString (stats->nodeStats .m_network ));
11251125 if (stats->nodeStats .m_permissionFlags == PF_NONE) {
11261126 ui->peerPermissions ->setText (tr (" N/A" ));
You can’t perform that action at this time.
0 commit comments