From bb7b522ef52b240718f33f37b577bacc4fea2db6 Mon Sep 17 00:00:00 2001 From: Renato Araujo Oliveira Filho Date: Mon, 18 Apr 2016 23:42:53 -0300 Subject: Post message on messaging menu if the notification get timeout. --- include/notifications/notifications.h | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'include/notifications') diff --git a/include/notifications/notifications.h b/include/notifications/notifications.h index 0de1e23..2bb6694 100644 --- a/include/notifications/notifications.h +++ b/include/notifications/notifications.h @@ -50,6 +50,8 @@ public: void set_icon_name (const std::string& icon_name); + void set_start_time(uint64_t time); + /* Set an interval, after which the notification will automatically be closed. If not set, the notification server's default timeout is used. */ @@ -62,19 +64,24 @@ public: static constexpr char const * HINT_NONSHAPED_ICON {"x-canonical-non-shaped-icon"}; static constexpr char const * HINT_AFFIRMATIVE_HINT {"x-canonical-private-affirmative-tint"}; static constexpr char const * HINT_REJECTION_TINT {"x-canonical-private-rejection-tint"}; + static constexpr char const * HINT_INTERACTIVE {"x-canonical-switch-to-application"}; /* Add an action button. This may fail if the Engine doesn't support actions. @see Engine::supports_actions() */ void add_action (const std::string& action, const std::string& label); - /** Sets the closed callback. This will be called exactly once. */ + /** Sets the closed callback. This will be called exactly once. After notification dissapear */ void set_closed_callback (std::function); + /** Sets the time-out callback. This will be called exactly once. */ + void set_missed_click_callback (std::function); + + private: friend class Engine; class Impl; - std::unique_ptr impl; + std::shared_ptr impl; }; /** -- cgit v1.2.3 From 6a6cca286f8dca9a41fb13d51f991dd88eec5791 Mon Sep 17 00:00:00 2001 From: Renato Araujo Oliveira Filho Date: Wed, 20 Apr 2016 17:59:25 -0300 Subject: Vibrate only once when notification about calendar events. --- include/notifications/haptic.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/notifications') diff --git a/include/notifications/haptic.h b/include/notifications/haptic.h index 535074d..2f4008a 100644 --- a/include/notifications/haptic.h +++ b/include/notifications/haptic.h @@ -41,7 +41,7 @@ public: MODE_PULSE }; - explicit Haptic(const Mode& mode = MODE_PULSE); + explicit Haptic(const Mode& mode = MODE_PULSE, bool repeat = false); ~Haptic(); private: -- cgit v1.2.3 From 0c654b464fa215190c5fef74e8aa6e0d951224e7 Mon Sep 17 00:00:00 2001 From: Renato Araujo Oliveira Filho Date: Tue, 26 Apr 2016 12:02:03 -0300 Subject: Fixed as reviewer requested. --- include/notifications/notifications.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/notifications') diff --git a/include/notifications/notifications.h b/include/notifications/notifications.h index 2bb6694..4b66800 100644 --- a/include/notifications/notifications.h +++ b/include/notifications/notifications.h @@ -81,7 +81,7 @@ public: private: friend class Engine; class Impl; - std::shared_ptr impl; + std::unique_ptr impl; }; /** -- cgit v1.2.3 From 0fb4679e9043ba2591055f46445294cf508be0fb Mon Sep 17 00:00:00 2001 From: Renato Araujo Oliveira Filho Date: Thu, 28 Apr 2016 09:35:05 -0300 Subject: Small fixes requeted by charles during the review. --- include/notifications/notifications.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/notifications') diff --git a/include/notifications/notifications.h b/include/notifications/notifications.h index 4b66800..450c45b 100644 --- a/include/notifications/notifications.h +++ b/include/notifications/notifications.h @@ -75,7 +75,7 @@ public: void set_closed_callback (std::function); /** Sets the time-out callback. This will be called exactly once. */ - void set_missed_click_callback (std::function); + void set_timeout_callback (std::function); private: -- cgit v1.2.3 From f42d0a01dcbd66920f65d1e5bd784914a797d773 Mon Sep 17 00:00:00 2001 From: Arthur Mello Date: Wed, 29 Jun 2016 21:37:56 -0300 Subject: Fix notifications so it respects if it should or not show bubbles or add to notification list --- include/notifications/notifications.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'include/notifications') diff --git a/include/notifications/notifications.h b/include/notifications/notifications.h index 450c45b..a76ec45 100644 --- a/include/notifications/notifications.h +++ b/include/notifications/notifications.h @@ -77,6 +77,12 @@ public: /** Sets the time-out callback. This will be called exactly once. */ void set_timeout_callback (std::function); + /** Sets if a notification bubble should be displayed. */ + void set_show_notification_bubble (bool show); + + /** Sets if notification should be posted to messaging menu after it is closed. */ + void set_post_to_messaging_menu (bool post); + private: friend class Engine; -- cgit v1.2.3 From fd6d89d244509981c6b57d5fe87c84078204bde0 Mon Sep 17 00:00:00 2001 From: Charles Kerr Date: Thu, 6 Oct 2016 12:07:05 -0500 Subject: in Awake, remove an unnecessary async call by passing the system bus into the constructor instead of fetching it asynchronously --- include/notifications/awake.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'include/notifications') diff --git a/include/notifications/awake.h b/include/notifications/awake.h index b441692..d0b46eb 100644 --- a/include/notifications/awake.h +++ b/include/notifications/awake.h @@ -22,6 +22,8 @@ #include +#include + namespace ayatana { namespace indicator { namespace notifications { @@ -36,7 +38,7 @@ namespace notifications { class Awake { public: - explicit Awake(const std::string& app_name); + explicit Awake(GDBusConnection* system_bus, const std::string& app_name); ~Awake(); private: -- cgit v1.2.3 From 6055485c2215e55cc0febe0eb15141e837d8e17b Mon Sep 17 00:00:00 2001 From: Robert Tari Date: Mon, 19 Jul 2021 00:19:07 +0200 Subject: Rename com.canonical.powerd -> com.lomiri.Repowerd --- include/notifications/dbus-shared.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'include/notifications') diff --git a/include/notifications/dbus-shared.h b/include/notifications/dbus-shared.h index 523fb2a..31df219 100644 --- a/include/notifications/dbus-shared.h +++ b/include/notifications/dbus-shared.h @@ -25,9 +25,9 @@ #define BUS_SCREEN_PATH "/com/canonical/Unity/Screen" #define BUS_SCREEN_INTERFACE "com.canonical.Unity.Screen" -#define BUS_POWERD_NAME "com.canonical.powerd" -#define BUS_POWERD_PATH "/com/canonical/powerd" -#define BUS_POWERD_INTERFACE "com.canonical.powerd" +#define BUS_POWERD_NAME "com.lomiri.Repowerd" +#define BUS_POWERD_PATH "/com/lomiri/Repowerd" +#define BUS_POWERD_INTERFACE "com.lomiri.Repowerd" #define BUS_HAPTIC_NAME "com.canonical.usensord" #define BUS_HAPTIC_PATH "/com/canonical/usensord/haptic" -- cgit v1.2.3 From acd91856354ca198c955ac1bde02d1fa60a57397 Mon Sep 17 00:00:00 2001 From: Mike Gabriel Date: Sun, 29 Aug 2021 13:41:10 +0200 Subject: include/notifications/notifications.h: Typo fix in comment. --- include/notifications/notifications.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/notifications') diff --git a/include/notifications/notifications.h b/include/notifications/notifications.h index a76ec45..af6d21f 100644 --- a/include/notifications/notifications.h +++ b/include/notifications/notifications.h @@ -71,7 +71,7 @@ public: @see Engine::supports_actions() */ void add_action (const std::string& action, const std::string& label); - /** Sets the closed callback. This will be called exactly once. After notification dissapear */ + /** Sets the closed callback. This will be called exactly once. After notification disappears */ void set_closed_callback (std::function); /** Sets the time-out callback. This will be called exactly once. */ -- cgit v1.2.3