mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-08-02 11:16:34 -04:00
replaced the few bools in RsIdentityDetail by a set of flags
This commit is contained in:
parent
738dadadc9
commit
1de55d8fc5
9 changed files with 32 additions and 33 deletions
|
@ -235,7 +235,7 @@ static bool trimAnonIds(std::list<RsGxsId>& lst)
|
|||
RsIdentityDetails idd ;
|
||||
|
||||
for(std::list<RsGxsId>::iterator it = lst.begin();it!=lst.end();)
|
||||
if(!rsIdentity->getIdDetails(*it,idd) || !idd.mPgpLinked)
|
||||
if(!rsIdentity->getIdDetails(*it,idd) || !(idd.mFlags & RS_IDENTITY_FLAGS_PGP_LINKED))
|
||||
{
|
||||
it = lst.erase(it) ;
|
||||
removed= true ;
|
||||
|
|
|
@ -1333,7 +1333,7 @@ static void processList(const QStringList &list, const QString &textSingular, co
|
|||
|
||||
if(!gxs_id.isNull() && rsIdentity->getIdDetails(gxs_id,gxs_details))
|
||||
{
|
||||
if(gxs_details.mIsOwnId)
|
||||
if(gxs_details.mFlags & RS_IDENTITY_FLAGS_IS_OWN_ID)
|
||||
{
|
||||
QMessageBox::warning(NULL,QString("Cannot send message to yourself"),QString("This identity is owned by you. You wouldn't want to send yourself a message right?"));
|
||||
break ;
|
||||
|
|
|
@ -110,7 +110,7 @@ void CreateLobbyDialog::checkTextFields()
|
|||
|
||||
rsIdentity->getIdDetails(id,idd) ;
|
||||
|
||||
if( (!idd.mPgpKnown) && ui->pgp_signed_CB->isChecked())
|
||||
if( (!(idd.mFlags & RS_IDENTITY_FLAGS_PGP_KNOWN)) && ui->pgp_signed_CB->isChecked())
|
||||
ui->buttonBox->button(QDialogButtonBox::Ok)->setEnabled(false) ;
|
||||
}
|
||||
|
||||
|
|
|
@ -895,11 +895,11 @@ QString nickname = details.mNickname.empty()?tr("[Unknown]"):QString::fromUtf8(d
|
|||
QApplication::translate("GxsIdDetails", "Identity Id"),
|
||||
QString::fromStdString(details.mId.toStdString()));
|
||||
|
||||
if (details.mPgpLinked)
|
||||
if (details.mFlags & RS_IDENTITY_FLAGS_PGP_LINKED)
|
||||
{
|
||||
comment += QString("<br/>%1:%2 ").arg(QApplication::translate("GxsIdDetails", "Authentication"), QApplication::translate("GxsIdDetails", "Signed by"));
|
||||
|
||||
if (details.mPgpKnown)
|
||||
if (details.mFlags & RS_IDENTITY_FLAGS_PGP_KNOWN)
|
||||
{
|
||||
/* look up real name */
|
||||
std::string authorName = rsPeers->getGPGName(details.mPgpId);
|
||||
|
@ -937,9 +937,9 @@ void GxsIdDetails::getIcons(const RsIdentityDetails &details, QList<QIcon> &icon
|
|||
{
|
||||
// ICON Logic.
|
||||
QIcon baseIcon;
|
||||
if (details.mPgpLinked)
|
||||
if (details.mFlags & RS_IDENTITY_FLAGS_PGP_LINKED)
|
||||
{
|
||||
if (details.mPgpKnown)
|
||||
if (details.mFlags & RS_IDENTITY_FLAGS_PGP_KNOWN)
|
||||
baseIcon = QIcon(IMAGE_PGPKNOWN);
|
||||
else
|
||||
baseIcon = QIcon(IMAGE_PGPUNKNOWN);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue