From 63a57fde6677d8f663e5880a259998b95b1da6c5 Mon Sep 17 00:00:00 2001 From: kugiigi Date: Sat, 20 Mar 2021 11:52:07 +0800 Subject: Add option to show/hide alarms --- src/actions.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/actions.cpp') diff --git a/src/actions.cpp b/src/actions.cpp index c184aef..18b99e8 100644 --- a/src/actions.cpp +++ b/src/actions.cpp @@ -142,7 +142,10 @@ GVariant* create_calendar_state(const std::shared_ptr& state) { gboolean days[32] = { 0 }; for (const auto& appt : state->calendar_month->appointments().get()) - days[appt.begin.day_of_month()] = true; + if (!appt.is_alarm() || state->settings->show_alarms.get()) + { + days[appt.begin.day_of_month()] = true; + } GVariantBuilder day_builder; g_variant_builder_init(&day_builder, G_VARIANT_TYPE("ai")); -- cgit v1.2.3