diff options
author | Arthur Mello <arthur.mello@canonical.com> | 2016-06-23 16:04:50 -0300 |
---|---|---|
committer | Robert Tari <robert@tari.in> | 2021-07-08 00:23:13 +0200 |
commit | 033735a671e29307271f0a900b8b10090f28f153 (patch) | |
tree | 8ee03a975028e2dbf41d1e813b39c62d97ab24c1 /src/settings-live.cpp | |
parent | 9c7c869ae51fffe7ce560faf0d3d2cecf5743563 (diff) | |
download | ayatana-indicator-datetime-033735a671e29307271f0a900b8b10090f28f153.tar.gz ayatana-indicator-datetime-033735a671e29307271f0a900b8b10090f28f153.tar.bz2 ayatana-indicator-datetime-033735a671e29307271f0a900b8b10090f28f153.zip |
Set calendar notification settings to true in case GSettings schema is not available Make sure calendar notification settings are correct during tests
Diffstat (limited to 'src/settings-live.cpp')
-rw-r--r-- | src/settings-live.cpp | 30 |
1 files changed, 25 insertions, 5 deletions
diff --git a/src/settings-live.cpp b/src/settings-live.cpp index f908c05..39d8e18 100644 --- a/src/settings-live.cpp +++ b/src/settings-live.cpp @@ -299,27 +299,47 @@ void LiveSettings::update_snooze_duration() void LiveSettings::update_cal_notification_enabled() { - cal_notification_enabled.set(g_settings_get_boolean(m_settings_cal_notification, SETTINGS_NOTIFY_ENABLED_KEY)); + if (m_settings_cal_notification) { + cal_notification_enabled.set(g_settings_get_boolean(m_settings_cal_notification, SETTINGS_NOTIFY_ENABLED_KEY)); + } else { + cal_notification_enabled.set(true); + } } void LiveSettings::update_cal_notification_sounds() { - cal_notification_sounds.set(g_settings_get_boolean(m_settings_cal_notification, SETTINGS_NOTIFY_SOUNDS_KEY)); + if (m_settings_cal_notification) { + cal_notification_sounds.set(g_settings_get_boolean(m_settings_cal_notification, SETTINGS_NOTIFY_SOUNDS_KEY)); + } else { + cal_notification_sounds.set(true); + } } void LiveSettings::update_cal_notification_vibrations() { - cal_notification_vibrations.set(g_settings_get_boolean(m_settings_cal_notification, SETTINGS_NOTIFY_VIBRATIONS_KEY)); + if (m_settings_cal_notification) { + cal_notification_vibrations.set(g_settings_get_boolean(m_settings_cal_notification, SETTINGS_NOTIFY_VIBRATIONS_KEY)); + } else { + cal_notification_vibrations.set(true); + } } void LiveSettings::update_cal_notification_bubbles() { - cal_notification_bubbles.set(g_settings_get_boolean(m_settings_cal_notification, SETTINGS_NOTIFY_BUBBLES_KEY)); + if (m_settings_cal_notification) { + cal_notification_bubbles.set(g_settings_get_boolean(m_settings_cal_notification, SETTINGS_NOTIFY_BUBBLES_KEY)); + } else { + cal_notification_bubbles.set(true); + } } void LiveSettings::update_cal_notification_list() { - cal_notification_list.set(g_settings_get_boolean(m_settings_cal_notification, SETTINGS_NOTIFY_LIST_KEY)); + if (m_settings_cal_notification) { + cal_notification_list.set(g_settings_get_boolean(m_settings_cal_notification, SETTINGS_NOTIFY_LIST_KEY)); + } else { + cal_notification_list.set(true); + } } /*** |