mirror of
https://github.com/chris2511/xca.git
synced 2026-09-12 19:51:05 +05:00
Relates #88: Select a common or individual passwords
When exporting items into encrypted files, the checkbox "Same encryption password for all items" may be used to enter one password once for all items. Otherwise a new password dialog opens for each exported entry.
This commit is contained in:
parent
c806631906
commit
ec3dec0b44
@ -6,8 +6,8 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>589</width>
|
||||
<height>366</height>
|
||||
<width>520</width>
|
||||
<height>385</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
@ -115,19 +115,33 @@
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="separateFiles">
|
||||
<property name="text">
|
||||
<string>Each Item in a separate file</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="groupBox">
|
||||
<property name="title">
|
||||
<string>Export Format</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<widget class="QCheckBox" name="separateFiles">
|
||||
<property name="text">
|
||||
<string>Each Item in a separate file</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="samePassword">
|
||||
<property name="text">
|
||||
<string>Same encryption password for all items</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="pemComment">
|
||||
<property name="text">
|
||||
<string>Export comment into PEM file</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
@ -166,13 +180,6 @@
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="pemComment">
|
||||
<property name="text">
|
||||
<string>Export comment into PEM file</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
|
||||
@ -35,6 +35,7 @@ ExportDialog::ExportDialog(QWidget *w, const QString &title,
|
||||
fname = pki->getUnderlinedName();
|
||||
}
|
||||
separateFiles->hide();
|
||||
samePassword->hide();
|
||||
setupExportFormat(F_MULTI);
|
||||
} else {
|
||||
// Plural form not required for < 2 items
|
||||
@ -162,6 +163,7 @@ void ExportDialog::on_exportFormat_highlighted(int index)
|
||||
return;
|
||||
infoBox->setText(x->help);
|
||||
pemComment->setEnabled(x->flags & F_PEM);
|
||||
samePassword->setEnabled(x->flags & F_CRYPT);
|
||||
}
|
||||
|
||||
void ExportDialog::on_separateFiles_clicked(bool checked)
|
||||
|
||||
@ -508,7 +508,8 @@ void XcaTreeView::exportItems(const QModelIndexList &indexes)
|
||||
|
||||
if (dlg->separateFiles->isChecked()) {
|
||||
Passwd pass;
|
||||
if (xport->match_all(F_CRYPT)) {
|
||||
if (xport->match_all(F_CRYPT) && dlg->samePassword->isChecked())
|
||||
{
|
||||
// Plural form not required for < 2 items
|
||||
// Will only be called for 2 or more items
|
||||
pass_info p(tr("Export Password"),
|
||||
|
||||
Loading…
Reference in New Issue
Block a user