From 9c7c869ae51fffe7ce560faf0d3d2cecf5743563 Mon Sep 17 00:00:00 2001 From: Arthur Mello Date: Wed, 22 Jun 2016 15:37:55 -0300 Subject: Update indicator-datetime to work with the new notification settings --- include/datetime/settings-live.h | 12 ++++++++---- include/datetime/settings-shared.h | 9 +++++++-- include/datetime/settings.h | 6 +++++- 3 files changed, 20 insertions(+), 7 deletions(-) (limited to 'include/datetime') diff --git a/include/datetime/settings-live.h b/include/datetime/settings-live.h index 330b8e8..4aeaa9b 100644 --- a/include/datetime/settings-live.h +++ b/include/datetime/settings-live.h @@ -39,9 +39,9 @@ public: private: static void on_changed_ccid(GSettings*, gchar*, gpointer); - static void on_changed_cunh(GSettings*, gchar*, gpointer); + static void on_changed_cal_notification(GSettings*, gchar*, gpointer); void update_key_ccid(const std::string& key); - void update_key_cunh(const std::string& key); + void update_key_cal_notification(const std::string& key); void update_custom_time_format(); void update_locations(); @@ -62,10 +62,14 @@ private: void update_alarm_duration(); void update_alarm_haptic(); void update_snooze_duration(); - void update_muted_apps(); + void update_cal_notification_enabled(); + void update_cal_notification_sounds(); + void update_cal_notification_vibrations(); + void update_cal_notification_bubbles(); + void update_cal_notification_list(); GSettings* m_settings; - GSettings* m_settings_cunh; + GSettings* m_settings_cal_notification; // we've got a raw pointer here, so disable copying LiveSettings(const LiveSettings&) =delete; diff --git a/include/datetime/settings-shared.h b/include/datetime/settings-shared.h index f385e7a..236b8f1 100644 --- a/include/datetime/settings-shared.h +++ b/include/datetime/settings-shared.h @@ -51,7 +51,12 @@ TimeFormatMode; #define SETTINGS_ALARM_HAPTIC_S "alarm-haptic-feedback" #define SETTINGS_SNOOZE_DURATION_S "snooze-duration-minutes" -#define SETTINGS_CUNH_SCHEMA_ID "com.lomiri.notifications.hub" -#define SETTINGS_CUNH_BLACKLIST_S "blacklist" +#define SETTINGS_NOTIFY_SCHEMA_ID "com.lomiri.notifications.settings" +#define SETTINGS_NOTIFY_CALENDAR_PATH "/com/lomiri/NotificationSettings/com.lomiri.calendar/calendar/" +#define SETTINGS_NOTIFY_ENABLED_KEY "enable-notifications" +#define SETTINGS_NOTIFY_SOUNDS_KEY "use-sounds-notifications" +#define SETTINGS_NOTIFY_VIBRATIONS_KEY "use-vibrations-notifications" +#define SETTINGS_NOTIFY_BUBBLES_KEY "use-bubbles-notifications" +#define SETTINGS_NOTIFY_LIST_KEY "use-list-notifications" #endif // INDICATOR_DATETIME_SETTINGS_SHARED diff --git a/include/datetime/settings.h b/include/datetime/settings.h index d5e81c6..5ae00f6 100644 --- a/include/datetime/settings.h +++ b/include/datetime/settings.h @@ -61,7 +61,11 @@ public: core::Property alarm_volume; core::Property alarm_duration; core::Property snooze_duration; - core::Property>> muted_apps; + core::Property cal_notification_enabled; + core::Property cal_notification_sounds; + core::Property cal_notification_vibrations; + core::Property cal_notification_bubbles; + core::Property cal_notification_list; }; } // namespace datetime -- cgit v1.2.3