unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* [PATCH 1/2] Add support for image-path and sound-name
@ 2010-09-11  8:59 Julien Danjou
  2010-09-11  8:59 ` [PATCH 2/2] Add notifications-specification-version Julien Danjou
  0 siblings, 1 reply; 6+ messages in thread
From: Julien Danjou @ 2010-09-11  8:59 UTC (permalink / raw)
  To: emacs-devel; +Cc: Julien Danjou

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




^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH 2/2] Add notifications-specification-version
  2010-09-11  8:59 [PATCH 1/2] Add support for image-path and sound-name Julien Danjou
@ 2010-09-11  8:59 ` Julien Danjou
  2010-09-11 10:21   ` Andreas Schwab
  0 siblings, 1 reply; 6+ messages in thread
From: Julien Danjou @ 2010-09-11  8:59 UTC (permalink / raw)
  To: emacs-devel; +Cc: Julien Danjou

Signed-off-by: Julien Danjou <julien@danjou.info>
---
 lisp/ChangeLog        |    1 +
 lisp/notifications.el |    4 ++++
 2 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 6b75cde..db26358 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -2,6 +2,7 @@
 
 	* notifications.el (notifications-notify): Add support for
 	image-path and sound-name.
+	(notifications-specification-version): Add this variable.
 
 2010-09-11  Michael R. Mauger  <mmaug@yahoo.com>
 
diff --git a/lisp/notifications.el b/lisp/notifications.el
index eaf4e42..3325d39 100644
--- a/lisp/notifications.el
+++ b/lisp/notifications.el
@@ -42,6 +42,10 @@
 
 (require 'dbus)
 
+(defconst notifications-specification-version "1.1"
+  "The version of the Desktop Notifications Specification
+ implemented in Emacs.")
+
 (defconst notifications-application-name "Emacs"
   "Default application name.")
 
-- 
1.7.1




^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH 2/2] Add notifications-specification-version
  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
  0 siblings, 1 reply; 6+ messages in thread
From: Andreas Schwab @ 2010-09-11 10:21 UTC (permalink / raw)
  To: Julien Danjou; +Cc: emacs-devel

Julien Danjou <julien@danjou.info> writes:

> +(defconst notifications-specification-version "1.1"
> +  "The version of the Desktop Notifications Specification
> + implemented in Emacs.")

The first line of the doc string should be a complete sentence.

Andreas.

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."



^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH] Add notifications-specification-version
  2010-09-11 10:21   ` Andreas Schwab
@ 2010-09-11 10:44     ` Julien Danjou
  2010-09-11 10:55       ` Stefan Monnier
  0 siblings, 1 reply; 6+ messages in thread
From: Julien Danjou @ 2010-09-11 10:44 UTC (permalink / raw)
  To: emacs-devel; +Cc: Julien Danjou

Signed-off-by: Julien Danjou <julien@danjou.info>
---
 lisp/ChangeLog        |    1 +
 lisp/notifications.el |    3 +++
 2 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 6b75cde..db26358 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -2,6 +2,7 @@
 
 	* notifications.el (notifications-notify): Add support for
 	image-path and sound-name.
+	(notifications-specification-version): Add this variable.
 
 2010-09-11  Michael R. Mauger  <mmaug@yahoo.com>
 
diff --git a/lisp/notifications.el b/lisp/notifications.el
index eaf4e42..9f789e7 100644
--- a/lisp/notifications.el
+++ b/lisp/notifications.el
@@ -42,6 +42,9 @@
 
 (require 'dbus)
 
+(defconst notifications-specification-version "1.1"
+  "The version of the Desktop Notifications Specification implemented in Emacs.")
+
 (defconst notifications-application-name "Emacs"
   "Default application name.")
 
-- 
1.7.1




^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] Add notifications-specification-version
  2010-09-11 10:44     ` [PATCH] " Julien Danjou
@ 2010-09-11 10:55       ` Stefan Monnier
  2010-09-11 11:07         ` Julien Danjou
  0 siblings, 1 reply; 6+ messages in thread
From: Stefan Monnier @ 2010-09-11 10:55 UTC (permalink / raw)
  To: Julien Danjou; +Cc: emacs-devel

> +  "The version of the Desktop Notifications Specification implemented in Emacs.")

The first line should not only be complete, but also less than 72
columns (or 80 in the very worst case).  Here it's easy to do if we
think about the fact that we're in Emacs so "in Emacs" is redundant.


        Stefan
        



^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH] Add notifications-specification-version
  2010-09-11 10:55       ` Stefan Monnier
@ 2010-09-11 11:07         ` Julien Danjou
  0 siblings, 0 replies; 6+ messages in thread
From: Julien Danjou @ 2010-09-11 11:07 UTC (permalink / raw)
  To: emacs-devel; +Cc: Julien Danjou

Signed-off-by: Julien Danjou <julien@danjou.info>
---
 lisp/ChangeLog        |    1 +
 lisp/notifications.el |    3 +++
 2 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 6b75cde..db26358 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -2,6 +2,7 @@
 
 	* notifications.el (notifications-notify): Add support for
 	image-path and sound-name.
+	(notifications-specification-version): Add this variable.
 
 2010-09-11  Michael R. Mauger  <mmaug@yahoo.com>
 
diff --git a/lisp/notifications.el b/lisp/notifications.el
index eaf4e42..68db58e 100644
--- a/lisp/notifications.el
+++ b/lisp/notifications.el
@@ -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.")
 
-- 
1.7.1




^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2010-09-11 11:07 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-09-11  8:59 [PATCH 1/2] Add support for image-path and sound-name Julien Danjou
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

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).