mirror of
https://github.com/RGBCube/serenity
synced 2025-05-16 19:05:08 +00:00
Calendar: Only accept Calendar notifications
Previously, changing the time format caused Taskbar to crash. This commit also simplifies TaskbarWindow::config_string_did_change() so that it is in line with the changes made to Calendar::config_string_did_change(). Fixes #15384
This commit is contained in:
parent
a58d72656d
commit
3353f89e22
2 changed files with 2 additions and 7 deletions
|
@ -757,8 +757,7 @@ size_t Calendar::day_of_week_index(String const& day_name)
|
||||||
|
|
||||||
void Calendar::config_string_did_change(String const& domain, String const& group, String const& key, String const& value)
|
void Calendar::config_string_did_change(String const& domain, String const& group, String const& key, String const& value)
|
||||||
{
|
{
|
||||||
VERIFY(domain == "Calendar");
|
if (domain == "Calendar" && group == "View" && key == "FirstDayOfWeek") {
|
||||||
if (group == "View" && key == "FirstDayOfWeek") {
|
|
||||||
m_first_day_of_week = static_cast<DayOfWeek>(day_of_week_index(value));
|
m_first_day_of_week = static_cast<DayOfWeek>(day_of_week_index(value));
|
||||||
update_tiles(m_view_year, m_view_month);
|
update_tiles(m_view_year, m_view_month);
|
||||||
}
|
}
|
||||||
|
|
|
@ -101,11 +101,7 @@ TaskbarWindow::TaskbarWindow(NonnullRefPtr<GUI::Menu> start_menu)
|
||||||
|
|
||||||
void TaskbarWindow::config_string_did_change(String const& domain, String const& group, String const& key, String const& value)
|
void TaskbarWindow::config_string_did_change(String const& domain, String const& group, String const& key, String const& value)
|
||||||
{
|
{
|
||||||
if (domain == "Calendar"sv)
|
if (domain == "Taskbar" && group == "Clock" && key == "TimeFormat") {
|
||||||
return;
|
|
||||||
|
|
||||||
VERIFY(domain == "Taskbar");
|
|
||||||
if (group == "Clock" && key == "TimeFormat") {
|
|
||||||
m_clock_widget->update_format(value);
|
m_clock_widget->update_format(value);
|
||||||
update_applet_area();
|
update_applet_area();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue