mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-03-06 05:52:32 -08:00
Port more notification senders to non-XDG systems
* doc/lispref/os.texi (Desktop Notifications): Document that `:timeout' is now implemented. * java/org/gnu/emacs/EmacsDesktopNotification.java (EmacsDesktopNotification): New field delay. (display1): Set delay on Android 8.0 and up. * lisp/erc/erc-desktop-notifications.el (erc-notifications-notify): Call Android or Haiku notification functions on those systems. * lisp/gnus/gnus-notifications.el (gnus-notifications-action) (gnus-notification-close): Remove dismissed notifications from the notification to message map. (gnus-notifications-notify): Call android-notifications-notify if possible. * src/androidselect.c (android_init_emacs_desktop_notification): Update accordingly. (android_notifications_notify_1): New argument TIMEOUT. (Fandroid_notifications_notify): New argument QCtimeout. (syms_of_androidselect) <QCtimeout>: New symbol.
This commit is contained in:
parent
4afafa0370
commit
6b40d557c4
5 changed files with 115 additions and 47 deletions
|
|
@ -83,11 +83,16 @@ public final class EmacsDesktopNotification
|
|||
notification. */
|
||||
public final String[] actions, titles;
|
||||
|
||||
/* Delay in miliseconds after which this notification should be
|
||||
automatically dismissed. */
|
||||
public final long delay;
|
||||
|
||||
public
|
||||
EmacsDesktopNotification (String title, String content,
|
||||
String group, String tag, int icon,
|
||||
int importance,
|
||||
String[] actions, String[] titles)
|
||||
String[] actions, String[] titles,
|
||||
long delay)
|
||||
{
|
||||
this.content = content;
|
||||
this.title = title;
|
||||
|
|
@ -97,6 +102,7 @@ public final class EmacsDesktopNotification
|
|||
this.importance = importance;
|
||||
this.actions = actions;
|
||||
this.titles = titles;
|
||||
this.delay = delay;
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -191,6 +197,8 @@ public final class EmacsDesktopNotification
|
|||
builder.setContentTitle (title);
|
||||
builder.setContentText (content);
|
||||
builder.setSmallIcon (icon);
|
||||
builder.setTimeoutAfter (delay);
|
||||
|
||||
insertActions (context, builder);
|
||||
notification = builder.build ();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue