diff --git a/src/gui/DatabaseSettingsWidget.cpp b/src/gui/DatabaseSettingsWidget.cpp index 291887a97..baea2558a 100644 --- a/src/gui/DatabaseSettingsWidget.cpp +++ b/src/gui/DatabaseSettingsWidget.cpp @@ -79,6 +79,8 @@ void DatabaseSettingsWidget::load(Database* db) m_uiGeneral->dbDescriptionEdit->setText(meta->description()); m_uiGeneral->recycleBinEnabledCheckBox->setChecked(meta->recycleBinEnabled()); m_uiGeneral->defaultUsernameEdit->setText(meta->defaultUserName()); + m_uiGeneral->compressionCheckbox->setChecked(m_db->compressionAlgo() != Database::CompressionNone); + if (meta->historyMaxItems() > -1) { m_uiGeneral->historyMaxItemsSpinBox->setValue(meta->historyMaxItems()); 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(); meta->setName(m_uiGeneral->dbNameEdit->text()); diff --git a/src/gui/DatabaseSettingsWidgetGeneral.ui b/src/gui/DatabaseSettingsWidgetGeneral.ui index c072c1d8d..d3baf6132 100644 --- a/src/gui/DatabaseSettingsWidgetGeneral.ui +++ b/src/gui/DatabaseSettingsWidgetGeneral.ui @@ -26,9 +26,6 @@ Database name: - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - @@ -39,9 +36,6 @@ Database description: - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - @@ -52,9 +46,6 @@ Default username: - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - @@ -134,6 +125,25 @@ + + + + Additional Database Settings + + + + + + Enable &compression (recommended) + + + true + + + + + +