mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-06-05 05:12:51 -04:00
New class for working with peer names (rsid, name + location, ...) - PeerDefs.
Show the location in brackets - "name (location)" (defined now in PeerDefs). Renamed head of context menu in PeersDialog for ssl items. Fixed german translation. git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3553 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
277a321f1b
commit
de16f6c72d
20 changed files with 304 additions and 181 deletions
|
@ -20,6 +20,7 @@
|
|||
****************************************************************/
|
||||
|
||||
#include "ConnectFriendWizard.h"
|
||||
#include "gui/common/PeerDefs.h"
|
||||
|
||||
#include <retroshare/rspeers.h> //for rsPeers variable
|
||||
#include <retroshare/rsiface.h>
|
||||
|
@ -1065,18 +1066,10 @@ int RsidPage::nextId() const {
|
|||
|
||||
if (rsidstring.isEmpty() == false) {
|
||||
// search for peer id in string
|
||||
std::string rsidstr;
|
||||
std::string rsidstr = PeerDefs::idFromRsid(rsidstring, false);
|
||||
|
||||
int nIndex = rsidstring.indexOf("@");
|
||||
if (nIndex >= 0) {
|
||||
// found "@", extract peer id from string
|
||||
rsidstr = rsidstring.mid(nIndex + 1).toStdString();
|
||||
} else {
|
||||
// maybe its only the peer id
|
||||
rsidstr = rsidstring.toStdString();
|
||||
}
|
||||
RsPeerDetails pd;
|
||||
if ( rsPeers->getPeerDetails(rsidstr, pd) ) {
|
||||
if (rsidstr.empty() == false && rsPeers->getPeerDetails(rsidstr, pd) ) {
|
||||
wizard()->setField(SSL_ID_FIELD_CONNECT_FRIEND_WIZARD, QString::fromStdString(pd.id));
|
||||
wizard()->setField(GPG_ID_FIELD_CONNECT_FRIEND_WIZARD, QString::fromStdString(pd.gpg_id));
|
||||
wizard()->setField(LOCATION_FIELD_CONNECT_FRIEND_WIZARD, QString::fromStdString(pd.location));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue