diff options
author | Charles Kerr <charles.kerr@canonical.com> | 2016-10-06 12:39:49 -0500 |
---|---|---|
committer | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2021-08-29 14:37:39 +0200 |
commit | 5ab8ee23903ec5a1eb1779164d65cb944195dc76 (patch) | |
tree | b39cfb7cc28413b6dea11a975b1c3373017670fb /src/settings-live.cpp | |
parent | 6863282c60b01752ecd53ea329a74940ee8380e4 (diff) | |
download | ayatana-indicator-datetime-5ab8ee23903ec5a1eb1779164d65cb944195dc76.tar.gz ayatana-indicator-datetime-5ab8ee23903ec5a1eb1779164d65cb944195dc76.tar.bz2 ayatana-indicator-datetime-5ab8ee23903ec5a1eb1779164d65cb944195dc76.zip |
In main.cpp and tests where Snap is instantiated, provide the system_bus to Snap's constructor
Diffstat (limited to 'src/settings-live.cpp')
-rw-r--r-- | src/settings-live.cpp | 26 |
1 files changed, 15 insertions, 11 deletions
diff --git a/src/settings-live.cpp b/src/settings-live.cpp index 66590e0..59c133f 100644 --- a/src/settings-live.cpp +++ b/src/settings-live.cpp @@ -40,13 +40,9 @@ LiveSettings::~LiveSettings() } LiveSettings::LiveSettings(): - m_settings(g_settings_new(SETTINGS_INTERFACE)), - m_settings_cal_notification(g_settings_new_with_path(SETTINGS_NOTIFY_SCHEMA_ID, SETTINGS_NOTIFY_CALENDAR_PATH)), - m_settings_general_notification(g_settings_new(SETTINGS_NOTIFY_APPS_SCHEMA_ID)) + m_settings(g_settings_new(SETTINGS_INTERFACE)) { g_signal_connect (m_settings, "changed", G_CALLBACK(on_changed_ccid), this); - g_signal_connect (m_settings_cal_notification, "changed", G_CALLBACK(on_changed_cal_notification), this); - g_signal_connect (m_settings_general_notification, "changed", G_CALLBACK(on_changed_general_notification), this); // init the Properties from the GSettings backend update_custom_time_format(); @@ -68,12 +64,20 @@ LiveSettings::LiveSettings(): update_alarm_duration(); update_alarm_haptic(); update_snooze_duration(); - update_cal_notification_enabled(); - update_cal_notification_sounds(); - update_cal_notification_vibrations(); - update_cal_notification_bubbles(); - update_cal_notification_list(); - update_vibrate_silent_mode(); + + if (ayatana_common_utils_is_lomiri()) + { + m_settings_cal_notification = g_settings_new_with_path(SETTINGS_NOTIFY_SCHEMA_ID, SETTINGS_NOTIFY_CALENDAR_PATH); + m_settings_general_notification = g_settings_new(SETTINGS_NOTIFY_APPS_SCHEMA_ID); + g_signal_connect (m_settings_cal_notification, "changed", G_CALLBACK(on_changed_cal_notification), this); + g_signal_connect (m_settings_general_notification, "changed", G_CALLBACK(on_changed_general_notification), this); + update_cal_notification_enabled(); + update_cal_notification_sounds(); + update_cal_notification_vibrations(); + update_cal_notification_bubbles(); + update_cal_notification_list(); + update_vibrate_silent_mode(); + } // now listen for clients to change the properties s.t. we can sync update GSettings |