unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* [PATCH] notifications.el: fixed image-data and image-path hints passing
@ 2011-11-07  8:22 Mike Kazantsev
  2011-11-07  8:29 ` Mike Kazantsev
  0 siblings, 1 reply; 3+ messages in thread
From: Mike Kazantsev @ 2011-11-07  8:22 UTC (permalink / raw)
  To: emacs-devel; +Cc: Julien Danjou

[-- Attachment #1: Type: text/plain, Size: 1953 bytes --]


Good day,

Before the patch, hints were passed as "image_path" and "image_data",
which is incorrect, as Desktop Notifications Specification v1.2 clearly
states:

  The icon is defined by the "app_icon" parameter. The image can be
  defined by the "image-path", the "image-data" hint or the deprecated
  "icon_data" hint.

Most common (by far) implementation of spec - libnotify - seem to pass
them as described in spec as well, so current behavior looks like a bug.

Patch to pass "image-path" and "image-data" hints - as per spec - is
attached below.

Desktop Notifications Specification:

  http://developer.gnome.org/notification-spec/#icons-and-images
  http://people.gnome.org/~mccann/docs/notification-spec/notification-spec-latest.html#icons-and-images



From 4acc11ec45623a695a5db508b54bd107beb9c8bd Mon Sep 17 00:00:00 2001
From: Mike Kazantsev <mk.fraggod@gmail.com>
Date: Mon, 7 Nov 2011 14:08:08 +0600
Subject: [PATCH] notifications.el: fixed "image-data" and "image-path"
 notification hints passing

---
 notifications.el |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/notifications.el b/notifications.el
index a4e7fdd..71b2a63 100644
--- a/notifications.el
+++ b/notifications.el
@@ -226,11 +226,11 @@ used to manipulate the notification item with
                             (:variant :string ,desktop-entry)) t))
     (when image-data
       (add-to-list 'hints `(:dict-entry
-                            "image_data"
+                            "image-data"
                             (:variant :struct ,image-data)) t))
     (when image-path
       (add-to-list 'hints `(:dict-entry
-                            "image_path"
+                            "image-path"
                             (:variant :string ,image-path)) t))
     (when sound-file
       (add-to-list 'hints `(:dict-entry
-- 
1.7.7


-- 
Mike Kazantsev // fraggod.net

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

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

end of thread, other threads:[~2011-11-07  8:35 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-07  8:22 [PATCH] notifications.el: fixed image-data and image-path hints passing Mike Kazantsev
2011-11-07  8:29 ` Mike Kazantsev
2011-11-07  8:35   ` Mike Kazantsev

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).