From 9e6229fabeb9aa77e437ab3ce69da78f432ff3de Mon Sep 17 00:00:00 2001 From: Michael Albinus Date: Fri, 4 Oct 2013 12:31:59 +0200 Subject: [PATCH] * net/secrets.el (secrets-create-collection): Add optional argument ALIAS. Use proper Label keyword. Append ALIAS as dbus-call-method argument. (Bug#15516) --- lisp/ChangeLog | 6 ++++++ lisp/net/secrets.el | 11 ++++++++--- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index a8f2776d49a..bb4b89adea2 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2013-10-04 Michael Albinus + + * net/secrets.el (secrets-create-collection): Add optional + argument ALIAS. Use proper Label keyword. Append ALIAS as + dbus-call-method argument. (Bug#15516) + 2013-10-04 Leo Liu * progmodes/octave.el (inferior-octave-error-regexp-alist) diff --git a/lisp/net/secrets.el b/lisp/net/secrets.el index b4e51348dde..e65e3377641 100644 --- a/lisp/net/secrets.el +++ b/lisp/net/secrets.el @@ -189,6 +189,7 @@ It returns t if not." ;; ;; ;; +;; ;; Added 2011/3/1 ;; ;; ;; @@ -491,9 +492,10 @@ If there is no such COLLECTION, return nil." (secrets-get-collection-property collection-path "Label")) (throw 'collection-found collection-path)))))) -(defun secrets-create-collection (collection) +(defun secrets-create-collection (collection &optional alias) "Create collection labeled COLLECTION if it doesn't exist. -Return the D-Bus object path for collection." +Set ALIAS as alias of the collection. Return the D-Bus object +path for collection." (let ((collection-path (secrets-collection-path collection))) ;; Create the collection. (when (secrets-empty-path collection-path) @@ -504,7 +506,10 @@ Return the D-Bus object path for collection." (dbus-call-method :session secrets-service secrets-path secrets-interface-service "CreateCollection" - `(:array (:dict-entry "Label" (:variant ,collection)))))))) + `(:array + (:dict-entry ,(concat secrets-interface-collection ".Label") + (:variant ,collection))) + (or alias "")))))) ;; Return object path of the collection. collection-path)) -- 2.39.2