Commit afabf9a4 authored by Christoph Cullmann's avatar Christoph Cullmann 🐮
Browse files

add config dialog entry for output limit

allows the user to limit the amount of history
in the output toolview
parent 7f0e4b5f
Pipeline #193598 passed with stage
in 3 minutes and 44 seconds
......@@ -127,6 +127,18 @@ void KateConfigDialog::addBehaviorPage()
m_messageTypes->setCurrentIndex(cgGeneral.readEntry("Show output view for message type", 1));
connect(m_messageTypes, static_cast<void (QComboBox::*)(int)>(&QComboBox::currentIndexChanged), this, &KateConfigDialog::slotChanged);
vbox->addLayout(hlayout);
hlayout = new QHBoxLayout;
label = new QLabel(i18n("&Limit output view history:"), buttonGroup);
hlayout->addWidget(label);
m_outputHistoryLimit = new QSpinBox(buttonGroup);
hlayout->addWidget(m_outputHistoryLimit);
label->setBuddy(m_outputHistoryLimit);
m_outputHistoryLimit->setRange(-1, 10000);
m_outputHistoryLimit->setSpecialValueText(i18n("Unlimited"));
m_outputHistoryLimit->setValue(cgGeneral.readEntry("Output History Limit", 100));
connect(m_outputHistoryLimit, static_cast<void (QSpinBox::*)(int)>(&QSpinBox::valueChanged), this, &KateConfigDialog::slotChanged);
vbox->addLayout(hlayout);
}
// modified files notification
......@@ -443,8 +455,9 @@ void KateConfigDialog::slotApply()
cg.writeEntry("Close After Last", sessionConfigUi.modCloseAfterLast->isChecked());
m_mainWindow->setModCloseAfterLast(sessionConfigUi.modCloseAfterLast->isChecked());
if (m_messageTypes) {
if (m_messageTypes && m_outputHistoryLimit) {
cg.writeEntry("Show output view for message type", m_messageTypes->currentIndex());
cg.writeEntry("Output History Limit", m_outputHistoryLimit->value());
}
cg.writeEntry("Mouse back button action", m_mouseBackActions->currentIndex());
......
......@@ -86,6 +86,7 @@ private:
bool m_dataChanged = false;
QComboBox *m_messageTypes = nullptr;
QSpinBox *m_outputHistoryLimit = nullptr;
QComboBox *m_mouseBackActions = nullptr;
QComboBox *m_mouseForwardActions = nullptr;
QCheckBox *m_modNotifications;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment