[climacs-devel] Re: a patch for climacs (mainly regarding COMPLETABLY-PATHNAME) + a gimmick

Max-Gerd Retzlaff m.retzlaff at gmx.net
Thu Sep 1 17:08:54 UTC 2005


Hello

On Thu, Sep 01, 2005 at 07:48:12AM +0100, John Q Splittist wrote:
> Max-Gerd Retzlaff wrote:
> > On Wed, Aug 31, 2005 at 07:46:37PM +0100, John Q Splittist wrote:
> > 
> >>Have you (MGR) given thought to how your file-selector could become a
> >>Dired application?

Well, I have given some thought to this. Basically your Dired for CLIM
is just a COM-SHOW-DIRECTORY with a presentation-to-command-translator
PATHNAME -> COM-FIND-FILE, and one of PATHNAME -> COM-SHOW-DIRECTORY
with a tester for DIRECTORYP. Direct the output to an OPEN-WINDOW-STREAM
or make the call inside an ACCEPTING-VALUES with :OWN-WINDOW T.


I propose that COM-SHOW-DIRECTORY should become a general PRESENT method
for a presentation LIST OF PATHNAMES, as well as the construct

(let ((icon (clim-listener::icon-of pathname)))
      (when icon
        (clim-listener::draw-icon stream icon :extra-spacing 30)))
    (princ (clim-listener::pathname-printing-name pathname long-name) stream))

should be CLIM's general PRESENT method for PATHNAME in TEXTUAL-DIALOG-VIEW.
(The latter is already defined in file-selector.lisp.)

Also, the file-selector should be renamed and become just the general
ACCEPT method for PATHNAME in GADGET-VIEW (I'm not completely sure
about the right view class, yet. But GADGET-VIEW seems to be right.)
(This is also already defined in file-selector.lisp.)

There is only a ACCEPT-PRESENT-DEFAULT method missing and things will get
really smooth. I'll do that soon (no time right now).

(Note: This is not yet completely thought through.)


> > But no, I want the File Selector to be a general
> > gadget of McCLIM to ACCEPT PATHNAMES for the appropriate VIEW.
> 
> Well, yes. But you could use your experience to (a) produce a general
> file-manager application (perhaps using ESA); and/or (b) parameterise
> the file-selector so it could become a generalised thing-selector, such
> as buffers.

Well, the file-selector is acutally really simple! Have a look at it,
it's just an ACCEPTING-VALUES dialog with some ACCEPTs, some
PRESENTATION-TYPEs and presentation translators. The only complicated
thing right now is the construction of the new pane hierarchy (as well
as the reconstruction of the formerly hierarchy, if the pathname
gadget was embedded), but that's only because WITH-OUTPUT-AS-GADGET
doesn't work correctly, *yet*.

Bye,
Max

PS: Should this discussion be on mcclim-devel instead?

-- 
Max-Gerd Retzlaff <m.retzlaff at gmx.net>

For your amusement:
Left to themselves, things tend to go from bad to worse.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <https://mailman.common-lisp.net/pipermail/climacs-devel/attachments/20050901/10146460/attachment.sig>


More information about the climacs-devel mailing list