emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] trunk r114519: * net/secrets.el (secrets-create-collection


From: Michael Albinus
Subject: [Emacs-diffs] trunk r114519: * net/secrets.el (secrets-create-collection): Add optional
Date: Fri, 04 Oct 2013 10:32:07 +0000
User-agent: Bazaar (2.6b2)

------------------------------------------------------------
revno: 114519
revision-id: address@hidden
parent: address@hidden
committer: Michael Albinus <address@hidden>
branch nick: trunk
timestamp: Fri 2013-10-04 12:31:59 +0200
message:
  * net/secrets.el (secrets-create-collection): Add optional
  argument ALIAS.  Use proper Label keyword.  Append ALIAS as
  dbus-call-method argument.  (Bug#15516)
modified:
  lisp/ChangeLog                 changelog-20091113204419-o5vbwnq5f7feedwu-1432
  lisp/net/secrets.el            secrets.el-20100313201810-6s62gy70hbdnhfs1-1
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2013-10-04 09:45:25 +0000
+++ b/lisp/ChangeLog    2013-10-04 10:31:59 +0000
@@ -1,3 +1,9 @@
+2013-10-04  Michael Albinus  <address@hidden>
+
+       * 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  <address@hidden>
 
        * progmodes/octave.el (inferior-octave-error-regexp-alist)

=== modified file 'lisp/net/secrets.el'
--- a/lisp/net/secrets.el       2013-06-19 06:24:12 +0000
+++ b/lisp/net/secrets.el       2013-10-04 10:31:59 +0000
@@ -189,6 +189,7 @@
 ;;   </method>
 ;;   <method name="CreateCollection">
 ;;     <arg name="props"      type="a{sv}" direction="in"/>
+;;     <arg name="alias"      type="s"     direction="in"/>   ;; Added 2011/3/1
 ;;     <arg name="collection" type="o"     direction="out"/>
 ;;     <arg name="prompt"     type="o"     direction="out"/>
 ;;   </method>
@@ -491,9 +492,10 @@
              (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 @@
              (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))
 


reply via email to

[Prev in Thread] Current Thread [Next in Thread]