emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: GTK file selector


From: Jan D.
Subject: Re: GTK file selector
Date: Thu, 22 Dec 2005 10:27:17 +0100 (CET)

>     I don't know, but if some lisp code sets mustmatch to t, it probably  
>     expects the returned file name to be an existing file.
> 
> Not for the Open File menu item!  The only reason we made that pass t
> for MUSTMATCH is that someone thought that's appropriate for Open File
> menu items.

Actually the reason was not just that someone thought it would be appropriate,
but that the GTK/OSX (and perhaps W32) file dialogs more or less require it.

For the new GTK file chooser, if you don't specify that it is selecting
existing files, it does not show the directory/file tree (you have to click
on a toggle to see it).  Also, if we don't tell the new file chooser that
it is opening an existing file and the user selects an existing file, the
file chooser will pop up a dialog that asks the user if the file selected
should be replaced.  So, for the new file chooser, the behaviour between
opening an existing file and saving a file is quite different.  That is
what motivated the difference between new and open file in the current
Emacs.

But the old GTK file dialog does not make any distinction between saving and
opening, so for that one we could pass nil for MUSTMATCH.

> If it works better, in practical terms, when MUSTMATCH is nil,
> we can make it set MUSTMATCH to nil!

Yes it can be done.  But is it really worthwhile for a dialog that is
not default in the first place, and that will probably be gone from GTK soon?

        Jan D.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]