[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2] notifications: Allow to use Icon Naming Specification for app
From: |
Andrew Tropin |
Subject: |
[PATCH v2] notifications: Allow to use Icon Naming Specification for app-icon |
Date: |
Mon, 24 Jul 2023 12:39:06 +0400 |
Icon is not always a file name, but can be just an icon name.
https://specifications.freedesktop.org/icon-naming-spec/icon-naming-spec-latest.html
* lisp/notifications.el (notifications-notify): Allow to use Icon
Naming Specification for app-icon.
---
lisp/notifications.el | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/lisp/notifications.el b/lisp/notifications.el
index 984ddbec5e9..13353264de3 100644
--- a/lisp/notifications.el
+++ b/lisp/notifications.el
@@ -137,6 +137,9 @@ notifications-notify
:app-icon The notification icon.
Default is `notifications-application-icon'.
Set to nil if you do not want any icon displayed.
+ If value is a string expand-file-name will be
+ applied, if value is a symbol it will be used as
+ is (helpful when using Icon Naming Specification).
:actions A list of actions in the form:
(KEY TITLE KEY TITLE ...)
where KEY and TITLE are both strings.
@@ -304,7 +307,10 @@ notifications-notify
notifications-application-name)
:uint32 (or replaces-id 0)
:string (if app-icon
- (expand-file-name app-icon)
+ (if (stringp app-icon)
+ (expand-file-name app-icon)
+ ;; Convert symbol to string
+ (symbol-name app-icon))
;; If app-icon is nil because user
;; requested it to be so, send the
;; empty string
--
2.41.0
signature.asc
Description: PGP signature
- Re: [PATCH] notifications: Don't expand-file-name app-icon., (continued)
- Re: [PATCH] notifications: Don't expand-file-name app-icon., Eli Zaretskii, 2023/07/25
- Re: [PATCH] notifications: Don't expand-file-name app-icon., Dmitry Gutov, 2023/07/25
- Re: [PATCH] notifications: Don't expand-file-name app-icon., Eli Zaretskii, 2023/07/25
- Re: [PATCH] notifications: Don't expand-file-name app-icon., Michael Albinus, 2023/07/25
- Re: [PATCH] notifications: Don't expand-file-name app-icon., Eli Zaretskii, 2023/07/25
- Re: [PATCH] notifications: Don't expand-file-name app-icon., Michael Albinus, 2023/07/26
- Re: [PATCH] notifications: Don't expand-file-name app-icon., Eli Zaretskii, 2023/07/26
- Re: [PATCH] notifications: Don't expand-file-name app-icon., Matthias Meulien, 2023/07/26
- Re: [PATCH] notifications: Don't expand-file-name app-icon., Michael Albinus, 2023/07/26
- Re: [PATCH] notifications: Don't expand-file-name app-icon., Matthias Meulien, 2023/07/26
[PATCH v2] notifications: Allow to use Icon Naming Specification for app-icon,
Andrew Tropin <=
[PATCH v3] notifications: Allow to use Icon Naming Specification for app-icon, Andrew Tropin, 2023/07/26
[PATCH v4] notifications: Allow to use Icon Naming Specification for app-icon, Andrew Tropin, 2023/07/27