[Xfce4-commits] <postler:master> Provide Open action in notification if supported
Christian Dywan
noreply at xfce.org
Thu Feb 3 00:34:02 CET 2011
Updating branch refs/heads/master
to dbc8649300b7c07d90890852840355b30a7b160b (commit)
from b3fc28fcb41c48c880564fcca5f6318a2eaa67e0 (commit)
commit dbc8649300b7c07d90890852840355b30a7b160b
Author: Christian Dywan <christian at twotoasts.de>
Date: Mon Jan 31 21:50:32 2011 +0100
Provide Open action in notification if supported
postler/postler-app.vala | 11 +++++++++++
1 files changed, 11 insertions(+), 0 deletions(-)
diff --git a/postler/postler-app.vala b/postler/postler-app.vala
index 690ccb5..9d865ec 100644
--- a/postler/postler-app.vala
+++ b/postler/postler-app.vala
@@ -227,6 +227,17 @@ public class Postler.App : Unique.App {
"summary", GLib.Environment.get_application_name (),
"body", message,
"icon-name", STOCK_INTERNET_MAIL);
+
+ unowned List<string> caps = Notify.get_server_caps ();
+ foreach (string cap in caps) {
+ if (cap == "actions") {
+ notification.add_action ("default", _("Open"), (n, a) => {
+ Postler.App.spawn_module ("bureau");
+ });
+ }
+ else if (cap == "sound")
+ notification.set_hint_uint32 ("suppress-sound", 1);
+ }
}
else
notification.set ("body", message);
More information about the Xfce4-commits
mailing list