Skip to content

Commit f8b65fb

Browse files
committed
Show all lock types
Signed-off-by: Raul Metsma <raul@metsma.ee>
1 parent 4c4af90 commit f8b65fb

2 files changed

Lines changed: 12 additions & 2 deletions

File tree

client/dialogs/KeyDialog.cpp

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,17 @@ KeyDialog::KeyDialog(const CDKey &k, QWidget *parent )
4949
};
5050

5151
addItem(tr("Recipient"), QString::fromStdString(k.lock.label));
52+
addItem(tr("Lock type"), [type = k.lock.type] {
53+
switch(type) {
54+
case libcdoc::Lock::SYMMETRIC_KEY: return QStringLiteral("SYMMETRIC_KEY");
55+
case libcdoc::Lock::PASSWORD: return QStringLiteral("PASSWORD");
56+
case libcdoc::Lock::PUBLIC_KEY: return QStringLiteral("PUBLIC_KEY");
57+
case libcdoc::Lock::CDOC1: return QStringLiteral("CDOC1");
58+
case libcdoc::Lock::SERVER: return QStringLiteral("SERVER");
59+
case libcdoc::Lock::SHARE_SERVER: return QStringLiteral("SHARE_SERVER");
60+
default: return QStringLiteral("INVALID");
61+
}
62+
}());
5263
QSslCertificate cert;
5364
if (!k.rcpt_cert.isNull()) {
5465
cert = k.rcpt_cert;

client/widgets/AddressItem.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -153,8 +153,7 @@ QWidget* AddressItem::lastTabWidget()
153153
}
154154

155155
void AddressItem::mouseReleaseEvent(QMouseEvent * /*event*/) {
156-
if (!ui->key.rcpt_cert.isNull() || ui->key.lock.isCertificate())
157-
(new KeyDialog(ui->key, this))->open();
156+
(new KeyDialog(ui->key, this))->open();
158157
}
159158

160159
void AddressItem::setName()

0 commit comments

Comments
 (0)