Re: Suggestion for a GTK+ widget: Filebox.



thristian@atdot.org wrote:
> > > The widget should have whatever auto-completion style we choose, and
> > > should complete all paths as though $HOME is the current working
> > > directory.
> >
> > Why $HOME? If I want that I'll just type "~/" first.
> 
> Law of Least Surprise. Since there's no display of files, you can't
> see where you are in the filesystem and have no way of knowing what
> your options are. You could be starting *anywhere*. But I would expect
> it to start from $HOME - because, after all, that is conceptually my
> home directory, where I start from.

But ultimately this FileNameWidget should have a "current directory"
parameter that can be set at run-time. All file name completions should
expand from this directory. It might be $HOME by default unless
explicitly set, but it should be a state that could be set.

This way, the FileNameWidget can be used together with some other
mechanism that might select a directory (for example a directory widget
or file view or whatever) like we're interested in, in this case.


> chdir commands? I was thinking like for the gnome-find program, where
> you specify an initial directory, or maybe for the "choose a
> background image" widget in gnome-terminal. You don't really want to
> have any state in the widget.. well, I don't.

The state could be set by another widget, as described above.


> > BTW, it would be really nice if both this widget and the file dialog
> > understood csh ~ syntax and $ environment variables. That would
> > really save a lot of typing (and make documentation easier to write).
> 
> I think the file-dialog already knows ~ for $HOME. I don't know if it
> knows ~userid/, and I'm pretty sure it doesn't do environment
> variables.

Yes, why is there a need for environment variables *inside a file name
widget*?

To me it is enough if it supports ~ and ~userid (and of course preceding
/ and so on).


Christian



#######################################################################
Christian Rose
http://www.menthos.com                    	    menthos@menthos.com
#######################################################################





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