mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-07-25 15:35:49 -04:00
added edit of existing circles
This commit is contained in:
parent
53f32f2dc8
commit
9b92f66c61
1 changed files with 102 additions and 84 deletions
|
@ -289,12 +289,13 @@ void CreateCircleDialog::createCircle()
|
|||
return; //Don't add a empty Subject!!
|
||||
}//if(name.isEmpty())
|
||||
|
||||
RsGxsCircleGroup circle;
|
||||
RsGxsCircleGroup circle = mCircleGroup; // init with loaded group
|
||||
|
||||
circle.mMeta.mGroupName = std::string(name.toUtf8());
|
||||
|
||||
RsGxsId authorId;
|
||||
switch (ui.idChooser->getChosenId(authorId)) {
|
||||
switch (ui.idChooser->getChosenId(authorId))
|
||||
{
|
||||
case GxsIdChooser::KnowId:
|
||||
case GxsIdChooser::UnKnowId:
|
||||
circle.mMeta.mAuthorId = authorId;
|
||||
|
@ -350,17 +351,18 @@ void CreateCircleDialog::createCircle()
|
|||
|
||||
}
|
||||
|
||||
if (mIsExistingCircle)
|
||||
// if (mIsExistingCircle)
|
||||
// {
|
||||
// std::cerr << "CreateCircleDialog::createCircle() Existing Circle TODO";
|
||||
// std::cerr << std::endl;
|
||||
//
|
||||
// // cannot edit these yet.
|
||||
// QMessageBox::warning(this, tr("RetroShare"),tr("Cannot Edit Existing Circles Yet"), QMessageBox::Ok, QMessageBox::Ok);
|
||||
// return;
|
||||
// }
|
||||
|
||||
if (mIsExternalCircle)
|
||||
{
|
||||
std::cerr << "CreateCircleDialog::createCircle() Existing Circle TODO";
|
||||
std::cerr << std::endl;
|
||||
|
||||
// cannot edit these yet.
|
||||
QMessageBox::warning(this, tr("RetroShare"),tr("Cannot Edit Existing Circles Yet"), QMessageBox::Ok, QMessageBox::Ok);
|
||||
return;
|
||||
}
|
||||
|
||||
if (mIsExternalCircle) {
|
||||
std::cerr << "CreateCircleDialog::createCircle() External Circle";
|
||||
std::cerr << std::endl;
|
||||
|
||||
|
@ -397,11 +399,15 @@ void CreateCircleDialog::createCircle()
|
|||
QMessageBox::warning(this, tr("RetroShare"),tr("No Restriction Circle Selected"), QMessageBox::Ok, QMessageBox::Ok);
|
||||
return;
|
||||
}//else (ui.circleComboBox->getChosenCircle(chosenId))
|
||||
} else { //if (ui.radioButton_Public->isChecked())
|
||||
}
|
||||
else
|
||||
{ //if (ui.radioButton_Public->isChecked())
|
||||
QMessageBox::warning(this, tr("RetroShare"),tr("No Circle Limitations Selected"), QMessageBox::Ok, QMessageBox::Ok);
|
||||
return;
|
||||
}//else (ui.radioButton_Public->isChecked())
|
||||
} else {//if (mIsExternalCircle)
|
||||
}
|
||||
else
|
||||
{//if (mIsExternalCircle)
|
||||
std::cerr << "CreateCircleDialog::createCircle() Personal Circle";
|
||||
std::cerr << std::endl;
|
||||
|
||||
|
@ -410,16 +416,28 @@ void CreateCircleDialog::createCircle()
|
|||
circle.mMeta.mCircleType = GXS_CIRCLE_TYPE_LOCAL;
|
||||
}//else (mIsExternalCircle)
|
||||
|
||||
std::cerr << "CreateCircleDialog::createCircle() : mCircleType: " << circle.mMeta.mCircleType;
|
||||
std::cerr << std::endl;
|
||||
std::cerr << "CreateCircleDialog::createCircle() : mCircleId: " << circle.mMeta.mCircleId;
|
||||
std::cerr << std::endl;
|
||||
|
||||
std::cerr << "CreateCircleDialog::createCircle() Checks and Balances Okay - calling service proper..";
|
||||
std::cerr << std::endl;
|
||||
|
||||
uint32_t token;
|
||||
|
||||
if(mIsExistingCircle)
|
||||
{
|
||||
std::cerr << "CreateCircleDialog::updateCircle() : mCircleType: " << circle.mMeta.mCircleType << std::endl;
|
||||
std::cerr << "CreateCircleDialog::updateCircle() : mCircleId: " << circle.mMeta.mCircleId << std::endl;
|
||||
std::cerr << "CreateCircleDialog::updateCircle() : mGroupId: " << circle.mMeta.mGroupId << std::endl;
|
||||
|
||||
std::cerr << "CreateCircleDialog::updateCircle() Checks and Balances Okay - calling service proper.."<< std::endl;
|
||||
|
||||
rsGxsCircles->updateGroup(token, circle);
|
||||
}
|
||||
else
|
||||
{
|
||||
std::cerr << "CreateCircleDialog::createCircle() : mCircleType: " << circle.mMeta.mCircleType << std::endl;
|
||||
std::cerr << "CreateCircleDialog::createCircle() : mCircleId: " << circle.mMeta.mCircleId << std::endl;
|
||||
|
||||
std::cerr << "CreateCircleDialog::createCircle() Checks and Balances Okay - calling service proper.."<< std::endl;
|
||||
|
||||
rsGxsCircles->createGroup(token, circle);
|
||||
}
|
||||
|
||||
close();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue