* 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:
drbob 2009-05-25 11:54:43 +00:00
parent 42d2b62420
commit b454ccf996
2 changed files with 43 additions and 2 deletions

View File

@ -34,7 +34,10 @@
/* for GPGME */
#include "rsiface/rsinit.h"
#include <gpgme.h>
#ifdef RS_USE_PGPSSL
#include <gpgme.h>
#endif
#include <sstream>

View File

@ -23,7 +23,11 @@
#include "rsiface/rspeers.h"
#include "rsiface/rsdisc.h"
#include <gpgme.h>
#include "rsiface/rsinit.h"
#ifdef RS_USE_PGPSSL
#include <gpgme.h>
#endif
#include <QMenu>
#include <QMouseEvent>
@ -164,6 +168,8 @@ void NetworkView::insertPeers()
continue;
}
#ifdef RS_USE_PGPSSL
/* *** */
RsPeerDetails detail;
if (!rsPeers->getPeerDetails(*it, detail))
@ -198,6 +204,38 @@ void NetworkView::insertPeers()
break;
}
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;
}