diff options
Diffstat (limited to 'src/warn-notification.vala')
-rw-r--r-- | src/warn-notification.vala | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/src/warn-notification.vala b/src/warn-notification.vala index 9175bb6..17129aa 100644 --- a/src/warn-notification.vala +++ b/src/warn-notification.vala @@ -24,32 +24,33 @@ public class IndicatorSound.WarnNotification: Notification OK } - public signal void user_responded (WarnNotification.Response response); + public signal void user_responded (Response response); protected override Notify.Notification create_notification () { - var n = new Notify.Notification(_("Volume"), - _("High volume can damage your hearing."), - "audio-volume-high"); + var n = new Notify.Notification ( + _("Volume"), + _("High volume can damage your hearing."), + "audio-volume-high"); n.set_hint ("x-canonical-non-shaped-icon", "true"); n.set_hint ("x-canonical-snap-decisions", "true"); n.set_hint ("x-canonical-private-affirmative-tint", "true"); - n.closed.connect((n) => { - n.clear_actions(); + n.closed.connect ((n) => { + n.clear_actions (); }); return n; } public bool show () { - if (!notify_server_supports("actions")) + if (!notify_server_supports ("actions")) return false; - _notification.clear_actions(); + _notification.clear_actions (); _notification.add_action ("ok", _("OK"), (n, a) => { - user_responded(Response.OK); + user_responded (Response.OK); }); _notification.add_action ("cancel", _("Cancel"), (n, a) => { - user_responded(Response.CANCEL); + user_responded (Response.CANCEL); }); show_notification(); |