aboutsummaryrefslogtreecommitdiff
path: root/src/warn-notification.vala
diff options
context:
space:
mode:
Diffstat (limited to 'src/warn-notification.vala')
-rw-r--r--src/warn-notification.vala60
1 files changed, 30 insertions, 30 deletions
diff --git a/src/warn-notification.vala b/src/warn-notification.vala
index 17129aa..f5c8b0b 100644
--- a/src/warn-notification.vala
+++ b/src/warn-notification.vala
@@ -19,41 +19,41 @@
public class IndicatorSound.WarnNotification: Notification
{
- public enum Response {
- CANCEL,
- OK
- }
+ public enum Response {
+ CANCEL,
+ OK
+ }
- public signal void user_responded (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");
- 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 ();
- });
- return n;
- }
+ 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 ();
+ });
+ return n;
+ }
- public bool show () {
+ public bool show () {
- if (!notify_server_supports ("actions"))
- return false;
+ if (!notify_server_supports ("actions"))
+ return false;
- _notification.clear_actions ();
- _notification.add_action ("ok", _("OK"), (n, a) => {
- user_responded (Response.OK);
- });
- _notification.add_action ("cancel", _("Cancel"), (n, a) => {
- user_responded (Response.CANCEL);
- });
- show_notification();
+ _notification.clear_actions ();
+ _notification.add_action ("ok", _("OK"), (n, a) => {
+ user_responded (Response.OK);
+ });
+ _notification.add_action ("cancel", _("Cancel"), (n, a) => {
+ user_responded (Response.CANCEL);
+ });
+ show_notification();
- return true;
- }
+ return true;
+ }
}