emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/trunk r101622: * lisp/notifications.el: Cal


From: Glenn Morris
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r101622: * lisp/notifications.el: Call dbus-register-signal only if it is bound.
Date: Sat, 25 Sep 2010 14:57:02 -0700
User-agent: Bazaar (2.0.3)

------------------------------------------------------------
revno: 101622
author: Julien Danjou <address@hidden>
committer: Glenn Morris <address@hidden>
branch nick: trunk
timestamp: Sat 2010-09-25 14:57:02 -0700
message:
  * lisp/notifications.el: Call dbus-register-signal only if it is bound.
modified:
  lisp/ChangeLog
  lisp/notifications.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2010-09-25 21:51:55 +0000
+++ b/lisp/ChangeLog    2010-09-25 21:57:02 +0000
@@ -1,3 +1,7 @@
+2010-09-25  Julien Danjou  <address@hidden>
+
+       * notifications.el: Call dbus-register-signal only if it is bound.
+
 2010-09-25  Glenn Morris  <address@hidden>
 
        * eshell/em-alias.el, eshell/em-banner.el, eshell/em-basic.el:

=== modified file 'lisp/notifications.el'
--- a/lisp/notifications.el     2010-09-13 04:39:36 +0000
+++ b/lisp/notifications.el     2010-09-25 21:57:02 +0000
@@ -95,13 +95,14 @@
       (funcall (cadr entry) id action)
       (remove entry 'notifications-on-action-map))))
 
-(dbus-register-signal
- :session
- notifications-service
- notifications-path
- notifications-interface
- notifications-action-signal
- 'notifications-on-action-signal)
+(when (fboundp 'dbus-register-signal)
+  (dbus-register-signal
+   :session
+   notifications-service
+   notifications-path
+   notifications-interface
+   notifications-action-signal
+   'notifications-on-action-signal))
 
 (defun notifications-on-closed-signal (id reason)
   "Dispatch signals to callback functions from `notifications-on-closed-map'."
@@ -111,13 +112,14 @@
               id (cadr (assoc reason notifications-closed-reason)))
       (remove entry 'notifications-on-close-map))))
 
-(dbus-register-signal
- :session
- notifications-service
- notifications-path
- notifications-interface
- notifications-closed-signal
- 'notifications-on-closed-signal)
+(when (fboundp 'dbus-register-signal)
+  (dbus-register-signal
+   :session
+   notifications-service
+   notifications-path
+   notifications-interface
+   notifications-closed-signal
+   'notifications-on-closed-signal))
 
 (defun notifications-notify (&rest params)
   "Send notification via D-Bus using the Freedesktop notification protocol.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]