[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/dired.el
From: |
Jan Djärv |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/dired.el |
Date: |
Mon, 11 Apr 2005 15:28:08 -0400 |
Index: emacs/lisp/dired.el
diff -c emacs/lisp/dired.el:1.306 emacs/lisp/dired.el:1.307
*** emacs/lisp/dired.el:1.306 Mon Apr 4 23:58:11 2005
--- emacs/lisp/dired.el Mon Apr 11 19:28:07 2005
***************
*** 1523,1537 ****
(setq dired-switches-alist nil)
(dired-sort-other dired-actual-switches t)
(run-mode-hooks 'dired-mode-hook)
! (when (featurep 'x-dnd)
! (make-variable-buffer-local 'x-dnd-test-function)
! (make-variable-buffer-local 'x-dnd-protocol-alist)
! (setq x-dnd-test-function 'dired-dnd-test-function)
! (setq x-dnd-protocol-alist
(append '(("^file:///" . dired-dnd-handle-local-file)
("^file://" . dired-dnd-handle-file)
("^file:" . dired-dnd-handle-local-file))
! x-dnd-protocol-alist))))
;; Idiosyncratic dired commands that don't deal with marks.
--- 1523,1535 ----
(setq dired-switches-alist nil)
(dired-sort-other dired-actual-switches t)
(run-mode-hooks 'dired-mode-hook)
! (when (featurep 'dnd)
! (make-variable-buffer-local 'dnd-protocol-alist)
! (setq dnd-protocol-alist
(append '(("^file:///" . dired-dnd-handle-local-file)
("^file://" . dired-dnd-handle-file)
("^file:" . dired-dnd-handle-local-file))
! dnd-protocol-alist))))
;; Idiosyncratic dired commands that don't deal with marks.
***************
*** 3136,3153 ****
(const :tag "Copy directories without asking" always))
:group 'dired)
- (defun dired-dnd-test-function (window action types)
- "The test function for drag and drop into dired buffers.
- WINDOW is where the mouse is when this function is called. It may be a frame
- if the mouse is over the menu bar, scroll bar or tool bar.
- ACTION is the suggested action from the source, and TYPES are the
- types the drop data can have. This function only accepts drops with
- types in `x-dnd-known-types'. It returns the action suggested by the source."
- (let ((type (x-dnd-choose-type types)))
- (if type
- (cons action type)
- nil)))
-
(defun dired-dnd-popup-notice ()
(x-popup-dialog
t
--- 3134,3139 ----
***************
*** 3176,3182 ****
URI is the file to handle, ACTION is one of copy, move, link or ask.
Ask means pop up a menu for the user to select one of copy, move or link."
(require 'dired-aux)
! (let* ((from (x-dnd-get-local-file-name uri t))
(to (if from (concat (dired-current-directory)
(file-name-nondirectory from))
nil)))
--- 3162,3168 ----
URI is the file to handle, ACTION is one of copy, move, link or ask.
Ask means pop up a menu for the user to select one of copy, move or link."
(require 'dired-aux)
! (let* ((from (dnd-get-local-file-name uri t))
(to (if from (concat (dired-current-directory)
(file-name-nondirectory from))
nil)))
***************
*** 3214,3220 ****
URI is the file to handle. If the hostname in the URI isn't local, do
nothing.
ACTION is one of copy, move, link or ask.
Ask means pop up a menu for the user to select one of copy, move or link."
! (let ((local-file (x-dnd-get-local-file-uri uri)))
(if local-file (dired-dnd-handle-local-file local-file action)
nil)))
--- 3200,3206 ----
URI is the file to handle. If the hostname in the URI isn't local, do
nothing.
ACTION is one of copy, move, link or ask.
Ask means pop up a menu for the user to select one of copy, move or link."
! (let ((local-file (dnd-get-local-file-uri uri)))
(if local-file (dired-dnd-handle-local-file local-file action)
nil)))