Re: GtkFileSelection and symbolic links



On 30 Sep 1999, Owen Taylor wrote:

> Well, the problem is that GtkFileSelector was written for
> conceptual simplicity (everything is Tab completion) as opposed
> to efficiency or real simplicity. So things like this
> are harder to fix than they may seem.

I realized that while looking at the sources... :)

> There is a hard-coded hack in GtkFileSelection to assume
> certain directories contain only other directories, which
> avoids the stat() calls. Currently, this includes /afs
> and /net. You could certainly add "/home" there as a local
> workaround. 

Tried that, it will do for a workaround...

> (Maybe GTK+ needs ./configure --with-no-stat-subdirs=/home:/afs)

That would be nice, but the bigger issue in my mind is users
with automounter situations like mine, using whatever Gtk libs
came with their distro.

> But I think things can be improved a bit - by choosing
> the directory to complete from to be as long as possible.
> The following patch tries to do this. It won't perfectly solve
> your problem - if you go to the /home directory it is going
> to stat all the subdirs, but it should help.

That's fine!  I don't have a problem with it stat-ing directories
in /home when I *select* /home, I just want it to leave /home 
alone when I haven't selected it.  I encounter the same automounter
issue when I do,

$ ls --color -l /home

so its no worse than that.

> Could you try it out and see how it works for you?

Tried it.  Actually I had been working with the bleeding edge stuff
but I applied your patch to r1.46.2.2, and it works great there!
But open_ref_dir() has changed a bit on the head version (1.50), 
using a handful of g_path_* functions.  I don't have time to learn 
all that stuff, but if you can fit a similar patch in there (if you
feel its a worthwhile patch) that would be great.
> 
> Thanks,
>                                         Owen

Thank you for your help!
-Jamie

p.s.
One of the rotating CVS servers keeps reporting, 
  can't create temporary directory
  No space left on device



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