mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 21:57:35 +00:00
Terminal: Deduplicate bell mode parsing code
This commit is contained in:
parent
5c8962b8f1
commit
0bdb222953
1 changed files with 1 additions and 7 deletions
|
@ -65,13 +65,7 @@ public:
|
|||
VERIFY(domain == "Terminal");
|
||||
|
||||
if (group == "Window" && key == "Bell") {
|
||||
auto bell_mode = VT::TerminalWidget::BellMode::Visible;
|
||||
if (value == "AudibleBeep")
|
||||
bell_mode = VT::TerminalWidget::BellMode::AudibleBeep;
|
||||
if (value == "Visible")
|
||||
bell_mode = VT::TerminalWidget::BellMode::Visible;
|
||||
if (value == "Disabled")
|
||||
bell_mode = VT::TerminalWidget::BellMode::Disabled;
|
||||
auto bell_mode = VT::TerminalWidget::parse_bell(value).value_or(VT::TerminalWidget::BellMode::Visible);
|
||||
m_parent_terminal.set_bell_mode(bell_mode);
|
||||
} else if (group == "Text" && key == "Font") {
|
||||
auto font = Gfx::FontDatabase::the().get_by_name(value);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue