Re: Suggestion for a GTK+ widget: Filebox.



On Sat, Aug 19, 2000 at 11:23:20AM -0400, Ken Fox wrote:
> thristian@atdot.org wrote:
> > 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 isn't in the widget, it's in the process.
> 
> If I run a text editor, I expect it to look in the current directory
> for the files I type in. 

Files you open in a text editor probably should be using the full file
dialog, not the minimal widget.

> If I chdir inside the editor, 

chdir *inside* the editor? This is some powerful editor you're talking
of. I know zilch about emacs, but you can chdir in Vim, but you still
don't open files with a minimal widget - in this case you use vi's
commandline which in Vim has tab-completion anyway.

> then I expect it to start looking in the directory I changed to. If
> the filename widget always starts looking in $HOME that will be a
> major pain.

Well, that's true. I'd suggest that the File Entry Widget shouldn't be
used in that situation. I was just thinking for ordinary dialog boxes
that need a filename for some nefarious purpose, not for
application-level file management. Applications *do* have a lot of
state, and the file widget should have as little as possible.

I'll capitulate that the file widget should have a method of setting
the default path, and maybe even a chroot-style effect, but I'll go so
far as to say that if you need "current working directory" state to be
stored, you're looking at the wrong widget.

It's for dialog boxes whose primary concern is a function other than
loading files, not for an application window. It's for GTK+ web
browsers and the HTML file-input widget. It's for a mail client's
preferences dialog and "Main InBox file:". It's for any of the current
myriad instances of a text widget followed by a "Browse" button.

> > Ever seen mutt's .rc format? It takes back-ticks and
> > environment variables and all sorts of shell weirdness. :)
> 
> back-ticks? That's pretty scary. I'd be more than happy to just
> be able to say $ORACLE_HOME and have it do the right thing.

Of course, what we *really* want is to embed a tiny copy of bash in
each and every text widget.. :)

-- 
,------------------------------------------------- ------ ---- -- -  -   -
| Screwtape | Reply-To: is munged on Usenet | members.xoom.com/thristian
|--------------------------------------------- ---- ---- --- -- - - -  -  
|
| Screwtape: Dean of Iniquity.
|





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