X-Git-Url: http://git.chise.org/gitweb/?p=chise%2Fxemacs-chise.git.1;a=blobdiff_plain;f=lisp%2Fdragdrop.el;h=ec5002f8864f7c102d3093f3184eff40f25af443;hp=92d30695bbb1268c7a136111622289078b81ae01;hb=52b3dd1157cecb0f190b11a0874fcb0a5df5e0e2;hpb=6883ee56ec887c2c48abe5b06b5e66aa74031910 diff --git a/lisp/dragdrop.el b/lisp/dragdrop.el index 92d3069..ec5002f 100644 --- a/lisp/dragdrop.el +++ b/lisp/dragdrop.el @@ -3,7 +3,7 @@ ;; Copyright (C) 1998 Oliver Graf ;; Maintainer: XEmacs Development Team, Oliver Graf -;; Keywords: drag, drop, dumped +;; Keywords: mouse, gui, dumped ;; This file is part of XEmacs. @@ -51,7 +51,7 @@ text is inserted." (defcustom dragdrop-autoload-tm-view nil "*{EXPERIMENTAL} If non-nil, autoload tm-view to decode MIME data. -Otherwise, the buffer is only decoded if tm-view is already avaiable." +Otherwise, the buffer is only decoded if tm-view is already available." :type 'boolean :group 'drag-n-drop) @@ -176,7 +176,7 @@ Returns t if one of drop-funs returns t. Otherwise returns nil." (and (or (eq (cadr flist) t) (= (cadr flist) button)) (or (eq (caddr flist) t) - (dragdrop-compare-mods (caddr flist) modifiers)) + (dragdrop-compare-mods (caddr flist) mods)) (apply (car flist) `(,event ,object ,@(cdddr flist))) ;; (funcall (car flist) event object) (throw 'dragdrop-drop-is-done t)) @@ -244,8 +244,8 @@ Finds files and URLs. Returns nil if object does not contain URL data." ;; to-do: open ftp URLs with efs... (t ;; some other URL, try to fire up some browser for it - (if (boundp 'browse-url-browser-function) - (funcall browse-url-browser-function (car data)) + (if (fboundp 'browse-url) + (browse-url (car data)) (display-message 'error "Can't show URL, no browser selected")))) (undo-boundary) @@ -356,7 +356,7 @@ format." This function uses special data types if the low-level protocol requires it. It does so by calling dragdrop-drag-pure-text." - (dragdrop-drag-pure-text event + (experimental-dragdrop-drag-pure-text event (buffer-substring-no-properties begin end))) (defun experimental-dragdrop-drag-pure-text (event text) @@ -420,5 +420,16 @@ This always assumes DndText as type." event (buffer-substring-no-properties begin end)) (error "OffiX functionality not compiled in."))) +(defun gtk-start-drag (event data &optional type) + (interactive "esi") + (if (featurep 'gtk) + (gtk-start-drag-internal event data type) + (error "GTK functionality not compiled in."))) + +(defun gtk-start-drag-region (event begin end) + (interactive "_er") + (if (featurep 'gtk) + (gtk-start-drag-internal event (buffer-substring-no-properties begin end) "text/plain") + (error "GTK functionality not compiled in."))) ;;; dragdrop.el ends here