From da980e33f340734c91950d244b980c7d8b5eef95 Mon Sep 17 00:00:00 2001 From: Charles Kerr Date: Thu, 26 Jun 2014 15:55:17 -0500 Subject: Add Exporter's implementation to an Impl file because I'm about to shovel more methods and fields in there. --- include/datetime/exporter.h | 26 +++++++------------------- 1 file changed, 7 insertions(+), 19 deletions(-) (limited to 'include/datetime') diff --git a/include/datetime/exporter.h b/include/datetime/exporter.h index c228cc1..8ae70b1 100644 --- a/include/datetime/exporter.h +++ b/include/datetime/exporter.h @@ -25,8 +25,6 @@ #include -#include // GActionGroup - #include // std::shared_ptr #include @@ -40,31 +38,21 @@ namespace datetime { class Exporter { public: - Exporter() =default; + Exporter(); ~Exporter(); - core::Signal<> name_lost; + core::Signal<>& name_lost(); void publish(const std::shared_ptr& actions, const std::vector>& menus); private: - static void on_bus_acquired(GDBusConnection*, const gchar *name, gpointer gthis); - void on_bus_acquired(GDBusConnection*, const gchar *name); - - static void on_name_lost(GDBusConnection*, const gchar *name, gpointer gthis); - void on_name_lost(GDBusConnection*, const gchar *name); - - std::set m_exported_menu_ids; - guint m_own_id = 0; - guint m_exported_actions_id = 0; - GDBusConnection * m_dbus_connection = nullptr; - std::shared_ptr m_actions; - std::vector> m_menus; + class Impl; + std::unique_ptr p; - // we've got raw pointers and gsignal tags in here, so disable copying - Exporter(const Exporter&) =delete; - Exporter& operator=(const Exporter&) =delete; + // disable copying + Exporter(const Exporter&) =delete; + Exporter& operator=(const Exporter&) =delete; }; } // namespace datetime -- cgit v1.2.3 From c5081444f4f493dc386012bcb99d2430fe26dc5a Mon Sep 17 00:00:00 2001 From: Charles Kerr Date: Thu, 26 Jun 2014 21:36:42 -0500 Subject: Expose the alarm settings via dbus properties. --- include/datetime/exporter.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'include/datetime') diff --git a/include/datetime/exporter.h b/include/datetime/exporter.h index 8ae70b1..dd57263 100644 --- a/include/datetime/exporter.h +++ b/include/datetime/exporter.h @@ -22,6 +22,7 @@ #include #include +#include #include @@ -38,7 +39,7 @@ namespace datetime { class Exporter { public: - Exporter(); + Exporter(const std::shared_ptr&); ~Exporter(); core::Signal<>& name_lost(); -- cgit v1.2.3 From 8bb09ca0225886c18e351d3c6156521ed479edd1 Mon Sep 17 00:00:00 2001 From: Charles Kerr Date: Thu, 26 Jun 2014 22:13:13 -0500 Subject: Design prefers to have a volume slider instead of presets, so remove the AlarmVolume enum and replace it with an int range. --- include/datetime/settings-shared.h | 10 ---------- include/datetime/settings.h | 2 +- 2 files changed, 1 insertion(+), 11 deletions(-) (limited to 'include/datetime') diff --git a/include/datetime/settings-shared.h b/include/datetime/settings-shared.h index bfddd88..23d2e1c 100644 --- a/include/datetime/settings-shared.h +++ b/include/datetime/settings-shared.h @@ -30,16 +30,6 @@ typedef enum } TimeFormatMode; -typedef enum -{ - ALARM_VOLUME_VERY_QUIET, - ALARM_VOLUME_QUIET, - ALARM_VOLUME_NORMAL, - ALARM_VOLUME_LOUD, - ALARM_VOLUME_VERY_LOUD -} -AlarmVolume; - #define SETTINGS_INTERFACE "com.canonical.indicator.datetime" #define SETTINGS_SHOW_CLOCK_S "show-clock" #define SETTINGS_TIME_FORMAT_S "time-format" diff --git a/include/datetime/settings.h b/include/datetime/settings.h index a941f05..26d4ed0 100644 --- a/include/datetime/settings.h +++ b/include/datetime/settings.h @@ -57,7 +57,7 @@ public: core::Property time_format_mode; core::Property timezone_name; core::Property alarm_sound; - core::Property alarm_volume; + core::Property alarm_volume; core::Property alarm_duration; }; -- cgit v1.2.3 From eebf8f911cedf5124ada2f91576f821da6f421b0 Mon Sep 17 00:00:00 2001 From: Charles Kerr Date: Fri, 27 Jun 2014 09:46:21 -0500 Subject: use unsigned ints for the alarm volume, duration properties --- include/datetime/settings.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include/datetime') diff --git a/include/datetime/settings.h b/include/datetime/settings.h index 26d4ed0..e5f885e 100644 --- a/include/datetime/settings.h +++ b/include/datetime/settings.h @@ -57,8 +57,8 @@ public: core::Property time_format_mode; core::Property timezone_name; core::Property alarm_sound; - core::Property alarm_volume; - core::Property alarm_duration; + core::Property alarm_volume; + core::Property alarm_duration; }; } // namespace datetime -- cgit v1.2.3