[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] Add notifications.el
From: |
Julien Danjou |
Subject: |
Re: [PATCH] Add notifications.el |
Date: |
Wed, 09 Jun 2010 22:58:06 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) |
On Wed, Jun 09 2010, Stefan Monnier wrote:
> Just so I understand better the trade-off: what would it take to pass
> `id' to the on-close function?
From 56b9ff8b24c5d762190701e7bf2bb6cc0e4937a8 Mon Sep 17 00:00:00 2001
From: Julien Danjou <address@hidden>
Date: Wed, 9 Jun 2010 22:57:18 +0200
Subject: [PATCH] Passes notification id as argument of on-action and on-close
functions
Signed-off-by: Julien Danjou <address@hidden>
---
lisp/net/notifications.el | 12 +++++++-----
1 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/lisp/net/notifications.el b/lisp/net/notifications.el
index a2147ed..8d897eb 100644
--- a/lisp/net/notifications.el
+++ b/lisp/net/notifications.el
@@ -87,7 +87,7 @@
(defun notifications-on-action-signal (id action)
(let ((entry (assoc id notifications-on-action-map)))
(when entry
- (funcall (cadr entry) action)
+ (funcall (cadr entry) id action)
(remove entry 'notifications-on-action-map))))
(dbus-register-signal
@@ -101,7 +101,7 @@
(defun notifications-on-closed-signal (id reason)
(let ((entry (assoc id notifications-on-close-map)))
(when entry
- (funcall (cadr entry) (cadr (assoc reason notifications-closed-reason)))
+ (funcall (cadr entry) id (cadr (assoc reason
notifications-closed-reason)))
(remove entry 'notifications-on-close-map))))
(dbus-register-signal
@@ -153,11 +153,13 @@ Various PARAMS can be set:
should point to. The \"y\" hint must also be specified.
:y Specifies the Y location on the screen that the notification
should point to. The \"x\" hint must also be specified.
- :on-action Function to call when an action is invoked. The key of the
- action is passed as argument to the function.
+ :on-action Function to call when an action is invoked.
+ The notification id and the key of the action are passed
+ as arguments to the function.
:on-close Function to call when the notification has been closed
by timeout or by the user.
- The function receive the closing reason as argument:
+ The function receive the notification id and the closing
+ reason as arguments:
- `expired' if the notification has expired
- `dismissed' if the notification was dismissed by the user
- `close-notification' if the notification was closed
--
1.7.1
--
Julien Danjou
// ᐰ <address@hidden> http://julien.danjou.info
pgpEgtJjklgC3.pgp
Description: PGP signature
- Re: [PATCH] Add notifications.el, (continued)
Re: [PATCH] Add notifications.el, Tassilo Horn, 2010/06/09
- Re: [PATCH] Add notifications.el, Julien Danjou, 2010/06/09
- Re: [PATCH] Add notifications.el, Tassilo Horn, 2010/06/09
- Re: [PATCH] Add notifications.el, Julien Danjou, 2010/06/09
- Re: [PATCH] Add notifications.el, Tassilo Horn, 2010/06/09
- Re: [PATCH] Add notifications.el, Stefan Monnier, 2010/06/09
- Re: [PATCH] Add notifications.el,
Julien Danjou <=
- Re: [PATCH] Add notifications.el, Stefan Monnier, 2010/06/09
- Re: [PATCH] Add notifications.el, Tassilo Horn, 2010/06/10
- Re: [PATCH] Add notifications.el, Julien Danjou, 2010/06/10
- Re: [PATCH] Add notifications.el, Michael Albinus, 2010/06/10
- [PATCH] Passes notification id as argument of on-action and on-close functions, Julien Danjou, 2010/06/10
- Re: [PATCH] Passes notification id as argument of on-action and on-close functions, Michael Albinus, 2010/06/10
- Re: [PATCH] Passes notification id as argument of on-action and on-close functions, Julien Danjou, 2010/06/10
- Re: [PATCH] Passes notification id as argument of on-action and on-close functions, Michael Albinus, 2010/06/10
- Re: [PATCH] Passes notification id as argument of on-action and on-close functions, Juri Linkov, 2010/06/10
- Re: [PATCH] Passes notification id as argument of on-action and on-close functions, Michael Albinus, 2010/06/10