aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/notifications.el
diff options
context:
space:
mode:
authorAndrew Tropin2023-07-27 16:43:17 +0200
committerMichael Albinus2023-07-27 16:43:17 +0200
commit42a911c61e67caa807750cd40887b729f09aaf52 (patch)
treeb3af85c6de4cf3665e81ec700a8669890e70ce8c /lisp/notifications.el
parent184fc9b0200cf991c250bb3d6b158eaea2ee7806 (diff)
downloademacs-42a911c61e67caa807750cd40887b729f09aaf52.tar.gz
emacs-42a911c61e67caa807750cd40887b729f09aaf52.zip
notifications: Allow to use Icon Naming Specification for app-icon
* doc/lispref/os.texi (Desktop Notifications): Extend meaning of :app-icon. * etc/NEWS: Allow to use Icon Naming Specification for app-icon in notifications-notify. * lisp/notifications.el (notifications-notify): Allow to use Icon Naming Specification for app-icon.
Diffstat (limited to 'lisp/notifications.el')
-rw-r--r--lisp/notifications.el11
1 files changed, 10 insertions, 1 deletions
diff --git a/lisp/notifications.el b/lisp/notifications.el
index 984ddbec5e9..a694b38e52e 100644
--- a/lisp/notifications.el
+++ b/lisp/notifications.el
@@ -137,6 +137,12 @@ Various PARAMS can be set:
137 :app-icon The notification icon. 137 :app-icon The notification icon.
138 Default is `notifications-application-icon'. 138 Default is `notifications-application-icon'.
139 Set to nil if you do not want any icon displayed. 139 Set to nil if you do not want any icon displayed.
140 If the value is a string, the function
141 interprets it as a file name and converts to
142 absolute by using `expand-file-name'; if it is a
143 symbol, the function will use its name (which is
144 useful when using the Icon Naming
145 Specification).
140 :actions A list of actions in the form: 146 :actions A list of actions in the form:
141 (KEY TITLE KEY TITLE ...) 147 (KEY TITLE KEY TITLE ...)
142 where KEY and TITLE are both strings. 148 where KEY and TITLE are both strings.
@@ -304,7 +310,10 @@ of another `notifications-notify' call."
304 notifications-application-name) 310 notifications-application-name)
305 :uint32 (or replaces-id 0) 311 :uint32 (or replaces-id 0)
306 :string (if app-icon 312 :string (if app-icon
307 (expand-file-name app-icon) 313 (if (stringp app-icon)
314 (expand-file-name app-icon)
315 ;; Convert symbol to string
316 (symbol-name app-icon))
308 ;; If app-icon is nil because user 317 ;; If app-icon is nil because user
309 ;; requested it to be so, send the 318 ;; requested it to be so, send the
310 ;; empty string 319 ;; empty string