From 58cf788d6d961ad03a45dc616a39ecad1756425a Mon Sep 17 00:00:00 2001 From: notdefine Date: Sat, 27 Sep 2008 14:48:57 +0000 Subject: [PATCH] Update Network Tab. git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@737 b45a01b8-16f6-495d-af2f-9b41ad6348cc --- retroshare-gui/src/gui/NetworkDialog.cpp | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/retroshare-gui/src/gui/NetworkDialog.cpp b/retroshare-gui/src/gui/NetworkDialog.cpp index b512a2f45..b060b7183 100644 --- a/retroshare-gui/src/gui/NetworkDialog.cpp +++ b/retroshare-gui/src/gui/NetworkDialog.cpp @@ -298,30 +298,35 @@ void NetworkDialog::insertConnect() if (detail.lastConnect==0 ) { if(detail.state & RS_PEER_STATE_FRIEND) { out << "Friend never seen"; + item -> setText(3, QString::fromStdString(out.str())); } else { - out << "0"; // Is zero + // Show that there is no Trust + item -> setText(3, QString::fromStdString(RsPeerTrustString(detail.trustLvl))); } - item -> setText(3, QString::fromStdString(out.str())); } else { // Dont Show a timestamp in RS calculate the day QDateTime datum = QDateTime::fromTime_t(detail.lastConnect); // out << datum.toString(Qt::LocalDate); QString stime = datum.toString(Qt::LocalDate); - item -> setText(3, stime); } } - + /* (4) Person */ item -> setText(4, QString::fromStdString(detail.name)); /* (5) Peer Address */ { std::ostringstream out; - out << detail.localAddr << ":"; - out << detail.localPort << "/"; - out << detail.extAddr << ":"; - out << detail.extPort; + if(detail.state & RS_PEER_STATE_FRIEND) { + out << detail.localAddr << ":"; + out << detail.localPort << "/"; + out << detail.extAddr << ":"; + out << detail.extPort; + } else { + // No Trust => no IP Information + out << ""; + } item -> setText(5, QString::fromStdString(out.str())); }