mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-08-02 11:36:18 -04:00
Add compression option to database settings
This commit is contained in:
parent
50beac2baf
commit
75d2895db6
2 changed files with 23 additions and 0 deletions
|
@ -79,6 +79,8 @@ void DatabaseSettingsWidget::load(Database* db)
|
||||||
m_uiGeneral->dbDescriptionEdit->setText(meta->description());
|
m_uiGeneral->dbDescriptionEdit->setText(meta->description());
|
||||||
m_uiGeneral->recycleBinEnabledCheckBox->setChecked(meta->recycleBinEnabled());
|
m_uiGeneral->recycleBinEnabledCheckBox->setChecked(meta->recycleBinEnabled());
|
||||||
m_uiGeneral->defaultUsernameEdit->setText(meta->defaultUserName());
|
m_uiGeneral->defaultUsernameEdit->setText(meta->defaultUserName());
|
||||||
|
m_uiGeneral->compressionCheckbox->setChecked(m_db->compressionAlgo() != Database::CompressionNone);
|
||||||
|
|
||||||
if (meta->historyMaxItems() > -1) {
|
if (meta->historyMaxItems() > -1) {
|
||||||
m_uiGeneral->historyMaxItemsSpinBox->setValue(meta->historyMaxItems());
|
m_uiGeneral->historyMaxItemsSpinBox->setValue(meta->historyMaxItems());
|
||||||
m_uiGeneral->historyMaxItemsCheckBox->setChecked(true);
|
m_uiGeneral->historyMaxItemsCheckBox->setChecked(true);
|
||||||
|
@ -168,6 +170,8 @@ void DatabaseSettingsWidget::save()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
m_db->setCompressionAlgo(m_uiGeneral->compressionCheckbox->isChecked() ? Database::CompressionGZip : Database::CompressionNone);
|
||||||
|
|
||||||
Metadata* meta = m_db->metadata();
|
Metadata* meta = m_db->metadata();
|
||||||
|
|
||||||
meta->setName(m_uiGeneral->dbNameEdit->text());
|
meta->setName(m_uiGeneral->dbNameEdit->text());
|
||||||
|
|
|
@ -134,6 +134,25 @@
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QGroupBox" name="groupBox_3">
|
||||||
|
<property name="title">
|
||||||
|
<string>Additional Database Settings</string>
|
||||||
|
</property>
|
||||||
|
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||||
|
<item>
|
||||||
|
<widget class="QCheckBox" name="compressionCheckbox">
|
||||||
|
<property name="text">
|
||||||
|
<string>Enable &compression (recommended)</string>
|
||||||
|
</property>
|
||||||
|
<property name="checked">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<spacer name="verticalSpacer">
|
<spacer name="verticalSpacer">
|
||||||
<property name="orientation">
|
<property name="orientation">
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue