mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-06-23 05:44:45 -04:00
* put gpgme dependencies behind #defines.
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@1272 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
42d2b62420
commit
b454ccf996
2 changed files with 43 additions and 2 deletions
|
@ -34,7 +34,10 @@
|
||||||
|
|
||||||
/* for GPGME */
|
/* for GPGME */
|
||||||
#include "rsiface/rsinit.h"
|
#include "rsiface/rsinit.h"
|
||||||
#include <gpgme.h>
|
|
||||||
|
#ifdef RS_USE_PGPSSL
|
||||||
|
#include <gpgme.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
|
|
||||||
|
|
|
@ -23,7 +23,11 @@
|
||||||
#include "rsiface/rspeers.h"
|
#include "rsiface/rspeers.h"
|
||||||
#include "rsiface/rsdisc.h"
|
#include "rsiface/rsdisc.h"
|
||||||
|
|
||||||
#include <gpgme.h>
|
#include "rsiface/rsinit.h"
|
||||||
|
|
||||||
|
#ifdef RS_USE_PGPSSL
|
||||||
|
#include <gpgme.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <QMenu>
|
#include <QMenu>
|
||||||
#include <QMouseEvent>
|
#include <QMouseEvent>
|
||||||
|
@ -164,6 +168,8 @@ void NetworkView::insertPeers()
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef RS_USE_PGPSSL
|
||||||
|
|
||||||
/* *** */
|
/* *** */
|
||||||
RsPeerDetails detail;
|
RsPeerDetails detail;
|
||||||
if (!rsPeers->getPeerDetails(*it, detail))
|
if (!rsPeers->getPeerDetails(*it, detail))
|
||||||
|
@ -198,6 +204,38 @@ void NetworkView::insertPeers()
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
ui.graphicsView->addNode(type, *it, detail.name);
|
ui.graphicsView->addNode(type, *it, detail.name);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#else
|
||||||
|
/* *** */
|
||||||
|
std::string name = rsPeers->getPeerName(*it);
|
||||||
|
|
||||||
|
if (rsPeers->isFriend(*it))
|
||||||
|
{
|
||||||
|
type = ELASTIC_NODE_TYPE_FRIEND;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
RsPeerDetails detail;
|
||||||
|
rsPeers->getPeerDetails(*it, detail);
|
||||||
|
|
||||||
|
if(detail.trustLvl > RS_TRUST_LVL_MARGINAL)
|
||||||
|
{
|
||||||
|
type = ELASTIC_NODE_TYPE_AUTHED;
|
||||||
|
}
|
||||||
|
else if (detail.trustLvl >= RS_TRUST_LVL_MARGINAL)
|
||||||
|
{
|
||||||
|
type = ELASTIC_NODE_TYPE_MARGINALAUTH;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
type = ELASTIC_NODE_TYPE_FOF;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
ui.graphicsView->addNode(type, *it, name);
|
||||||
|
#endif
|
||||||
|
|
||||||
std::cerr << "NetworkView::insertPeers() Added Friend: " << *it << std::endl;
|
std::cerr << "NetworkView::insertPeers() Added Friend: " << *it << std::endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue