From: Julien Danjou <julien@danjou.info>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: Tassilo Horn <tassilo@member.fsf.org>, emacs-devel@gnu.org
Subject: Re: [PATCH] Add notifications.el
Date: Wed, 09 Jun 2010 22:58:06 +0200 [thread overview]
Message-ID: <87631rzzxd.fsf@keller.adm.naquadah.org> (raw)
In-Reply-To: <jwvtypct02n.fsf-monnier+emacs@gnu.org> (Stefan Monnier's message of "Wed, 09 Jun 2010 16:39:33 -0400")
[-- Attachment #1.1: Type: text/plain, Size: 151 bytes --]
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?
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.2: 0001-Passes-notification-id-as-argument-of-on-action-and-.patch --]
[-- Type: text/x-diff, Size: 2421 bytes --]
From 56b9ff8b24c5d762190701e7bf2bb6cc0e4937a8 Mon Sep 17 00:00:00 2001
From: Julien Danjou <julien@danjou.info>
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 <julien@danjou.info>
---
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
[-- Attachment #1.3: Type: text/plain, Size: 79 bytes --]
--
Julien Danjou
// ᐰ <julien@danjou.info> http://julien.danjou.info
[-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --]
next prev parent reply other threads:[~2010-06-09 20:58 UTC|newest]
Thread overview: 55+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-06-05 17:07 [PATCH] Add notifications.el Julien Danjou
2010-06-07 12:12 ` Michael Albinus
2010-06-07 13:31 ` Stefan Monnier
2010-06-07 15:17 ` Julien Danjou
2010-06-07 15:18 ` Julien Danjou
2010-06-07 15:36 ` Michael Albinus
2010-06-07 15:59 ` Julien Danjou
2010-06-07 22:28 ` Davis Herring
2010-06-08 8:08 ` Julien Danjou
2010-06-08 8:45 ` Julien Danjou
2010-06-08 12:42 ` Michael Albinus
2010-06-08 13:07 ` Julien Danjou
2010-06-10 23:16 ` Jan Moringen
2010-06-11 6:46 ` Julien Danjou
[not found] ` <3277_1276238795_o5B6kZER023748_87aar22hj1.fsf@keller.adm.naquadah.org>
2010-06-11 7:30 ` Jan Moringen
2010-06-11 9:15 ` Julien Danjou
2010-06-11 9:27 ` Jan Moringen
2010-06-11 10:25 ` Michael Albinus
2010-06-09 0:37 ` Stefan Monnier
2010-06-09 7:44 ` Michael Albinus
2010-06-09 18:18 ` Tassilo Horn
2010-06-09 18:53 ` Julien Danjou
2010-06-09 19:16 ` Tassilo Horn
2010-06-09 19:47 ` Julien Danjou
2010-06-09 20:10 ` Tassilo Horn
2010-06-09 20:39 ` Stefan Monnier
2010-06-09 20:58 ` Julien Danjou [this message]
2010-06-10 0:26 ` Stefan Monnier
2010-06-10 6:33 ` Tassilo Horn
2010-06-10 7:55 ` Julien Danjou
2010-06-10 8:26 ` Michael Albinus
2010-06-10 8:43 ` [PATCH] Passes notification id as argument of on-action and on-close functions Julien Danjou
2010-06-10 13:00 ` Michael Albinus
2010-06-10 13:08 ` Julien Danjou
2010-06-10 13:25 ` Michael Albinus
2010-06-10 15:20 ` Juri Linkov
2010-06-10 15:45 ` Michael Albinus
2010-06-10 16:56 ` Juri Linkov
2010-06-10 18:41 ` Michael Albinus
2010-06-10 18:53 ` Stefan Monnier
2010-06-10 20:23 ` Juri Linkov
2010-06-11 0:43 ` Stefan Monnier
2010-06-11 6:35 ` Daniel Pittman
2010-06-11 8:07 ` Juri Linkov
2010-06-11 13:20 ` Stefan Monnier
2010-06-11 8:06 ` Juri Linkov
2010-06-11 13:21 ` Stefan Monnier
2010-06-11 14:54 ` Chong Yidong
2010-06-11 15:51 ` Stefan Monnier
2010-06-11 19:14 ` Juri Linkov
2010-06-12 6:20 ` Dan Nicolaescu
2010-06-12 20:10 ` Juri Linkov
2010-06-12 20:49 ` Stefan Monnier
2010-06-14 15:51 ` Juri Linkov
2010-06-14 19:09 ` Stefan Monnier
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87631rzzxd.fsf@keller.adm.naquadah.org \
--to=julien@danjou.info \
--cc=emacs-devel@gnu.org \
--cc=monnier@iro.umontreal.ca \
--cc=tassilo@member.fsf.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.