From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Julien Danjou Newsgroups: gmane.emacs.devel Subject: [PATCH 1/2] Add support for image-path and sound-name Date: Sat, 11 Sep 2010 10:59:54 +0200 Message-ID: <1284195595-4326-1-git-send-email-julien@danjou.info> NNTP-Posting-Host: lo.gmane.org X-Trace: dough.gmane.org 1284195628 24121 80.91.229.12 (11 Sep 2010 09:00:28 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sat, 11 Sep 2010 09:00:28 +0000 (UTC) Cc: Julien Danjou To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Sep 11 11:00:25 2010 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1OuLwd-00006l-FX for ged-emacs-devel@m.gmane.org; Sat, 11 Sep 2010 11:00:23 +0200 Original-Received: from localhost ([127.0.0.1]:55581 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OuLwc-00018v-Oa for ged-emacs-devel@m.gmane.org; Sat, 11 Sep 2010 05:00:22 -0400 Original-Received: from [140.186.70.92] (port=37702 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OuLwQ-00014f-PD for emacs-devel@gnu.org; Sat, 11 Sep 2010 05:00:11 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OuLwO-0000po-Ro for emacs-devel@gnu.org; Sat, 11 Sep 2010 05:00:10 -0400 Original-Received: from prometheus.naquadah.org ([212.85.154.174]:47800 helo=mx1.naquadah.org) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OuLwO-0000pL-JB for emacs-devel@gnu.org; Sat, 11 Sep 2010 05:00:08 -0400 Original-Received: by mx1.naquadah.org (Postfix, from userid 8) id CBB2E5C174; Sat, 11 Sep 2010 11:00:05 +0200 (CEST) Original-Received: from keller.adm.naquadah.org (unknown [IPv6:2a01:e35:2e39:e900:222:faff:fe9d:ce44]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.naquadah.org (Postfix) with ESMTPSA id B92375C0F7; Sat, 11 Sep 2010 11:00:03 +0200 (CEST) Original-Received: from jd by keller.adm.naquadah.org with local (Exim 4.72) (envelope-from ) id 1OuLwJ-00018G-2l; Sat, 11 Sep 2010 11:00:03 +0200 X-Mailer: git-send-email 1.7.1 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:129958 Archived-At: Signed-off-by: Julien Danjou --- 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 + + * notifications.el (notifications-notify): Add support for + image-path and sound-name. + 2010-09-11 Michael R. Mauger * 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