diff options
author | Olivier De Cannière <olivier.decanniere96@gmail.com> | 2022-09-19 22:50:01 +0200 |
---|---|---|
committer | Tim Flynn <trflynn89@pm.me> | 2022-09-20 13:12:00 -0400 |
commit | a1d98b825d0255d4d35f435d8381d541fc56f48b (patch) | |
tree | 8faa615da650c3e629d9c3fe82ab8d958b585fc9 /Userland/Applications/Calendar | |
parent | 0eceed4fd72697a4e9bebf23c06b300637296361 (diff) | |
download | serenity-a1d98b825d0255d4d35f435d8381d541fc56f48b.zip |
Calendar: Add setting to choose default view
This commit adds an entry to the Calendar Settings to allow the user to
select between the month and year views as the startup default.
Diffstat (limited to 'Userland/Applications/Calendar')
-rw-r--r-- | Userland/Applications/Calendar/main.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Userland/Applications/Calendar/main.cpp b/Userland/Applications/Calendar/main.cpp index b1c7d7223b..54f0e56042 100644 --- a/Userland/Applications/Calendar/main.cpp +++ b/Userland/Applications/Calendar/main.cpp @@ -99,6 +99,9 @@ ErrorOr<int> serenity_main(Main::Arguments arguments) view_type_action_group->set_exclusive(true); view_type_action_group->add_action(*view_month_action); view_type_action_group->add_action(*view_year_action); + auto default_view = Config::read_string("Calendar"sv, "View"sv, "DefaultView"sv, "Month"sv); + if (default_view == "Year") + view_year_action->set_checked(true); (void)TRY(toolbar->try_add_action(prev_date_action)); (void)TRY(toolbar->try_add_action(next_date_action)); |