aboutsummaryrefslogtreecommitdiff
path: root/src/actions.cpp
diff options
context:
space:
mode:
authorkugiigi <kugi_eusebio@protonmail.com>2021-03-20 11:52:07 +0800
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2023-12-19 16:57:38 +0100
commit63a57fde6677d8f663e5880a259998b95b1da6c5 (patch)
treecff6527e6f869c465e0b90296e761e246a8a39c6 /src/actions.cpp
parentecaacccacf853059ea4588c44bd13035faaba6af (diff)
downloadayatana-indicator-datetime-63a57fde6677d8f663e5880a259998b95b1da6c5.tar.gz
ayatana-indicator-datetime-63a57fde6677d8f663e5880a259998b95b1da6c5.tar.bz2
ayatana-indicator-datetime-63a57fde6677d8f663e5880a259998b95b1da6c5.zip
Add option to show/hide alarms
Diffstat (limited to 'src/actions.cpp')
-rw-r--r--src/actions.cpp5
1 files changed, 4 insertions, 1 deletions
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>& 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"));