From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Mike Kazantsev Newsgroups: gmane.emacs.devel Subject: [PATCH] notifications.el: fixed image-data and image-path hints passing Date: Mon, 7 Nov 2011 14:22:30 +0600 Message-ID: <20111107142230.37ce20ec@malediction> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/signed; micalg=PGP-SHA1; boundary="Sig_/8pK4vA/1n/nTC51qHJQRYv3"; protocol="application/pgp-signature" X-Trace: dough.gmane.org 1320654178 3950 80.91.229.12 (7 Nov 2011 08:22:58 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 7 Nov 2011 08:22:58 +0000 (UTC) Cc: Julien Danjou To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Nov 07 09:22:54 2011 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1RNKTj-0006Pr-UE for ged-emacs-devel@m.gmane.org; Mon, 07 Nov 2011 09:22:53 +0100 Original-Received: from localhost ([::1]:44866 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RNKTj-0001Mv-EX for ged-emacs-devel@m.gmane.org; Mon, 07 Nov 2011 03:22:51 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:40701) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RNKTg-0001Mm-L3 for emacs-devel@gnu.org; Mon, 07 Nov 2011 03:22:49 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RNKTa-0008L0-Ce for emacs-devel@gnu.org; Mon, 07 Nov 2011 03:22:48 -0500 Original-Received: from mail-ey0-f169.google.com ([209.85.215.169]:51190) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RNKTa-0008Kn-3t for emacs-devel@gnu.org; Mon, 07 Nov 2011 03:22:42 -0500 Original-Received: by eye4 with SMTP id 4so3625312eye.0 for ; Mon, 07 Nov 2011 00:22:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=date:from:to:cc:subject:message-id:x-mailer:mime-version :content-type; bh=kYMkgGqEnX3v6sSWmvcIMvION4IhFxUt7L4QNxm65bQ=; b=K1fvRRlqQHm92uAlItY5pEVagAoGftfALXk9sJ8ZS1cCXwJLq1heue7J4qoKOg5Yyg W4nNQ8mBWLsCtX+JA1uP56AUJqoS+oUyaebOqA1kMFhGYj8ZgMSVx1T7Lkjj6RyFiMC+ 1gK3ifSmdgKX6teq99uu09HTC8xuLWhgLR8r8= Original-Received: by 10.14.9.206 with SMTP id 54mr2037995eet.248.1320654158582; Mon, 07 Nov 2011 00:22:38 -0800 (PST) Original-Received: from malediction (wall.mplik.ru. [195.58.1.141]) by mx.google.com with ESMTPS id v3sm48173488eej.7.2011.11.07.00.22.35 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 07 Nov 2011 00:22:37 -0800 (PST) X-Mailer: Claws Mail 3.7.9 (GTK+ 2.24.7; i686-pc-linux-gnu) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 209.85.215.169 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:145919 Archived-At: --Sig_/8pK4vA/1n/nTC51qHJQRYv3 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable 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 =46rom 4acc11ec45623a695a5db508b54bd107beb9c8bd Mon Sep 17 00:00:00 2001 From: Mike Kazantsev 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 --=20 1.7.7 --=20 Mike Kazantsev // fraggod.net --Sig_/8pK4vA/1n/nTC51qHJQRYv3 Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.18 (GNU/Linux) iEYEARECAAYFAk63lUkACgkQASbOZpzyXnEr+gCeP8TUCAn8Qf+FI2n32NNg4R58 vXoAoJqsIML5zDgSBZYDIaP2Zhq6moAC =3fxf -----END PGP SIGNATURE----- --Sig_/8pK4vA/1n/nTC51qHJQRYv3--