Commit 42343747 authored by Julien Danjou's avatar Julien Danjou Committed by Glenn Morris
Browse files

* lisp/notifications.el: Call dbus-register-signal only if it is bound.

parent ec60da52
2010-09-25 Julien Danjou <julien@danjou.info>
* notifications.el: Call dbus-register-signal only if it is bound.
2010-09-25 Glenn Morris <rgm@gnu.org> 2010-09-25 Glenn Morris <rgm@gnu.org>
   
* eshell/em-alias.el, eshell/em-banner.el, eshell/em-basic.el: * eshell/em-alias.el, eshell/em-banner.el, eshell/em-basic.el:
......
...@@ -95,13 +95,14 @@ ...@@ -95,13 +95,14 @@
(funcall (cadr entry) id action) (funcall (cadr entry) id action)
(remove entry 'notifications-on-action-map)))) (remove entry 'notifications-on-action-map))))
(dbus-register-signal (when (fboundp 'dbus-register-signal)
:session (dbus-register-signal
notifications-service :session
notifications-path notifications-service
notifications-interface notifications-path
notifications-action-signal notifications-interface
'notifications-on-action-signal) notifications-action-signal
'notifications-on-action-signal))
(defun notifications-on-closed-signal (id reason) (defun notifications-on-closed-signal (id reason)
"Dispatch signals to callback functions from `notifications-on-closed-map'." "Dispatch signals to callback functions from `notifications-on-closed-map'."
...@@ -111,13 +112,14 @@ ...@@ -111,13 +112,14 @@
id (cadr (assoc reason notifications-closed-reason))) id (cadr (assoc reason notifications-closed-reason)))
(remove entry 'notifications-on-close-map)))) (remove entry 'notifications-on-close-map))))
(dbus-register-signal (when (fboundp 'dbus-register-signal)
:session (dbus-register-signal
notifications-service :session
notifications-path notifications-service
notifications-interface notifications-path
notifications-closed-signal notifications-interface
'notifications-on-closed-signal) notifications-closed-signal
'notifications-on-closed-signal))
(defun notifications-notify (&rest params) (defun notifications-notify (&rest params)
"Send notification via D-Bus using the Freedesktop notification protocol. "Send notification via D-Bus using the Freedesktop notification protocol.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment