Edit owner trust level.

Inplace editing with a combobox if user is allowed. in app config file.
This commit is contained in:
SET
2020-10-25 17:28:47 +01:00
parent ca2105733b
commit e434315940
16 changed files with 304 additions and 28 deletions

View File

@@ -77,4 +77,15 @@ const string GpgMEWorker::ImportKey(const char * filePath, Error& e)
fclose(kFp);
return keyid;
}
}
const Error GpgMEWorker::EditOwnerTrust(const char* anyFullId, GpgME::Key::OwnerTrust trustLevel)
{
Error e;
Key k = FindKey(anyFullId, e, false);
if (e.code() != 0)
return e;
SetOwnerTrustEditInteractor * interactor = new SetOwnerTrustEditInteractor(trustLevel);
GpgME::Data d; // Internal processing data
return m_ctx->edit(k, std::unique_ptr<SetOwnerTrustEditInteractor> (interactor), d);
}