aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lisp/ChangeLog6
-rw-r--r--lisp/net/secrets.el11
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 @@
12013-10-04 Michael Albinus <michael.albinus@gmx.de>
2
3 * net/secrets.el (secrets-create-collection): Add optional
4 argument ALIAS. Use proper Label keyword. Append ALIAS as
5 dbus-call-method argument. (Bug#15516)
6
12013-10-04 Leo Liu <sdl.web@gmail.com> 72013-10-04 Leo Liu <sdl.web@gmail.com>
2 8
3 * progmodes/octave.el (inferior-octave-error-regexp-alist) 9 * 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."
189;; </method> 189;; </method>
190;; <method name="CreateCollection"> 190;; <method name="CreateCollection">
191;; <arg name="props" type="a{sv}" direction="in"/> 191;; <arg name="props" type="a{sv}" direction="in"/>
192;; <arg name="alias" type="s" direction="in"/> ;; Added 2011/3/1
192;; <arg name="collection" type="o" direction="out"/> 193;; <arg name="collection" type="o" direction="out"/>
193;; <arg name="prompt" type="o" direction="out"/> 194;; <arg name="prompt" type="o" direction="out"/>
194;; </method> 195;; </method>
@@ -491,9 +492,10 @@ If there is no such COLLECTION, return nil."
491 (secrets-get-collection-property collection-path "Label")) 492 (secrets-get-collection-property collection-path "Label"))
492 (throw 'collection-found collection-path)))))) 493 (throw 'collection-found collection-path))))))
493 494
494(defun secrets-create-collection (collection) 495(defun secrets-create-collection (collection &optional alias)
495 "Create collection labeled COLLECTION if it doesn't exist. 496 "Create collection labeled COLLECTION if it doesn't exist.
496Return the D-Bus object path for collection." 497Set ALIAS as alias of the collection. Return the D-Bus object
498path for collection."
497 (let ((collection-path (secrets-collection-path collection))) 499 (let ((collection-path (secrets-collection-path collection)))
498 ;; Create the collection. 500 ;; Create the collection.
499 (when (secrets-empty-path collection-path) 501 (when (secrets-empty-path collection-path)
@@ -504,7 +506,10 @@ Return the D-Bus object path for collection."
504 (dbus-call-method 506 (dbus-call-method
505 :session secrets-service secrets-path 507 :session secrets-service secrets-path
506 secrets-interface-service "CreateCollection" 508 secrets-interface-service "CreateCollection"
507 `(:array (:dict-entry "Label" (:variant ,collection)))))))) 509 `(:array
510 (:dict-entry ,(concat secrets-interface-collection ".Label")
511 (:variant ,collection)))
512 (or alias ""))))))
508 ;; Return object path of the collection. 513 ;; Return object path of the collection.
509 collection-path)) 514 collection-path))
510 515