aboutsummaryrefslogtreecommitdiff
path: root/src/warn-notification.vala
diff options
context:
space:
mode:
authorRobert Tari <robert@tari.in>2020-08-11 12:20:04 +0200
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2020-08-11 21:29:33 +0200
commit11ea05685763cd7a233b56e11cd231c7774f69e1 (patch)
treea5277807f5f415486fb0134dc994e32dd268734d /src/warn-notification.vala
parenta3bc5a97496f357c47ddf069bd8c67af9143d2bf (diff)
downloadayatana-indicator-sound-11ea05685763cd7a233b56e11cd231c7774f69e1.tar.gz
ayatana-indicator-sound-11ea05685763cd7a233b56e11cd231c7774f69e1.tar.bz2
ayatana-indicator-sound-11ea05685763cd7a233b56e11cd231c7774f69e1.zip
Replace x-canonical attributes
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;
+ }
}