[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r101417: * notifications.el (notifica
From: |
Michael Albinus |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r101417: * notifications.el (notifications-notify): Add support for |
Date: |
Mon, 13 Sep 2010 06:39:36 +0200 |
User-agent: |
Bazaar (2.0.3) |
------------------------------------------------------------
revno: 101417
committer: Michael Albinus <address@hidden>
branch nick: trunk
timestamp: Mon 2010-09-13 06:39:36 +0200
message:
* notifications.el (notifications-notify): Add support for
image-path and sound-name.
(notifications-specification-version): Add this variable.
modified:
lisp/ChangeLog
lisp/notifications.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog 2010-09-12 14:35:37 +0000
+++ b/lisp/ChangeLog 2010-09-13 04:39:36 +0000
@@ -1,3 +1,9 @@
+2010-09-13 Julien Danjou <address@hidden>
+
+ * notifications.el (notifications-notify): Add support for
+ image-path and sound-name.
+ (notifications-specification-version): Add this variable.
+
2010-09-12 Stefan Monnier <address@hidden>
* subr.el (y-or-n-p): New function, moved from src/fns.c. Use read-key.
=== modified file 'lisp/notifications.el'
--- a/lisp/notifications.el 2010-06-10 12:56:11 +0000
+++ b/lisp/notifications.el 2010-09-13 04:39:36 +0000
@@ -42,6 +42,9 @@
(require 'dbus)
+(defconst notifications-specification-version "1.1"
+ "The version of the Desktop Notifications Specification implemented.")
+
(defconst notifications-application-name "Emacs"
"Default application name.")
@@ -151,7 +154,14 @@
:image-data This is a raw data image format which describes the width,
height, rowstride, has alpha, bits per sample, channels and
image data respectively.
+ :image-path This is represented either as a URI (file:// is the
+ only URI schema supported right now) or a name
+ in a freedesktop.org-compliant icon theme.
:sound-file The path to a sound file to play when the notification pops
up.
+ :sound-name A themeable named sound from the freedesktop.org sound naming
+ specification to play when the notification pops up.
+ Similar to icon-name,only for sounds. An example would
+ be \"message-new-instant\".
:suppress-sound Causes the server to suppress playing any sounds, if it has
that ability.
:x Specifies the X location on the screen that the notification
@@ -186,7 +196,9 @@
(category (plist-get params :category))
(desktop-entry (plist-get params :desktop-entry))
(image-data (plist-get params :image-data))
+ (image-path (plist-get params :image-path))
(sound-file (plist-get params :sound-file))
+ (sound-name (plist-get params :sound-name))
(suppress-sound (plist-get params :suppress-sound))
(x (plist-get params :x))
(y (plist-get params :y))
@@ -211,10 +223,18 @@
(add-to-list 'hints `(:dict-entry
"image_data"
(:variant :struct ,image-data)) t))
+ (when image-path
+ (add-to-list 'hints `(:dict-entry
+ "image_path"
+ (:variant :string ,image-path)) t))
(when sound-file
(add-to-list 'hints `(:dict-entry
"sound-file"
(:variant :string ,sound-file)) t))
+ (when sound-name
+ (add-to-list 'hints `(:dict-entry
+ "sound-name"
+ (:variant :string ,sound-name)) t))
(when suppress-sound
(add-to-list 'hints `(:dict-entry
"suppress-sound"
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r101417: * notifications.el (notifications-notify): Add support for,
Michael Albinus <=