mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-11-28 11:30:40 -05:00
fixed compilation of circles
This commit is contained in:
parent
260da99955
commit
697b7be5d1
5 changed files with 180 additions and 164 deletions
|
|
@ -2636,52 +2636,52 @@ void RsGenExchange::processRecvdMessages()
|
||||||
|
|
||||||
void RsGenExchange::processRecvdGroups()
|
void RsGenExchange::processRecvdGroups()
|
||||||
{
|
{
|
||||||
RS_STACK_MUTEX(mGenMtx) ;
|
RS_STACK_MUTEX(mGenMtx) ;
|
||||||
|
|
||||||
if(mReceivedGrps.empty())
|
if(mReceivedGrps.empty())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
NxsGrpPendValidVect::iterator vit = mReceivedGrps.begin();
|
NxsGrpPendValidVect::iterator vit = mReceivedGrps.begin();
|
||||||
std::vector<RsGxsGroupId> existingGrpIds;
|
std::vector<RsGxsGroupId> existingGrpIds;
|
||||||
std::list<RsGxsGroupId> grpIds;
|
std::list<RsGxsGroupId> grpIds;
|
||||||
|
|
||||||
std::map<RsNxsGrp*, RsGxsGrpMetaData*> grps;
|
std::map<RsNxsGrp*, RsGxsGrpMetaData*> grps;
|
||||||
|
|
||||||
mDataStore->retrieveGroupIds(existingGrpIds);
|
mDataStore->retrieveGroupIds(existingGrpIds);
|
||||||
|
|
||||||
while( vit != mReceivedGrps.end())
|
while( vit != mReceivedGrps.end())
|
||||||
{
|
{
|
||||||
GxsPendingItem<RsNxsGrp*, RsGxsGroupId>& gpsi = *vit;
|
GxsPendingItem<RsNxsGrp*, RsGxsGroupId>& gpsi = *vit;
|
||||||
RsNxsGrp* grp = gpsi.mItem;
|
RsNxsGrp* grp = gpsi.mItem;
|
||||||
RsGxsGrpMetaData* meta = new RsGxsGrpMetaData();
|
RsGxsGrpMetaData* meta = new RsGxsGrpMetaData();
|
||||||
bool deserialOk = false;
|
bool deserialOk = false;
|
||||||
|
|
||||||
if(grp->meta.bin_len != 0)
|
if(grp->meta.bin_len != 0)
|
||||||
deserialOk = meta->deserialise(grp->meta.bin_data, grp->meta.bin_len);
|
deserialOk = meta->deserialise(grp->meta.bin_data, grp->meta.bin_len);
|
||||||
|
|
||||||
bool erase = true;
|
bool erase = true;
|
||||||
|
|
||||||
if(deserialOk)
|
if(deserialOk)
|
||||||
{
|
{
|
||||||
grp->metaData = meta;
|
grp->metaData = meta;
|
||||||
uint8_t ret = validateGrp(grp);
|
uint8_t ret = validateGrp(grp);
|
||||||
|
|
||||||
|
|
||||||
if(ret == VALIDATE_SUCCESS)
|
if(ret == VALIDATE_SUCCESS)
|
||||||
{
|
{
|
||||||
meta->mGroupStatus = GXS_SERV::GXS_GRP_STATUS_UNPROCESSED | GXS_SERV::GXS_GRP_STATUS_UNREAD;
|
meta->mGroupStatus = GXS_SERV::GXS_GRP_STATUS_UNPROCESSED | GXS_SERV::GXS_GRP_STATUS_UNREAD;
|
||||||
meta->mSubscribeFlags = GXS_SERV::GROUP_SUBSCRIBE_NOT_SUBSCRIBED;
|
meta->mSubscribeFlags = GXS_SERV::GROUP_SUBSCRIBE_NOT_SUBSCRIBED;
|
||||||
|
|
||||||
computeHash(grp->grp, meta->mHash);
|
computeHash(grp->grp, meta->mHash);
|
||||||
|
|
||||||
// group has been validated. Let's notify the global router for the clue
|
// group has been validated. Let's notify the global router for the clue
|
||||||
|
|
||||||
#ifdef GEN_EXCH_DEBUG
|
#ifdef GEN_EXCH_DEBUG
|
||||||
std::cerr << "Group routage info: Identity=" << meta->mAuthorId << " from " << grp->PeerId() << std::endl;
|
std::cerr << "Group routage info: Identity=" << meta->mAuthorId << " from " << grp->PeerId() << std::endl;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if(!meta->mAuthorId.isNull())
|
if(!meta->mAuthorId.isNull())
|
||||||
mRoutingClues[meta->mAuthorId].insert(grp->PeerId()) ;
|
mRoutingClues[meta->mAuthorId].insert(grp->PeerId()) ;
|
||||||
|
|
||||||
// now check if group already existss
|
// now check if group already existss
|
||||||
if(std::find(existingGrpIds.begin(), existingGrpIds.end(), grp->grpId) == existingGrpIds.end())
|
if(std::find(existingGrpIds.begin(), existingGrpIds.end(), grp->grpId) == existingGrpIds.end())
|
||||||
|
|
@ -2700,55 +2700,55 @@ void RsGenExchange::processRecvdGroups()
|
||||||
mGroupUpdates.push_back(update);
|
mGroupUpdates.push_back(update);
|
||||||
}
|
}
|
||||||
erase = true;
|
erase = true;
|
||||||
}
|
}
|
||||||
else if(ret == VALIDATE_FAIL)
|
else if(ret == VALIDATE_FAIL)
|
||||||
{
|
{
|
||||||
#ifdef GEN_EXCH_DEBUG
|
#ifdef GEN_EXCH_DEBUG
|
||||||
std::cerr << "failed to deserialise incoming meta, grpId: "
|
std::cerr << "failed to deserialise incoming meta, grpId: "
|
||||||
<< grp->grpId << std::endl;
|
<< grp->grpId << std::endl;
|
||||||
#endif
|
#endif
|
||||||
delete grp;
|
delete grp;
|
||||||
erase = true;
|
erase = true;
|
||||||
}
|
}
|
||||||
else if(ret == VALIDATE_FAIL_TRY_LATER)
|
else if(ret == VALIDATE_FAIL_TRY_LATER)
|
||||||
{
|
{
|
||||||
|
|
||||||
#ifdef GEN_EXCH_DEBUG
|
#ifdef GEN_EXCH_DEBUG
|
||||||
std::cerr << "failed to validate incoming grp, trying again. grpId: "
|
std::cerr << "failed to validate incoming grp, trying again. grpId: "
|
||||||
<< grp->grpId << std::endl;
|
<< grp->grpId << std::endl;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if(gpsi.mAttempts == VALIDATE_MAX_ATTEMPTS)
|
if(gpsi.mAttempts == VALIDATE_MAX_ATTEMPTS)
|
||||||
{
|
{
|
||||||
delete grp;
|
delete grp;
|
||||||
erase = true;
|
erase = true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
erase = false;
|
erase = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
delete grp;
|
delete grp;
|
||||||
delete meta;
|
delete meta;
|
||||||
erase = true;
|
erase = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(erase)
|
if(erase)
|
||||||
vit = mReceivedGrps.erase(vit);
|
vit = mReceivedGrps.erase(vit);
|
||||||
else
|
else
|
||||||
++vit;
|
++vit;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!grpIds.empty())
|
if(!grpIds.empty())
|
||||||
{
|
{
|
||||||
RsGxsGroupChange* c = new RsGxsGroupChange(RsGxsNotify::TYPE_RECEIVE, false);
|
RsGxsGroupChange* c = new RsGxsGroupChange(RsGxsNotify::TYPE_RECEIVE, false);
|
||||||
c->mGrpIdList = grpIds;
|
c->mGrpIdList = grpIds;
|
||||||
mNotifications.push_back(c);
|
mNotifications.push_back(c);
|
||||||
mDataStore->storeGroup(grps);
|
mDataStore->storeGroup(grps);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void RsGenExchange::performUpdateValidation()
|
void RsGenExchange::performUpdateValidation()
|
||||||
|
|
|
||||||
|
|
@ -1625,7 +1625,8 @@ void RsGxsNetService::locked_processCompletedIncomingTrans(NxsTransaction* tr)
|
||||||
IndicateConfigChanged();
|
IndicateConfigChanged();
|
||||||
|
|
||||||
|
|
||||||
}else if(flag & RsNxsTransac::FLAG_TYPE_MSGS)
|
}
|
||||||
|
else if(flag & RsNxsTransac::FLAG_TYPE_MSGS)
|
||||||
{
|
{
|
||||||
|
|
||||||
std::vector<RsNxsMsg*> msgs;
|
std::vector<RsNxsMsg*> msgs;
|
||||||
|
|
|
||||||
|
|
@ -309,31 +309,52 @@ void CreateCircleDialog::createCircle()
|
||||||
/* copy Ids from GUI */
|
/* copy Ids from GUI */
|
||||||
QTreeWidget *tree = ui.treeWidget_membership;
|
QTreeWidget *tree = ui.treeWidget_membership;
|
||||||
int count = tree->topLevelItemCount();
|
int count = tree->topLevelItemCount();
|
||||||
for(int i = 0; i < count; ++i) {
|
for(int i = 0; i < count; ++i)
|
||||||
QTreeWidgetItem *item = tree->topLevelItem(i);
|
{
|
||||||
QString keyId = item->text(RSCIRCLEID_COL_KEYID);
|
QTreeWidgetItem *item = tree->topLevelItem(i);
|
||||||
|
QString keyId = item->text(RSCIRCLEID_COL_KEYID);
|
||||||
|
|
||||||
/* insert into circle */
|
/* insert into circle */
|
||||||
if (mIsExternalCircle) {
|
if (mIsExternalCircle)
|
||||||
circle.mInvitedMembers.push_back(RsGxsId(keyId.toStdString()));
|
{
|
||||||
std::cerr << "CreateCircleDialog::createCircle() Inserting Member: " << keyId.toStdString();
|
RsGxsId key_id_gxs(keyId.toStdString()) ;
|
||||||
std::cerr << std::endl;
|
|
||||||
} else {//if (mIsExternalCircle)
|
|
||||||
circle.mLocalFriends.push_back(RsPgpId(keyId.toStdString()));
|
|
||||||
std::cerr << "CreateCircleDialog::createCircle() Inserting Friend: " << keyId.toStdString();
|
|
||||||
std::cerr << std::endl;
|
|
||||||
}//else (mIsExternalCircle)
|
|
||||||
|
|
||||||
}//for(int i = 0; i < count; ++i)
|
if(key_id_gxs.isNull())
|
||||||
|
{
|
||||||
|
std::cerr << "Error: Not a proper keyID: " << keyId.toStdString() << std::endl;
|
||||||
|
continue ;
|
||||||
|
}
|
||||||
|
|
||||||
if (mIsExistingCircle) {
|
circle.mInvitedMembers.insert(key_id_gxs) ;
|
||||||
|
std::cerr << "CreateCircleDialog::createCircle() Inserting Member: " << keyId.toStdString();
|
||||||
|
std::cerr << std::endl;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
RsPgpId key_id_pgp(keyId.toStdString()) ;
|
||||||
|
|
||||||
|
if(key_id_pgp.isNull())
|
||||||
|
{
|
||||||
|
std::cerr << "Error: Not a proper PGP keyID: " << keyId.toStdString() << std::endl;
|
||||||
|
continue ;
|
||||||
|
}
|
||||||
|
|
||||||
|
circle.mLocalFriends.insert(key_id_pgp) ;
|
||||||
|
std::cerr << "CreateCircleDialog::createCircle() Inserting Friend: " << keyId.toStdString();
|
||||||
|
std::cerr << std::endl;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
if (mIsExistingCircle)
|
||||||
|
{
|
||||||
std::cerr << "CreateCircleDialog::createCircle() Existing Circle TODO";
|
std::cerr << "CreateCircleDialog::createCircle() Existing Circle TODO";
|
||||||
std::cerr << std::endl;
|
std::cerr << std::endl;
|
||||||
|
|
||||||
// cannot edit these yet.
|
// cannot edit these yet.
|
||||||
QMessageBox::warning(this, tr("RetroShare"),tr("Cannot Edit Existing Circles Yet"), QMessageBox::Ok, QMessageBox::Ok);
|
QMessageBox::warning(this, tr("RetroShare"),tr("Cannot Edit Existing Circles Yet"), QMessageBox::Ok, QMessageBox::Ok);
|
||||||
return;
|
return;
|
||||||
}//if (mIsExistingCircle)
|
}
|
||||||
|
|
||||||
if (mIsExternalCircle) {
|
if (mIsExternalCircle) {
|
||||||
std::cerr << "CreateCircleDialog::createCircle() External Circle";
|
std::cerr << "CreateCircleDialog::createCircle() External Circle";
|
||||||
|
|
@ -410,12 +431,14 @@ void CreateCircleDialog::updateCircleGUI()
|
||||||
std::cerr << std::endl;
|
std::cerr << std::endl;
|
||||||
|
|
||||||
switch(mCircleGroup.mMeta.mCircleType) {
|
switch(mCircleGroup.mMeta.mCircleType) {
|
||||||
|
#ifdef RS_ALLOW_LOCAL_CIRCLES
|
||||||
case GXS_CIRCLE_TYPE_LOCAL:
|
case GXS_CIRCLE_TYPE_LOCAL:
|
||||||
std::cerr << "CreateCircleDialog::updateCircleGUI() : LOCAL CIRCLETYPE";
|
std::cerr << "CreateCircleDialog::updateCircleGUI() : LOCAL CIRCLETYPE";
|
||||||
std::cerr << std::endl;
|
std::cerr << std::endl;
|
||||||
|
|
||||||
isExternal = false;
|
isExternal = false;
|
||||||
break;
|
break;
|
||||||
|
#endif
|
||||||
|
|
||||||
case GXS_CIRCLE_TYPE_PUBLIC:
|
case GXS_CIRCLE_TYPE_PUBLIC:
|
||||||
std::cerr << "CreateCircleDialog::updateCircleGUI() : PUBLIC CIRCLETYPE";
|
std::cerr << "CreateCircleDialog::updateCircleGUI() : PUBLIC CIRCLETYPE";
|
||||||
|
|
@ -527,16 +550,10 @@ void CreateCircleDialog::getPgpIdentities()
|
||||||
tree->addTopLevelItem(item);
|
tree->addTopLevelItem(item);
|
||||||
|
|
||||||
// Local Circle.
|
// Local Circle.
|
||||||
if (mIsExistingCircle) {
|
if (mIsExistingCircle)
|
||||||
// check if its in the circle.
|
if ( mCircleGroup.mLocalFriends.find(details.gpg_id) != mCircleGroup.mLocalFriends.end()) // check if its in the circle.
|
||||||
std::list<RsPgpId>::const_iterator it;
|
|
||||||
it = std::find(mCircleGroup.mLocalFriends.begin(), mCircleGroup.mLocalFriends.end(), details.gpg_id);
|
|
||||||
if (it != mCircleGroup.mLocalFriends.end()) {
|
|
||||||
/* found it */
|
|
||||||
addMember(keyId, idtype, nickname);
|
addMember(keyId, idtype, nickname);
|
||||||
}//if (it != mCircleGroup.mLocalFriends.end())
|
}
|
||||||
}//if (mIsExistingCircle)
|
|
||||||
}//for(it = ids.begin(); it != ids.end(); ++it)
|
|
||||||
|
|
||||||
filterIds();
|
filterIds();
|
||||||
}
|
}
|
||||||
|
|
@ -576,60 +593,58 @@ void CreateCircleDialog::loadIdentities(uint32_t token)
|
||||||
return;
|
return;
|
||||||
}//if (!rsIdentity->getGroupData(token, datavector))
|
}//if (!rsIdentity->getGroupData(token, datavector))
|
||||||
|
|
||||||
for(vit = datavector.begin(); vit != datavector.end(); ++vit) {
|
for(vit = datavector.begin(); vit != datavector.end(); ++vit)
|
||||||
data = (*vit);
|
{
|
||||||
|
data = (*vit);
|
||||||
|
|
||||||
/* do filtering */
|
/* do filtering */
|
||||||
bool ok = false;
|
bool ok = false;
|
||||||
if (acceptAnonymous) {
|
if (acceptAnonymous) {
|
||||||
ok = true;
|
ok = true;
|
||||||
} else if (acceptAllPGP) {
|
} else if (acceptAllPGP) {
|
||||||
ok = data.mMeta.mGroupFlags & RSGXSID_GROUPFLAG_REALID ;
|
ok = data.mMeta.mGroupFlags & RSGXSID_GROUPFLAG_REALID ;
|
||||||
} else if (data.mPgpKnown) {
|
} else if (data.mPgpKnown) {
|
||||||
ok = data.mMeta.mGroupFlags & RSGXSID_GROUPFLAG_REALID ;
|
ok = data.mMeta.mGroupFlags & RSGXSID_GROUPFLAG_REALID ;
|
||||||
}//else if (data.mPgpKnown)
|
}//else if (data.mPgpKnown)
|
||||||
|
|
||||||
if (!ok) {
|
if (!ok) {
|
||||||
std::cerr << "CreateCircleDialog::insertIdentities() Skipping ID: " << data.mMeta.mGroupId;
|
std::cerr << "CreateCircleDialog::insertIdentities() Skipping ID: " << data.mMeta.mGroupId;
|
||||||
std::cerr << std::endl;
|
std::cerr << std::endl;
|
||||||
continue;
|
continue;
|
||||||
}//if (!ok)
|
}//if (!ok)
|
||||||
|
|
||||||
QString keyId = QString::fromStdString(data.mMeta.mGroupId.toStdString());
|
QString keyId = QString::fromStdString(data.mMeta.mGroupId.toStdString());
|
||||||
QString nickname = QString::fromUtf8(data.mMeta.mGroupName.c_str());
|
QString nickname = QString::fromUtf8(data.mMeta.mGroupName.c_str());
|
||||||
QString idtype = tr("Anon Id");
|
QString idtype = tr("Anon Id");
|
||||||
|
|
||||||
if (data.mMeta.mGroupFlags & RSGXSID_GROUPFLAG_REALID) {
|
if (data.mMeta.mGroupFlags & RSGXSID_GROUPFLAG_REALID) {
|
||||||
if (data.mPgpKnown) {
|
if (data.mPgpKnown) {
|
||||||
RsPeerDetails details;
|
RsPeerDetails details;
|
||||||
rsPeers->getGPGDetails(data.mPgpId, details);
|
rsPeers->getGPGDetails(data.mPgpId, details);
|
||||||
idtype = QString::fromUtf8(details.name.c_str());
|
idtype = QString::fromUtf8(details.name.c_str());
|
||||||
} else {
|
} else {
|
||||||
idtype = tr("PGP Linked Id");
|
idtype = tr("PGP Linked Id");
|
||||||
}//else (data.mPgpKnown)
|
}//else (data.mPgpKnown)
|
||||||
}//if (data.mMeta.mGroupFlags & RSGXSID_GROUPFLAG_REALID)
|
}//if (data.mMeta.mGroupFlags & RSGXSID_GROUPFLAG_REALID)
|
||||||
|
|
||||||
QTreeWidgetItem *item = new QTreeWidgetItem();
|
QTreeWidgetItem *item = new QTreeWidgetItem();
|
||||||
item->setText(RSCIRCLEID_COL_NICKNAME, nickname);
|
item->setText(RSCIRCLEID_COL_NICKNAME, nickname);
|
||||||
item->setText(RSCIRCLEID_COL_KEYID, keyId);
|
item->setText(RSCIRCLEID_COL_KEYID, keyId);
|
||||||
item->setText(RSCIRCLEID_COL_IDTYPE, idtype);
|
item->setText(RSCIRCLEID_COL_IDTYPE, idtype);
|
||||||
tree->addTopLevelItem(item);
|
tree->addTopLevelItem(item);
|
||||||
|
|
||||||
// External Circle.
|
// External Circle.
|
||||||
if (mIsExistingCircle) {
|
if (mIsExistingCircle)
|
||||||
// check if its in the circle.
|
{
|
||||||
std::list<RsGxsId>::const_iterator it;
|
// check if its in the circle.
|
||||||
|
|
||||||
// We use an explicit cast
|
// We use an explicit cast
|
||||||
//
|
//
|
||||||
it = std::find(mCircleGroup.mInvitedMembers.begin(), mCircleGroup.mInvitedMembers.end(), RsGxsId(data.mMeta.mGroupId));
|
|
||||||
|
|
||||||
if (it != mCircleGroup.mInvitedMembers.end()) {
|
if ( mCircleGroup.mInvitedMembers.find(RsGxsId(data.mMeta.mGroupId)) != mCircleGroup.mInvitedMembers.end()) /* found it */
|
||||||
/* found it */
|
addMember(keyId, idtype, nickname);
|
||||||
addMember(keyId, idtype, nickname);
|
}
|
||||||
}//if (it != mCircleGroup.mInvitedMembers.end())
|
}
|
||||||
}//if (mIsExistingCircle)
|
|
||||||
}//for(vit = datavector.begin(); vit != datavector.end(); ++vit)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void CreateCircleDialog::loadRequest(const TokenQueue *queue, const TokenRequest &req)
|
void CreateCircleDialog::loadRequest(const TokenQueue *queue, const TokenRequest &req)
|
||||||
|
|
@ -683,5 +698,5 @@ void CreateCircleDialog::createNewGxsId()
|
||||||
IdEditDialog dlg(this);
|
IdEditDialog dlg(this);
|
||||||
dlg.setupNewId(false);
|
dlg.setupNewId(false);
|
||||||
dlg.exec();
|
dlg.exec();
|
||||||
ui.idChooser->setDefaultId(dlg.getLastIdName());
|
//ui.idChooser->setDefaultId(dlg.getLastIdName());
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -99,38 +99,37 @@ void IdentityWidget::updateData(const RsGxsIdGroup &gxs_group_info)
|
||||||
|
|
||||||
void IdentityWidget::updateData(const RsPeerDetails &pgp_details)
|
void IdentityWidget::updateData(const RsPeerDetails &pgp_details)
|
||||||
{
|
{
|
||||||
//if (_details != pgp_details) {
|
//if (_details != pgp_details) {
|
||||||
_details = pgp_details;
|
_details = pgp_details;
|
||||||
_havePGPDetail = true;
|
_havePGPDetail = true;
|
||||||
|
|
||||||
_nickname = QString::fromUtf8(_details.name.c_str());
|
_nickname = QString::fromUtf8(_details.name.c_str());
|
||||||
if (!_haveGXSId) m_myName = _nickname;
|
if (!_haveGXSId) m_myName = _nickname;
|
||||||
ui->labelName->setText(m_myName);
|
ui->labelName->setText(m_myName);
|
||||||
if (_haveGXSId) {
|
if (_haveGXSId) {
|
||||||
ui->labelName->setToolTip(tr("GXS name:").append(" "+m_myName).append("\n")
|
ui->labelName->setToolTip(tr("GXS name:").append(" "+m_myName).append("\n")
|
||||||
.append(tr("PGP name:").append(" "+_nickname)));
|
.append(tr("PGP name:").append(" "+_nickname)));
|
||||||
} else {//if (m_myName != _nickname)
|
} else {//if (m_myName != _nickname)
|
||||||
ui->labelName->setToolTip(tr("PGP name:").append(" "+_nickname));
|
ui->labelName->setToolTip(tr("PGP name:").append(" "+_nickname));
|
||||||
}//else (m_myName != _nickname)
|
}//else (m_myName != _nickname)
|
||||||
|
|
||||||
QFont font = ui->labelName->font();
|
QFont font = ui->labelName->font();
|
||||||
font.setItalic(true);
|
font.setItalic(true);
|
||||||
ui->labelName->setFont(font);
|
ui->labelName->setFont(font);
|
||||||
|
|
||||||
_keyId = QString::fromStdString(_details.gpg_id.toStdString());
|
_keyId = QString::fromStdString(_details.gpg_id.toStdString());
|
||||||
ui->labelKeyId->setText(_keyId);
|
ui->labelKeyId->setText(_keyId);
|
||||||
ui->labelKeyId->setToolTip(tr("PGP id:").append(" "+_keyId));
|
ui->labelKeyId->setToolTip(tr("PGP id:").append(" "+_keyId));
|
||||||
|
|
||||||
QPixmap avatar;
|
QPixmap avatar;
|
||||||
AvatarDefs::getAvatarFromGpgId(_details.gpg_id.toStdString(), avatar);
|
AvatarDefs::getAvatarFromGpgId(_details.gpg_id, avatar);
|
||||||
if (_avatar != avatar.toImage()) {
|
if (_avatar != avatar.toImage())
|
||||||
_avatar = avatar.toImage();
|
{
|
||||||
_scene->clear();
|
_avatar = avatar.toImage();
|
||||||
_scene->addPixmap(avatar.scaled(ui->graphicsView->width(),ui->graphicsView->height()));
|
_scene->clear();
|
||||||
emit imageUpdated();
|
_scene->addPixmap(avatar.scaled(ui->graphicsView->width(),ui->graphicsView->height()));
|
||||||
}//if (_avatar != avatar.toImage())
|
emit imageUpdated();
|
||||||
|
}
|
||||||
//}//if (_details != gpg_details)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void IdentityWidget::updateData(const RsGxsIdGroup &gxs_group_info, const RsPeerDetails &pgp_details)
|
void IdentityWidget::updateData(const RsGxsIdGroup &gxs_group_info, const RsPeerDetails &pgp_details)
|
||||||
|
|
|
||||||
|
|
@ -31,8 +31,9 @@ CONFIG += gxsgui
|
||||||
|
|
||||||
DEFINES += RS_ENABLE_GXS
|
DEFINES += RS_ENABLE_GXS
|
||||||
|
|
||||||
unfinished {
|
|
||||||
CONFIG += gxscircles
|
CONFIG += gxscircles
|
||||||
|
|
||||||
|
unfinished {
|
||||||
CONFIG += gxsthewire
|
CONFIG += gxsthewire
|
||||||
CONFIG += gxsphotoshare
|
CONFIG += gxsphotoshare
|
||||||
CONFIG += wikipoos
|
CONFIG += wikipoos
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue