aboutsummaryrefslogtreecommitdiffstats
path: root/java
diff options
context:
space:
mode:
Diffstat (limited to 'java')
-rw-r--r--java/org/gnu/emacs/EmacsDesktopNotification.java10
1 files changed, 9 insertions, 1 deletions
diff --git a/java/org/gnu/emacs/EmacsDesktopNotification.java b/java/org/gnu/emacs/EmacsDesktopNotification.java
index d05ed2e6203..d00b9f2ea22 100644
--- a/java/org/gnu/emacs/EmacsDesktopNotification.java
+++ b/java/org/gnu/emacs/EmacsDesktopNotification.java
@@ -83,11 +83,16 @@ public final class EmacsDesktopNotification
83 notification. */ 83 notification. */
84 public final String[] actions, titles; 84 public final String[] actions, titles;
85 85
86 /* Delay in miliseconds after which this notification should be
87 automatically dismissed. */
88 public final long delay;
89
86 public 90 public
87 EmacsDesktopNotification (String title, String content, 91 EmacsDesktopNotification (String title, String content,
88 String group, String tag, int icon, 92 String group, String tag, int icon,
89 int importance, 93 int importance,
90 String[] actions, String[] titles) 94 String[] actions, String[] titles,
95 long delay)
91 { 96 {
92 this.content = content; 97 this.content = content;
93 this.title = title; 98 this.title = title;
@@ -97,6 +102,7 @@ public final class EmacsDesktopNotification
97 this.importance = importance; 102 this.importance = importance;
98 this.actions = actions; 103 this.actions = actions;
99 this.titles = titles; 104 this.titles = titles;
105 this.delay = delay;
100 } 106 }
101 107
102 108
@@ -191,6 +197,8 @@ public final class EmacsDesktopNotification
191 builder.setContentTitle (title); 197 builder.setContentTitle (title);
192 builder.setContentText (content); 198 builder.setContentText (content);
193 builder.setSmallIcon (icon); 199 builder.setSmallIcon (icon);
200 builder.setTimeoutAfter (delay);
201
194 insertActions (context, builder); 202 insertActions (context, builder);
195 notification = builder.build (); 203 notification = builder.build ();
196 } 204 }