1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 02:07:36 +00:00

LibGUI+Userland: Make Dialog::ExecResult an enum class

This commit is contained in:
Sam Atkins 2022-05-13 13:10:27 +01:00 committed by Linus Groh
parent 1f82beded3
commit cdffe556c8
90 changed files with 232 additions and 232 deletions

View file

@ -28,7 +28,7 @@ FontSettingsWidget::FontSettingsWidget()
auto& default_font_button = *find_descendant_of_type_named<GUI::Button>("default_font_button");
default_font_button.on_click = [this](auto) {
auto font_picker = GUI::FontPicker::construct(window(), &m_default_font_label->font(), false);
if (font_picker->exec() == GUI::Dialog::ExecOK) {
if (font_picker->exec() == GUI::Dialog::ExecResult::OK) {
update_label_with_font(*m_default_font_label, *font_picker->font());
set_modified(true);
}
@ -41,7 +41,7 @@ FontSettingsWidget::FontSettingsWidget()
auto& fixed_width_font_button = *find_descendant_of_type_named<GUI::Button>("fixed_width_font_button");
fixed_width_font_button.on_click = [this](auto) {
auto font_picker = GUI::FontPicker::construct(window(), &m_fixed_width_font_label->font(), true);
if (font_picker->exec() == GUI::Dialog::ExecOK) {
if (font_picker->exec() == GUI::Dialog::ExecResult::OK) {
update_label_with_font(*m_fixed_width_font_label, *font_picker->font());
set_modified(true);
}

View file

@ -254,7 +254,7 @@ void MonitorSettingsWidget::apply_settings()
revert_timer->start();
// If the user selects "No", closes the window or the window gets closed by the 10 seconds timer, revert the changes.
if (box->exec() == GUI::MessageBox::ExecYes) {
if (box->exec() == GUI::MessageBox::ExecResult::Yes) {
auto save_result = GUI::ConnectionToWindowServer::the().save_screen_layout();
if (!save_result.success()) {
GUI::MessageBox::show(window(), String::formatted("Error saving settings: {}", save_result.error_msg()),