diff options
| author | Michael Albinus | 2010-02-28 11:27:39 +0100 |
|---|---|---|
| committer | Michael Albinus | 2010-02-28 11:27:39 +0100 |
| commit | d4b067837ead8978610ca2684fb7bc4e32b35bc1 (patch) | |
| tree | f2afdde7a2adf26adb1344379f6547f063747f06 | |
| parent | 5794c2a5f76198b061be706bc8c0ad713dce62c9 (diff) | |
| download | emacs-d4b067837ead8978610ca2684fb7bc4e32b35bc1.tar.gz emacs-d4b067837ead8978610ca2684fb7bc4e32b35bc1.zip | |
* net/dbus.el (dbus-introspect, dbus-get-property)
(dbus-set-property, dbus-get-all-properties): Use
`dbus-call-method' when noninteractive. (Bug#5645)
| -rw-r--r-- | lisp/ChangeLog | 6 | ||||
| -rw-r--r-- | lisp/net/dbus.el | 14 |
2 files changed, 16 insertions, 4 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 1c91ebe4831..cd06672cfb9 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,9 @@ | |||
| 1 | 2010-02-28 Michael Albinus <michael.albinus@gmx.de> | ||
| 2 | |||
| 3 | * net/dbus.el (dbus-introspect, dbus-get-property) | ||
| 4 | (dbus-set-property, dbus-get-all-properties): Use | ||
| 5 | `dbus-call-method' when noninteractive. (Bug#5645) | ||
| 6 | |||
| 1 | 2010-02-28 Chong Yidong <cyd@stupidchicken.com> | 7 | 2010-02-28 Chong Yidong <cyd@stupidchicken.com> |
| 2 | 8 | ||
| 3 | * textmodes/reftex-toc.el (reftex-toc-promote-prepare): | 9 | * textmodes/reftex-toc.el (reftex-toc-promote-prepare): |
diff --git a/lisp/net/dbus.el b/lisp/net/dbus.el index 146cff0544e..5635640cd4c 100644 --- a/lisp/net/dbus.el +++ b/lisp/net/dbus.el | |||
| @@ -573,7 +573,8 @@ the introspection data, is a string in XML format." | |||
| 573 | ;; is used, because the handler can be registered in our Emacs | 573 | ;; is used, because the handler can be registered in our Emacs |
| 574 | ;; instance; caller an callee would block each other. | 574 | ;; instance; caller an callee would block each other. |
| 575 | (dbus-ignore-errors | 575 | (dbus-ignore-errors |
| 576 | (dbus-call-method-non-blocking | 576 | (funcall |
| 577 | (if noninteractive 'dbus-call-method 'dbus-call-method-non-blocking) | ||
| 577 | bus service path dbus-interface-introspectable "Introspect"))) | 578 | bus service path dbus-interface-introspectable "Introspect"))) |
| 578 | 579 | ||
| 579 | (defun dbus-introspect-xml (bus service path) | 580 | (defun dbus-introspect-xml (bus service path) |
| @@ -831,7 +832,8 @@ valid D-Bus value, or `nil' if there is no PROPERTY." | |||
| 831 | (dbus-ignore-errors | 832 | (dbus-ignore-errors |
| 832 | ;; "Get" returns a variant, so we must use the `car'. | 833 | ;; "Get" returns a variant, so we must use the `car'. |
| 833 | (car | 834 | (car |
| 834 | (dbus-call-method-non-blocking | 835 | (funcall |
| 836 | (if noninteractive 'dbus-call-method 'dbus-call-method-non-blocking) | ||
| 835 | bus service path dbus-interface-properties | 837 | bus service path dbus-interface-properties |
| 836 | "Get" :timeout 500 interface property)))) | 838 | "Get" :timeout 500 interface property)))) |
| 837 | 839 | ||
| @@ -842,7 +844,8 @@ been set successful, the result is VALUE. Otherwise, `nil' is | |||
| 842 | returned." | 844 | returned." |
| 843 | (dbus-ignore-errors | 845 | (dbus-ignore-errors |
| 844 | ;; "Set" requires a variant. | 846 | ;; "Set" requires a variant. |
| 845 | (dbus-call-method-non-blocking | 847 | (funcall |
| 848 | (if noninteractive 'dbus-call-method 'dbus-call-method-non-blocking) | ||
| 846 | bus service path dbus-interface-properties | 849 | bus service path dbus-interface-properties |
| 847 | "Set" :timeout 500 interface property (list :variant value)) | 850 | "Set" :timeout 500 interface property (list :variant value)) |
| 848 | ;; Return VALUE. | 851 | ;; Return VALUE. |
| @@ -857,7 +860,10 @@ name of the property, and its value. If there are no properties, | |||
| 857 | ;; "GetAll" returns "a{sv}". | 860 | ;; "GetAll" returns "a{sv}". |
| 858 | (let (result) | 861 | (let (result) |
| 859 | (dolist (dict | 862 | (dolist (dict |
| 860 | (dbus-call-method-non-blocking | 863 | (funcall |
| 864 | (if noninteractive | ||
| 865 | 'dbus-call-method | ||
| 866 | 'dbus-call-method-non-blocking) | ||
| 861 | bus service path dbus-interface-properties | 867 | bus service path dbus-interface-properties |
| 862 | "GetAll" :timeout 500 interface) | 868 | "GetAll" :timeout 500 interface) |
| 863 | result) | 869 | result) |