mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-11-29 11:56:37 -05:00
fixed compilation of circles
This commit is contained in:
parent
260da99955
commit
697b7be5d1
5 changed files with 180 additions and 164 deletions
|
|
@ -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);
|
QTreeWidgetItem *item = tree->topLevelItem(i);
|
||||||
QString keyId = item->text(RSCIRCLEID_COL_KEYID);
|
QString keyId = item->text(RSCIRCLEID_COL_KEYID);
|
||||||
|
|
||||||
/* insert into circle */
|
/* insert into circle */
|
||||||
if (mIsExternalCircle) {
|
if (mIsExternalCircle)
|
||||||
circle.mInvitedMembers.push_back(RsGxsId(keyId.toStdString()));
|
{
|
||||||
|
RsGxsId key_id_gxs(keyId.toStdString()) ;
|
||||||
|
|
||||||
|
if(key_id_gxs.isNull())
|
||||||
|
{
|
||||||
|
std::cerr << "Error: Not a proper keyID: " << keyId.toStdString() << std::endl;
|
||||||
|
continue ;
|
||||||
|
}
|
||||||
|
|
||||||
|
circle.mInvitedMembers.insert(key_id_gxs) ;
|
||||||
std::cerr << "CreateCircleDialog::createCircle() Inserting Member: " << keyId.toStdString();
|
std::cerr << "CreateCircleDialog::createCircle() Inserting Member: " << keyId.toStdString();
|
||||||
std::cerr << std::endl;
|
std::cerr << std::endl;
|
||||||
} else {//if (mIsExternalCircle)
|
}
|
||||||
circle.mLocalFriends.push_back(RsPgpId(keyId.toStdString()));
|
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 << "CreateCircleDialog::createCircle() Inserting Friend: " << keyId.toStdString();
|
||||||
std::cerr << std::endl;
|
std::cerr << std::endl;
|
||||||
}//else (mIsExternalCircle)
|
}
|
||||||
|
|
||||||
}//for(int i = 0; i < count; ++i)
|
}
|
||||||
|
|
||||||
if (mIsExistingCircle) {
|
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,7 +593,8 @@ 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 */
|
||||||
|
|
@ -616,20 +634,17 @@ void CreateCircleDialog::loadIdentities(uint32_t token)
|
||||||
tree->addTopLevelItem(item);
|
tree->addTopLevelItem(item);
|
||||||
|
|
||||||
// External Circle.
|
// External Circle.
|
||||||
if (mIsExistingCircle) {
|
if (mIsExistingCircle)
|
||||||
|
{
|
||||||
// check if its in the circle.
|
// check if its in the circle.
|
||||||
std::list<RsGxsId>::const_iterator it;
|
|
||||||
|
|
||||||
// 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());
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -122,15 +122,14 @@ void IdentityWidget::updateData(const RsPeerDetails &pgp_details)
|
||||||
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();
|
_avatar = avatar.toImage();
|
||||||
_scene->clear();
|
_scene->clear();
|
||||||
_scene->addPixmap(avatar.scaled(ui->graphicsView->width(),ui->graphicsView->height()));
|
_scene->addPixmap(avatar.scaled(ui->graphicsView->width(),ui->graphicsView->height()));
|
||||||
emit imageUpdated();
|
emit imageUpdated();
|
||||||
}//if (_avatar != avatar.toImage())
|
}
|
||||||
|
|
||||||
//}//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