branch: externals/tmr
commit f894ea40d6ca33563c25fadf6aa8eaecd9bc735d
Author: Protesilaos Stavrou <[email protected]>
Commit: Protesilaos Stavrou <[email protected]>

    Use notifications-application-icon for the notification on Linux
    
    This way we make the function work with Emacs 29 (and Emacs 31).
    
    Thanks to Karol Mróz for informing me that the previous code was
    throwing an error on Emacs 29. This was done in issue 14:
    <https://github.com/protesilaos/tmr/issues/14>.
---
 README.org | 4 ++--
 tmr.el     | 3 ++-
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/README.org b/README.org
index e10b04febb..6223a3d791 100644
--- a/README.org
+++ b/README.org
@@ -488,8 +488,8 @@ TMR is meant to be a collective effort.  Every bit of help 
matters.
   Mendler, Steven Allen.
 
 + Contributions to the code or manual :: Christian Tietze, Ed Tavinor,
-  Eugene Mikhaylov, Lucas Quintana, Mirko Hernandez, Nathan R.
-  DeGruchy, jpg.
+  Eugene Mikhaylov, Karol Mróz, Lucas Quintana, Mirko Hernandez,
+  Nathan R. DeGruchy, jpg.
 
 * GNU Free Documentation License
 :PROPERTIES:
diff --git a/tmr.el b/tmr.el
index d88c2d2883..dc3ecdfd81 100644
--- a/tmr.el
+++ b/tmr.el
@@ -614,6 +614,7 @@ If there are no timers, throw an error."
 (declare-function android-notifications-notify "androidselect.c" (&rest 
params))
 (declare-function w32-notification-notify "w32fns.c" (&rest params))
 (declare-function haiku-notifications-notify "haikuselect.c" (&rest params))
+(defvar notifications-application-icon)
 
 (defun tmr-notification-notify (timer)
   "Dispatch a notification for TIMER.
@@ -647,7 +648,7 @@ Read Info node `(elisp) Desktop Notifications' for details."
                 :title title
                 :body body
                 :app-name "GNU Emacs"
-                :app-icon 'emacs
+                :app-icon notifications-application-icon
                 :urgency tmr-notification-urgency
                 :sound-file tmr-sound-file))))
     (display-warning 'tmr "Emacs has no DBUS support, TMR notifications 
unavailable")))

Reply via email to