mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-01-15 09:27:09 -05:00
show fingerprint in ConfCertDialog, and splitted the string with spaces. Removed the use of the ambiguous peer id for both pgp and locations ids
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@6900 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
d2ddf9c4c4
commit
fc56b95d3f
@ -42,6 +42,7 @@
|
|||||||
#include "gui/MainWindow.h"
|
#include "gui/MainWindow.h"
|
||||||
#include "mainpage.h"
|
#include "mainpage.h"
|
||||||
#include "util/DateTime.h"
|
#include "util/DateTime.h"
|
||||||
|
#include "util/misc.h"
|
||||||
|
|
||||||
static QMap<std::string, ConfCertDialog*> instances;
|
static QMap<std::string, ConfCertDialog*> instances;
|
||||||
|
|
||||||
@ -185,6 +186,7 @@ void ConfCertDialog::load()
|
|||||||
link.createPerson(detail.id);
|
link.createPerson(detail.id);
|
||||||
|
|
||||||
ui.rsid->setText(link.toHtml());
|
ui.rsid->setText(link.toHtml());
|
||||||
|
ui.pgpfingerprint->setText(misc::fingerPrintStyleSplit(QString::fromStdString(detail.fpr)));
|
||||||
ui.rsid->setToolTip(link.title());
|
ui.rsid->setToolTip(link.title());
|
||||||
|
|
||||||
if (!detail.isOnlyGPGdetail) {
|
if (!detail.isOnlyGPGdetail) {
|
||||||
@ -242,11 +244,17 @@ void ConfCertDialog::load()
|
|||||||
ui.tabWidget->show();
|
ui.tabWidget->show();
|
||||||
ui.rsid->hide();
|
ui.rsid->hide();
|
||||||
ui.label_rsid->hide();
|
ui.label_rsid->hide();
|
||||||
|
ui.pgpfingerprint->show();
|
||||||
|
ui.pgpfingerprint_label->show();
|
||||||
} else {
|
} else {
|
||||||
ui.avatar->setId(mId, true);
|
ui.avatar->setId(mId, true);
|
||||||
|
|
||||||
ui.rsid->show();
|
ui.rsid->show();
|
||||||
|
ui.peerid->hide();
|
||||||
|
ui.label_id->hide();
|
||||||
ui.label_rsid->show();
|
ui.label_rsid->show();
|
||||||
|
ui.pgpfingerprint->show();
|
||||||
|
ui.pgpfingerprint_label->show();
|
||||||
ui.loc->hide();
|
ui.loc->hide();
|
||||||
ui.label_loc->hide();
|
ui.label_loc->hide();
|
||||||
ui.statusline->hide();
|
ui.statusline->hide();
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>635</width>
|
<width>635</width>
|
||||||
<height>549</height>
|
<height>643</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
@ -110,7 +110,7 @@
|
|||||||
<item row="1" column="0">
|
<item row="1" column="0">
|
||||||
<widget class="QLabel" name="label_id">
|
<widget class="QLabel" name="label_id">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Peer ID</string>
|
<string>Location ID</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
@ -157,13 +157,48 @@
|
|||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="3" column="0">
|
<item row="3" column="0">
|
||||||
|
<widget class="QLabel" name="pgpfingerprint_label">
|
||||||
|
<property name="text">
|
||||||
|
<string>PGP fingerprint</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="3" column="1">
|
||||||
|
<widget class="RSTextBrowser" name="pgpfingerprint">
|
||||||
|
<property name="enabled">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>16777215</width>
|
||||||
|
<height>20</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="verticalScrollBarPolicy">
|
||||||
|
<enum>Qt::ScrollBarAlwaysOff</enum>
|
||||||
|
</property>
|
||||||
|
<property name="horizontalScrollBarPolicy">
|
||||||
|
<enum>Qt::ScrollBarAlwaysOff</enum>
|
||||||
|
</property>
|
||||||
|
<property name="readOnly">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="4" column="0">
|
||||||
<widget class="QLabel" name="crypto_label">
|
<widget class="QLabel" name="crypto_label">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Encryption</string>
|
<string>Encryption</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="3" column="1">
|
<item row="4" column="1">
|
||||||
<widget class="QLineEdit" name="crypto_info"/>
|
<widget class="QLineEdit" name="crypto_info"/>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
|
@ -76,7 +76,7 @@ void CryptoPage::showEvent ( QShowEvent * /*event*/ )
|
|||||||
|
|
||||||
ui.peerid->setText(QString::fromStdString(detail.id));
|
ui.peerid->setText(QString::fromStdString(detail.id));
|
||||||
ui.pgpid->setText(QString::fromStdString(detail.gpg_id));
|
ui.pgpid->setText(QString::fromStdString(detail.gpg_id));
|
||||||
ui.pgpfingerprint->setText(QString::fromStdString(detail.fpr));
|
ui.pgpfingerprint->setText(misc::fingerPrintStyleSplit(QString::fromStdString(detail.fpr)));
|
||||||
|
|
||||||
/* set retroshare version */
|
/* set retroshare version */
|
||||||
std::map<std::string, std::string>::iterator vit;
|
std::map<std::string, std::string>::iterator vit;
|
||||||
|
@ -47,6 +47,20 @@ QString misc::friendlyUnit(float val)
|
|||||||
return QString(QByteArray::number(val, 'f', 1)) + tr(" TB", "terabytes (1024 gigabytes)");
|
return QString(QByteArray::number(val, 'f', 1)) + tr(" TB", "terabytes (1024 gigabytes)");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QString misc::fingerPrintStyleSplit(const QString& in)
|
||||||
|
{
|
||||||
|
QString rest = in ;
|
||||||
|
QString res ;
|
||||||
|
|
||||||
|
if(in.isNull())
|
||||||
|
return in ;
|
||||||
|
|
||||||
|
for(int i=0;i<in.length();i+=4)
|
||||||
|
res += rest.mid(i,4)+' ' ;
|
||||||
|
|
||||||
|
return res.left(res.length()-1) ;
|
||||||
|
}
|
||||||
|
|
||||||
bool misc::isPreviewable(QString extension)
|
bool misc::isPreviewable(QString extension)
|
||||||
{
|
{
|
||||||
extension = extension.toUpper();
|
extension = extension.toUpper();
|
||||||
|
@ -104,6 +104,8 @@ class misc : public QObject
|
|||||||
|
|
||||||
static bool isPreviewable(QString extension);
|
static bool isPreviewable(QString extension);
|
||||||
|
|
||||||
|
static QString fingerPrintStyleSplit(const QString& in) ;
|
||||||
|
|
||||||
// return qBittorrent config path
|
// return qBittorrent config path
|
||||||
static QString qBittorrentPath();
|
static QString qBittorrentPath();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user