[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r100576: * net/notifications.el (noti
From: |
Michael Albinus |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r100576: * net/notifications.el (notifications-on-action-signal) |
Date: |
Thu, 10 Jun 2010 14:44:59 +0200 |
User-agent: |
Bazaar (2.0.3) |
------------------------------------------------------------
revno: 100576
committer: Michael Albinus <address@hidden>
branch nick: trunk
timestamp: Thu 2010-06-10 14:44:59 +0200
message:
* net/notifications.el (notifications-on-action-signal)
(notifications-on-closed-signal): Pass notification id as first
argument to the callback functions. Add docstrings.
(notifications-notify): Fix docstring.
modified:
lisp/ChangeLog
lisp/net/notifications.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog 2010-06-10 05:39:03 +0000
+++ b/lisp/ChangeLog 2010-06-10 12:44:59 +0000
@@ -1,3 +1,10 @@
+2010-06-10 Julien Danjou <address@hidden>
+
+ * net/notifications.el (notifications-on-action-signal)
+ (notifications-on-closed-signal): Pass notification id as first
+ argument to the callback functions. Add docstrings.
+ (notifications-notify): Fix docstring.
+
2010-06-10 Glenn Morris <address@hidden>
* emacs-lisp/authors.el (authors-ignored-files)
=== modified file 'lisp/net/notifications.el'
--- a/lisp/net/notifications.el 2010-06-09 17:54:28 +0000
+++ b/lisp/net/notifications.el 2010-06-10 12:44:59 +0000
@@ -86,9 +86,10 @@
"Mapping between notification and close callback functions.")
(defun notifications-on-action-signal (id action)
+ "Dispatch signals to callback functions from `notifications-on-action-map'."
(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
@@ -100,9 +101,11 @@
'notifications-on-action-signal)
(defun notifications-on-closed-signal (id reason)
+ "Dispatch signals to callback functions from `notifications-on-closed-map'."
(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
@@ -155,11 +158,13 @@
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 receives 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
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r100576: * net/notifications.el (notifications-on-action-signal),
Michael Albinus <=