From: Julien Danjou <julien@danjou.info>
To: emacs-devel@gnu.org
Cc: Julien Danjou <julien@danjou.info>
Subject: [PATCH 1/2] Add support for image-path and sound-name
Date: Sat, 11 Sep 2010 10:59:54 +0200 [thread overview]
Message-ID: <1284195595-4326-1-git-send-email-julien@danjou.info> (raw)
Signed-off-by: Julien Danjou <julien@danjou.info>
---
lisp/ChangeLog | 5 +++++
lisp/notifications.el | 17 +++++++++++++++++
2 files changed, 22 insertions(+), 0 deletions(-)
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 3983564..6b75cde 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
+2010-09-11 Julien Danjou <julien@danjou.info>
+
+ * notifications.el (notifications-notify): Add support for
+ image-path and sound-name.
+
2010-09-11 Michael R. Mauger <mmaug@yahoo.com>
* progmodes/sql.el: Version 2.6
diff --git a/lisp/notifications.el b/lisp/notifications.el
index beb63a6..eaf4e42 100644
--- a/lisp/notifications.el
+++ b/lisp/notifications.el
@@ -151,7 +151,14 @@ Various PARAMS can be set:
: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 +193,9 @@ used to manipulate the notification item with
(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 +220,18 @@ used to manipulate the notification item with
(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"
--
1.7.1
next reply other threads:[~2010-09-11 8:59 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-11 8:59 Julien Danjou [this message]
2010-09-11 8:59 ` [PATCH 2/2] Add notifications-specification-version Julien Danjou
2010-09-11 10:21 ` Andreas Schwab
2010-09-11 10:44 ` [PATCH] " Julien Danjou
2010-09-11 10:55 ` Stefan Monnier
2010-09-11 11:07 ` Julien Danjou
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1284195595-4326-1-git-send-email-julien@danjou.info \
--to=julien@danjou.info \
--cc=emacs-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.