EditProfileDialog: add GUI to change the terminal bell mode

The feature has been in the profile settings for a long time, but without
being exposed in the UI.

BUG: 407821
BUG: 425759
wilder
Ahmad Samir 5 years ago committed by Kurt Hindenburg
parent bc6517593a
commit de9e92b81f
  1. 12
      src/widgets/EditProfileDialog.cpp
  2. 18
      src/widgets/EditProfileGeneralPage.ui

@ -21,6 +21,7 @@
#include <QTimer>
#include <QUrl>
#include <QStandardPaths>
#include <QStringListModel>
#include <QRegularExpressionValidator>
// KDE
@ -467,6 +468,12 @@ void EditProfileDialog::setupGeneralPage(const Profile::Ptr &profile)
_generalUi->terminalColumnsEntry->setFixedWidth(sizeEntryWidth);
_generalUi->terminalRowsEntry->setFixedWidth(sizeEntryWidth);
auto *bellModeModel = new QStringListModel({i18n("System Bell"), i18n("System Notifications"),
i18n("Visual Bell"), i18n("Ignore Bell Events")},
this);
_generalUi->terminalBellCombo->setModel(bellModeModel);
_generalUi->terminalBellCombo->setCurrentIndex(profile->property<int>(Profile::BellMode));
// signals and slots
connect(_generalUi->dirSelectButton, &QToolButton::clicked, this,
&Konsole::EditProfileDialog::selectInitialDir);
@ -489,6 +496,11 @@ void EditProfileDialog::setupGeneralPage(const Profile::Ptr &profile)
connect(_generalUi->terminalRowsEntry,
QOverload<int>::of(&QSpinBox::valueChanged), this,
&Konsole::EditProfileDialog::terminalRowsEntryChanged);
connect(_generalUi->terminalBellCombo, QOverload<int>::of(&QComboBox::currentIndexChanged),
this, [this](const int index) {
updateTempProfileProperty(Profile::BellMode, index);
});
}
void EditProfileDialog::showEnvironmentEditor()

@ -315,6 +315,24 @@
</property>
</widget>
</item>
<item row="8" column="0" alignment="Qt::AlignRight">
<widget class="QLabel" name="terminalBellLabel">
<property name="text">
<string>Terminal bell mode:</string>
</property>
<property name="buddy">
<cstring>terminalBellCombo</cstring>
</property>
</widget>
</item>
<item row="8" column="1" colspan="1" alignment="Qt::AlignLeft">
<layout class="QHBoxLayout" name="terminalBellLayout">
<item>
<widget class="QComboBox" name="terminalBellCombo">
</widget>
</item>
</layout>
</item>
</layout>
</item>
<item>

Loading…
Cancel
Save