* [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
* Re: [PATCH] notifications.el: fixed image-data and image-path hints passing
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
0 siblings, 1 reply; 3+ messages in thread
From: Mike Kazantsev @ 2011-11-07 8:29 UTC (permalink / raw)
To: emacs-devel; +Cc: Julien Danjou
[-- Attachment #1: Type: text/plain, Size: 1345 bytes --]
On Mon, 7 Nov 2011 14:22:30 +0600
Mike Kazantsev <mk.fraggod@gmail.com> wrote:
>
> 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.
>
Actually looking at previous spec versions (which can be found on
http://www.galago-project.org/specs/notification/), there seemed to be
an "icon_data" hint in 0.9, but not "icon_path", so I can guess that's
where these came from.
Mentioned specs seem to be fairly obsolete now, and even if they
should be supported, there doesn't seem to be any excuse to pass
"icon_path".
> 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
>
...
--
Mike Kazantsev // fraggod.net
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] notifications.el: fixed image-data and image-path hints passing
2011-11-07 8:29 ` Mike Kazantsev
@ 2011-11-07 8:35 ` Mike Kazantsev
0 siblings, 0 replies; 3+ messages in thread
From: Mike Kazantsev @ 2011-11-07 8:35 UTC (permalink / raw)
To: emacs-devel; +Cc: Julien Danjou
[-- Attachment #1: Type: text/plain, Size: 2104 bytes --]
On Mon, 7 Nov 2011 14:29:11 +0600
Mike Kazantsev <mk.fraggod@gmail.com> wrote:
> On Mon, 7 Nov 2011 14:22:30 +0600
> Mike Kazantsev <mk.fraggod@gmail.com> wrote:
>
> >
> > 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.
> >
>
> Actually looking at previous spec versions (which can be found on
> http://www.galago-project.org/specs/notification/), there seemed to be
> an "icon_data" hint in 0.9, but not "icon_path", so I can guess that's
> where these came from.
>
> Mentioned specs seem to be fairly obsolete now, and even if they
> should be supported, there doesn't seem to be any excuse to pass
> "icon_path".
>
Hmm... and looking further at 1.1, which is mentioned a bit below in
the code, and even set as "notifications-specification-version", I see
that current implementation is actually correct.
Terribly sorry for the confusion and the noise, should've checked the
specs more closely.
Desktop Notifications Specification 1.1:
http://people.gnome.org/~mccann/docs/notification-spec/notification-spec-1.1.html
P.S. Link to galago-project.org at the top of the module seem to be
bogus though - specs there only cover versions up to 0.9, but I guess
it's not worth a separate fix.
>
> > 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
> >
> ...
>
>
--
Mike Kazantsev // fraggod.net
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply [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 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.