aboutsummaryrefslogtreecommitdiff
path: root/src/settings-live.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/settings-live.cpp')
-rw-r--r--src/settings-live.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/settings-live.cpp b/src/settings-live.cpp
index cf18739..9cbc23c 100644
--- a/src/settings-live.cpp
+++ b/src/settings-live.cpp
@@ -47,6 +47,7 @@ LiveSettings::LiveSettings():
update_show_day();
update_show_detected_locations();
update_show_events();
+ update_show_alarms();
update_show_locations();
update_show_seconds();
update_show_week_numbers();
@@ -117,6 +118,10 @@ LiveSettings::LiveSettings():
g_settings_set_boolean(m_settings, SETTINGS_SHOW_EVENTS_S, value);
});
+ show_alarms.changed().connect([this](bool value){
+ g_settings_set_boolean(m_settings, SETTINGS_SHOW_ALARMS_S, value);
+ });
+
show_locations.changed().connect([this](bool value){
g_settings_set_boolean(m_settings, SETTINGS_SHOW_LOCATIONS_S, value);
});
@@ -239,6 +244,12 @@ void LiveSettings::update_show_events()
show_events.set(val);
}
+void LiveSettings::update_show_alarms()
+{
+ const auto val = g_settings_get_boolean(m_settings, SETTINGS_SHOW_ALARMS_S);
+ show_alarms.set(val);
+}
+
void LiveSettings::update_show_locations()
{
const auto val = g_settings_get_boolean(m_settings, SETTINGS_SHOW_LOCATIONS_S);
@@ -415,6 +426,8 @@ void LiveSettings::update_key_ccid(const std::string& key)
update_show_week_numbers();
else if (key == SETTINGS_SHOW_EVENTS_S)
update_show_events();
+ else if (key == SETTINGS_SHOW_ALARMS_S)
+ update_show_alarms();
else if (key == SETTINGS_SHOW_LOCATIONS_S)
update_show_locations();
else if (key == SETTINGS_SHOW_DETECTED_S)