]> code.delx.au - gnu-emacs/blobdiff - lisp/erc/erc-desktop-notifications.el
Update copyright year to 2015
[gnu-emacs] / lisp / erc / erc-desktop-notifications.el
index 60c49cc8870eab09f69755ee639548d8977ce4b2..f987597325b6cfbbc1524146912ede9155b7b0b4 100644 (file)
@@ -1,6 +1,6 @@
 ;; erc-desktop-notifications.el -- Send notification on PRIVMSG or mentions
 
-;; Copyright (C) 2012-2013 Free Software Foundation, Inc.
+;; Copyright (C) 2012-2015 Free Software Foundation, Inc.
 
 ;; Author: Julien Danjou <julien@danjou.info>
 ;; Keywords: comm
   :group 'erc-notifications
   :type '(choice (const :tag "No icon" nil) file))
 
+(defcustom erc-notifications-bus :session
+  "D-Bus bus to use for notification."
+  :version "25.1"
+  :group 'erc-notifications
+  :type '(choice (const :tag "Session bus" :session) string))
+
 (defvar dbus-debug) ; used in the macroexpansion of dbus-ignore-errors
 
 (defun erc-notifications-notify (nick msg)
@@ -53,7 +59,8 @@
 This will replace the last notification sent with this function."
   (dbus-ignore-errors
     (setq erc-notifications-last-notification
-          (notifications-notify :title (xml-escape-string nick)
+          (notifications-notify :bus erc-notifications-bus
+                               :title (xml-escape-string nick)
                                 :body (xml-escape-string msg)
                                 :replaces-id erc-notifications-last-notification
                                 :app-icon erc-notifications-icon))))