From 57bac17b9f9e7e61a047afa65edb0a4df7c961d9 Mon Sep 17 00:00:00 2001 From: Sam Atkins Date: Wed, 11 May 2022 17:37:36 +0100 Subject: [PATCH] ClockSettings: Set window modified state --- Userland/Applications/ClockSettings/ClockSettingsWidget.cpp | 5 +++++ .../Applications/ClockSettings/TimeZoneSettingsWidget.cpp | 3 +++ 2 files changed, 8 insertions(+) diff --git a/Userland/Applications/ClockSettings/ClockSettingsWidget.cpp b/Userland/Applications/ClockSettings/ClockSettingsWidget.cpp index 263a07d1c22..dfb5edf1566 100644 --- a/Userland/Applications/ClockSettings/ClockSettingsWidget.cpp +++ b/Userland/Applications/ClockSettings/ClockSettingsWidget.cpp @@ -35,6 +35,7 @@ ClockSettingsWidget::ClockSettingsWidget() m_custom_format_input->set_enabled(false); m_custom_format_input->on_change = [&] { m_time_format = m_custom_format_input->get_text(); + set_modified(true); update_clock_preview(); }; @@ -60,6 +61,7 @@ ClockSettingsWidget::ClockSettingsWidget() return; m_show_seconds_checkbox->set_enabled(true); m_custom_format_input->set_enabled(false); + set_modified(true); update_time_format_string(); }; @@ -68,10 +70,12 @@ ClockSettingsWidget::ClockSettingsWidget() return; m_show_seconds_checkbox->set_enabled(true); m_custom_format_input->set_enabled(false); + set_modified(true); update_time_format_string(); }; m_show_seconds_checkbox->on_checked = [&](bool) { + set_modified(true); update_time_format_string(); }; @@ -80,6 +84,7 @@ ClockSettingsWidget::ClockSettingsWidget() return; m_show_seconds_checkbox->set_enabled(false); m_custom_format_input->set_enabled(true); + set_modified(true); }; m_clock_preview_update_timer = Core::Timer::create_repeating(1000, [&]() { diff --git a/Userland/Applications/ClockSettings/TimeZoneSettingsWidget.cpp b/Userland/Applications/ClockSettings/TimeZoneSettingsWidget.cpp index 6dcfc93fa46..34ac562a4bb 100644 --- a/Userland/Applications/ClockSettings/TimeZoneSettingsWidget.cpp +++ b/Userland/Applications/ClockSettings/TimeZoneSettingsWidget.cpp @@ -50,6 +50,9 @@ TimeZoneSettingsWidget::TimeZoneSettingsWidget() m_time_zone_combo_box->set_only_allow_values_from_model(true); m_time_zone_combo_box->set_model(*StringViewListModel::create(time_zones)); m_time_zone_combo_box->set_text(m_time_zone); + m_time_zone_combo_box->on_change = [&](auto, auto) { + set_modified(true); + }; auto time_zone_map_bitmap = Gfx::Bitmap::try_load_from_file("/res/graphics/map.png"sv).release_value_but_fixme_should_propagate_errors(); auto time_zone_rect = time_zone_map_bitmap->rect().shrunken(TIME_ZONE_MAP_NORTHERN_TRIM, 0, TIME_ZONE_MAP_SOUTHERN_TRIM, 0);