]> git.eshelyaron.com Git - emacs.git/commitdiff
* net/tramp-gvfs.el (tramp-gvfs-methods)
authorMichael Albinus <michael.albinus@gmx.de>
Fri, 3 Jul 2009 14:54:14 +0000 (14:54 +0000)
committerMichael Albinus <michael.albinus@gmx.de>
Fri, 3 Jul 2009 14:54:14 +0000 (14:54 +0000)
(tramp-gvfs-zeroconf-domain)
(tramp-bluez-discover-devices-timeout): Add version flag.
(tramp-gvfs-handler-mounted-unmounted)
(tramp-gvfs-connection-mounted-p): Polish handling of
incompatibilities between GVFS 0.2 and 1.0.

lisp/ChangeLog
lisp/net/tramp-gvfs.el

index 72a512967b162d30e9a96215506062046943d4ca..0f05c2e3e9854f0bc463b29398aa41c67a1a7670 100644 (file)
@@ -1,3 +1,12 @@
+2009-07-03  Michael Albinus  <michael.albinus@gmx.de>
+
+       * net/tramp-gvfs.el (tramp-gvfs-methods)
+       (tramp-gvfs-zeroconf-domain)
+       (tramp-bluez-discover-devices-timeout): Add version flag.
+       (tramp-gvfs-handler-mounted-unmounted)
+       (tramp-gvfs-connection-mounted-p): Polish handling of
+       incompatibilities between GVFS 0.2 and 1.0.
+
 2009-07-03  Jan Djärv  <jan.h.d@swipnet.se>
 
        * cus-start.el (all): Added make-pointer-invisible.
index 9241541a8e25bd1cb1d9fd895f68b9da069f663c..e4499a52f832f4ee59765c9de0d4b0029e44f1d1 100644 (file)
 ;;; Commentary:
 
 ;; Access functions for the GVFS daemon from Tramp.  Tested with GVFS
-;; 1.0.2 (Ubuntu 8.10, Gnome 2.24).
+;; 1.0.2 (Ubuntu 8.10, Gnome 2.24).  It has been reported also to run
+;; with GVFS 0.2.5 (Ubuntu 8.04, Gnome 2.22), but there is an
+;; incompatibility with the mount_info structure, which has been
+;; worked around.
 
 ;; All actions to mount a remote location, and to retrieve mount
 ;; information, are performed by D-Bus messages.  File operations
 ;; themselves are performed via the mounted filesystem in ~/.gvfs.
-;; Consequently, GNU Emacs 23.0.90 with enabled D-Bus bindings is a
+;; Consequently, GNU Emacs 23.1 with enabled D-Bus bindings is a
 ;; precondition.
 
 ;; The GVFS D-Bus interface is said to be instable.  There are even no
 (defcustom tramp-gvfs-methods '("dav" "davs" "obex" "synce")
   "*List of methods for remote files, accessed with GVFS."
   :group 'tramp
+  :version "23.2"
   :type '(repeat (choice (const "dav")
                         (const "davs")
                         (const "ftp")
 (defcustom tramp-gvfs-zeroconf-domain "local"
   "*Zeroconf domain to be used for discovering services, like host names."
   :group 'tramp
+  :version "23.2"
   :type 'string)
 
 ;; Add the methods to `tramp-methods', in order to allow minibuffer
 ;;   OBJECT_PATH         object_path
 ;;   STRING              display_name
 ;;   STRING              stable_name
-;;   STRING              x_content_types
+;;   STRING              x_content_types       Since GVFS 1.0 only !!!
 ;;   STRING              icon
 ;;   STRING              prefered_filename_encoding
 ;;   BOOLEAN             user_visible
@@ -333,6 +338,7 @@ A value of 0 would require an immediate discovery during hostname
 completion, nil means to use always cached values for discovered
 devices."
   :group 'tramp
+  :version "23.2"
   :type '(choice (const nil) integer))
 
 (defvar tramp-bluez-discovery nil
@@ -869,10 +875,7 @@ ADDRESS can have the form \"xx:xx:xx:xx:xx:xx\" or \"[xx:xx:xx:xx:xx:xx]\"."
 \"org.gtk.vfs.MountTracker.unmounted\" signals."
   (ignore-errors
     (let* ((signal-name (dbus-event-member-name last-input-event))
-          ;; The interface of mount-info has been changed.  We must
-          ;; handle both cases.
-          (last-nth (if (nth 9 mount-info) 9 8))
-          (mount-spec (nth 1 (nth last-nth mount-info)))
+          (mount-spec (cadar (last mount-info)))
           (method (dbus-byte-array-to-string (cadr (assoc "type" mount-spec))))
           (user (dbus-byte-array-to-string (cadr (assoc "user" mount-spec))))
           (domain (dbus-byte-array-to-string
@@ -901,7 +904,7 @@ ADDRESS can have the form \"xx:xx:xx:xx:xx:xx\" or \"[xx:xx:xx:xx:xx:xx]\"."
          (tramp-set-file-property
           v "/" "fuse-mountpoint"
           (file-name-nondirectory
-           (dbus-byte-array-to-string (nth (1- last-nth) mount-info)))))))))
+           (dbus-byte-array-to-string (car (last mount-info 2))))))))))
 
 (dbus-register-signal
  :session nil tramp-gvfs-path-mounttracker
@@ -923,10 +926,7 @@ ADDRESS can have the form \"xx:xx:xx:xx:xx:xx\" or \"[xx:xx:xx:xx:xx:xx]\"."
             :session tramp-gvfs-service-daemon tramp-gvfs-path-mounttracker
             tramp-gvfs-interface-mounttracker "listMounts"))
         nil)
-      ;; The interface of mount-info has been changed.  We must handle
-      ;; both cases.
-      (let* ((last-nth (if (nth 9 elt) 9 8))
-            (mount-spec (nth 1 (nth last-nth elt)))
+      (let* ((mount-spec (cadar (last elt)))
             (method (dbus-byte-array-to-string
                      (cadr (assoc "type" mount-spec))))
             (user (dbus-byte-array-to-string
@@ -957,7 +957,7 @@ ADDRESS can have the form \"xx:xx:xx:xx:xx:xx\" or \"[xx:xx:xx:xx:xx:xx]\"."
          (tramp-set-file-property
           vec "/" "fuse-mountpoint"
           (file-name-nondirectory
-           (dbus-byte-array-to-string (nth (1- last-nth) elt))))
+           (dbus-byte-array-to-string (car (last elt 2)))))
          (throw 'mounted t))))))
 
 (defun tramp-gvfs-mount-spec (vec)