🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

2 total messages Started by "Bryan M. Kramer" Mon, 04 May 1992 18:32
epoch cut and paste
#1428
Author: "Bryan M. Kramer"
Date: Mon, 04 May 1992 18:32
21 lines
1296 bytes
I'm running 
"Epoch 4.0 Patchlevel 0" on a SPARC, SunOS 4.1.2
X11R5, the problem is the same with both olvwm 3.0 and olwm 3.0.

I'd like to cut+paste between cmdtool's and epoch windows.

I've tried
(setq mouse::selection-atom (intern-atom "CLIPBOARD"))

as suggested by love@cs.uiuc.edu in a posting on 30 Mar. 92.
Is there anything else I'm supposed to do to hook it up?

Thanks

|Bryan M. Kramer	      416-978-7330, fax 416-978-1455|
|Department of Computer Science, University of Toronto      |
|6 King's College Road, Room 283E			    |
|Toronto, Ontario, Canada      M5S 1A4                      |

p.s. Is there a package that would pickup files dragged into epoch
from the file manager?
Re: epoch cut and paste
#1452
Author: Ken Laprade
Date: Tue, 12 May 1992 11:42
70 lines
3566 bytes
In <92May4.143134edt.133465@wotan.ai.toronto.edu> kramer@cs.toronto.edu ("Bryan M. Kramer") writes:
>...
>p.s. Is there a package that would pickup files dragged into epoch
>from the file manager?

Here is what I put together.  It handles drag-n-drop's from filemgr into
epoch for both OpenWindows 3.0 and 2.0.  It worked quite nicely under 2.0.
Unfortunately, the dnd interface got much more complicated in 3.0 and I
didn't want to bother figuring it out.  There is a 2.0 combatibility hook
built into Xview 3.0 dnd, but it does not kick in until after a five second
timeout (I cannot see why it should need a timeout).  So, if you use this
under 3.0, wait five seconds after dropping before you expect the file to
show up.

--------------------drag-drop.el--------------------
;;; Epoch drag-drop interface to OpenWindows 2.0.
;;; - Ken Laprade <laprade@trantor.harris-atd.com> -  3 Jan 92

;; Trick OpenWindows 3.0 into accepting us as a drop site.
(set-property (epoch::intern-atom "_XVIEW_V2_APP") 0)

(defvar drag-from-xview3 nil
  "Flag indicating drag-drop came from an xview 3.0 application.")

(defun drag-trigger-handler (type value screen)
  (setq drag-from-xview3 t))

(defun drag-drop-string (value)
  (if drag-from-xview3
      (get-property "DRAG_DROP" (set-resource-type (nth 5 value) (intern-atom "WINDOW")))
    (epoch::convert-selection "PRIMARY" "STRING" "PROPERTY")))

(defun drag-load-handler (type value screen)
  (select-screen screen)
  (let ((file (drag-drop-string value)))
    (and (stringp file)
	 (not (equal file ""))
	 (let* ((pointer (query-pointer))
		(coords (coords-to-point (car pointer) (nth 1 pointer) screen))
		(window (nth 2 coords)))
	   (and window
		(not (equal window (minibuffer-window)))
		(select-window window))
	   (find-file file)))))

(defun drag-copy-handler (type value screen)
  (select-screen screen)
  (let* ((pointer (query-pointer))
	 (coords (coords-to-point (car pointer) (nth 1 pointer) screen))
	 (window (nth 2 coords))
	 (pos (car coords)))
    (if window (select-window window))
    (if pos (goto-char pos)))
  (setq last-command 'drag-copy-handler)
  (barf-if-buffer-read-only)
  (undo-boundary)
  (push-mark (point))
  (insert (drag-drop-string value)))

(push-message (epoch::intern-atom "_SUN_DRAGDROP_TRIGGER") 'drag-trigger-handler)
(push-message (epoch::intern-atom "XV_DO_DRAG_LOAD") 'drag-load-handler)
(push-message (epoch::intern-atom "XV_DO_DRAG_COPY") 'drag-copy-handler)
(push-message (epoch::intern-atom "XV_DO_DRAG_MOVE") 'drag-copy-handler)

(provide 'drag-drop)
---
Ken Laprade			INTERNET: laprade@trantor.harris-atd.com
Harris Corporation 		Usenet:  ...!uunet!x102a!trantor!laprade
PO Box 37, MS 3A/1912		Voice: (407)727-4433
Melbourne, FL 32902		FAX: (407)729-3363
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads