add RS version on peer details panel

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@1388 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
alexandrut 2009-07-17 21:41:20 +00:00
parent 48df36f6d0
commit d9e99a8774
3 changed files with 37 additions and 13 deletions

View File

@ -5,8 +5,8 @@
* Author: alexandrut
*/
#ifndef RSVERSIONXX_H_
#define RSVERSIONXX_H_
#ifndef RSVERSION_H_
#define RSVERSION_H_
#include <string>

View File

@ -22,6 +22,7 @@
#include "rsiface/rsiface.h"
#include "rsiface/rspeers.h"
#include "rsiface/rsdisc.h"
#include <QTime>
@ -109,6 +110,15 @@ void ConfCertDialog::loadDialog()
QString stime = date.toString(Qt::LocalDate);
ui.lastcontact-> setText(stime);
/* set retroshare version */
std::map<std::string, std::string>::iterator vit;
std::map<std::string, std::string> versions;
bool retv = rsDisc->getDiscVersions(versions);
if (retv && versions.end() != (vit = versions.find(detail.id)))
{
ui.version->setText(QString("v") + QString::fromStdString(vit->second));
}
/* set local address */
ui.localAddress->setText(QString::fromStdString(detail.localAddr));
ui.localPort -> setValue(detail.localPort);

View File

@ -597,6 +597,20 @@
</property>
</widget>
</item>
<item row="5" column="1">
<widget class="QLineEdit" name="version">
<property name="readOnly">
<bool>true</bool>
</property>
</widget>
</item>
<item row="5" column="0">
<widget class="QLabel" name="label_3">
<property name="text">
<string>Version</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>