fixed a few typos

This commit is contained in:
csoler 2019-12-02 22:34:14 +01:00
parent 65fa54c206
commit 31968f82f2
No known key found for this signature in database
GPG Key ID: 7BCA522266C0804C
6 changed files with 25 additions and 22 deletions

View File

@ -233,13 +233,13 @@ void NewsFeed::handleConnectionEvent(const RsConnectionEvent& e)
addFeedItemIfUnique(new SecurityItem(this, addFeedItemIfUnique(new SecurityItem(this,
NEWSFEED_SECLIST, NEWSFEED_SECLIST,
det.gpg_id, det.id, det.gpg_id, e.mSslId,
det.location, det.location,
std::string(), std::string(),
RS_FEED_ITEM_SEC_AUTH_DENIED, RS_FEED_ITEM_SEC_AUTH_DENIED,
false), false),
RS_FEED_ITEM_SEC_AUTH_DENIED, RS_FEED_ITEM_SEC_AUTH_DENIED,
det.gpg_id.toStdString(), e.mSslId.toStdString(),
std::string(), std::string(),
std::string(), std::string(),
std::string(), std::string(),
@ -282,14 +282,14 @@ void NewsFeed::handleSecurityEvent(const RsAuthSslConnectionAutenticationEvent&
FeedItemType, FeedItemType,
false), false),
FeedItemType, FeedItemType,
det.gpg_id.toStdString(), e.mSslId.toStdString(),
std::string(), std::string(),
std::string(), std::string(),
std::string(), std::string(),
true ); true );
if (Settings->getMessageFlags() & RS_MESSAGE_CONNECT_ATTEMPT) if (Settings->getMessageFlags() & RS_MESSAGE_CONNECT_ATTEMPT)
MessageComposer::sendConnectAttemptMsg(e.mPgpId, e.mSslId, QString::fromStdString(det.name + "(" + det.location + ")")); MessageComposer::addConnectAttemptMsg(e.mPgpId, e.mSslId, QString::fromStdString(det.name + "(" + det.location + ")"));
} }
void NewsFeed::updateDisplay() void NewsFeed::updateDisplay()

View File

@ -578,7 +578,7 @@ RetroShareLink RetroShareLink::createCertificate(const RsPeerId& ssl_id)
return link; return link;
} }
RetroShareLink RetroShareLink::createUnknwonSslCertificate(const RsPeerId& sslId, const RsPgpId& gpgId) RetroShareLink RetroShareLink::createUnknownSslCertificate(const RsPeerId& sslId, const RsPgpId& gpgId)
{ {
RetroShareLink link; RetroShareLink link;
link.clear(); link.clear();

View File

@ -90,7 +90,7 @@ class RetroShareLink
static RetroShareLink createMessage(const RsPeerId &peerId, const QString& subject); static RetroShareLink createMessage(const RsPeerId &peerId, const QString& subject);
static RetroShareLink createMessage(const RsGxsId &peerId, const QString& subject); static RetroShareLink createMessage(const RsGxsId &peerId, const QString& subject);
static RetroShareLink createCertificate(const RsPeerId &ssl_id) ; static RetroShareLink createCertificate(const RsPeerId &ssl_id) ;
static RetroShareLink createUnknwonSslCertificate(const RsPeerId &sslId, const RsPgpId &gpgId = RsPgpId()) ; static RetroShareLink createUnknownSslCertificate(const RsPeerId &sslId, const RsPgpId &gpgId = RsPgpId()) ;
static RetroShareLink createExtraFile(const QString& name, uint64_t size, const QString& hash, const QString& ssl_id); static RetroShareLink createExtraFile(const QString& name, uint64_t size, const QString& hash, const QString& ssl_id);
static RetroShareLink createPublicMsgInvite(time_t time_stamp,const QString& pgp_id,const QString& hash) ; static RetroShareLink createPublicMsgInvite(time_t time_stamp,const QString& pgp_id,const QString& hash) ;
static RetroShareLink createIdentity(const RsGxsId& gxs_id,const QString& name,const QString& radix_data) ; static RetroShareLink createIdentity(const RsGxsId& gxs_id,const QString& name,const QString& radix_data) ;

View File

@ -135,15 +135,16 @@ void PeerItem::updateItemStatic()
} }
else else
{ {
statusLabel->setText(tr("Unknown Peer")); peerNameLabel->setText(tr("Unknown peer"));
titleLabel->setText(tr("Unknown Peer")); statusLabel->setText(tr("Unknown"));
trustLabel->setText(tr("Unknown Peer")); titleLabel->setText(tr("Unknown peer"));
nameLabel->setText(tr("Unknown Peer")); trustLabel->setText(tr("Unknown"));
idLabel->setText(tr("Unknown Peer")); nameLabel->setText(tr("Unknown"));
locLabel->setText(tr("Unknown Peer")); idLabel->setText(tr("Unknown"));
ipLabel->setText(tr("Unknown Peer")); locLabel->setText(tr("Unknown"));
connLabel->setText(tr("Unknown Peer")); ipLabel->setText(tr("Unknown"));
lastLabel->setText(tr("Unknown Peer")); connLabel->setText(tr("Unknown"));
lastLabel->setText(tr("Unknown"));
chatButton->setEnabled(false); chatButton->setEnabled(false);
} }

View File

@ -584,16 +584,18 @@ void MessageComposer::recommendFriend(const std::set <RsPeerId> &sslIds, const R
/* window will destroy itself! */ /* window will destroy itself! */
} }
void MessageComposer::sendConnectAttemptMsg(const RsPgpId &gpgId, const RsPeerId &sslId, const QString &/*sslName*/) void MessageComposer::addConnectAttemptMsg(const RsPgpId &gpgId, const RsPeerId &sslId, const QString &/*sslName*/)
{ {
if (gpgId.isNull()) { if (gpgId.isNull())
return; return;
}
RetroShareLink link = RetroShareLink::createUnknwonSslCertificate(sslId, gpgId); // PGPId+SslId are always here. But if the peer is not a friend the SSL id cannot be used.
if (link.valid() == false) { // (todo) If the PGP id doesn't get us a PGP key from the keyring, we need to create a short invite
RetroShareLink link = RetroShareLink::createUnknownSslCertificate(sslId);
if (!link.valid())
return; return;
}
QString title = QString("%1 %2").arg(link.name(), tr("wants to be friends with you on RetroShare")); QString title = QString("%1 %2").arg(link.name(), tr("wants to be friends with you on RetroShare"));

View File

@ -62,7 +62,7 @@ public:
static QString recommendMessage(); static QString recommendMessage();
static void recommendFriend(const std::set <RsPeerId> &sslIds, const RsPeerId &to = RsPeerId(), const QString &msg = "", bool autoSend = false); static void recommendFriend(const std::set <RsPeerId> &sslIds, const RsPeerId &to = RsPeerId(), const QString &msg = "", bool autoSend = false);
static void sendConnectAttemptMsg(const RsPgpId &gpgId, const RsPeerId &sslId, const QString &sslName); static void addConnectAttemptMsg(const RsPgpId &gpgId, const RsPeerId &sslId, const QString &sslName);
static void sendInvite(const RsGxsId &to, bool autoSend); static void sendInvite(const RsGxsId &to, bool autoSend);
#ifdef UNUSED_CODE #ifdef UNUSED_CODE
static void sendChannelPublishKey(RsGxsChannelGroup &group); static void sendChannelPublishKey(RsGxsChannelGroup &group);