[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    Re: [Fwd: KFM Url completion patch...]
From:       Antonio Larrosa <antlarr () arrakis ! es>
Date:       1999-01-28 5:49:08
[Download RAW message or body]

David Faure wrote:
> 
> On Wed, Jan 27, 1999 at 11:42:42AM +0100, David Faure wrote:
> > On Wed, Jan 27, 1999 at 11:19:40AM +0100, Stephan Kulow wrote:
> > > Hi!
> > >
> > > What do you think? I guess kfm is becoming more and
> > > more a webbrowser than a file manager, but would it
> > > work currently to type into it "homeworks" and it changes
> > > to homeworks? I wouldn't want to see it going to http://homeworks
> > > then.
> > No, it wouldn't work.
> > The URL in the statusbar has to be valid at any time, and "homeworks" is
> > not a valid URL. (because no protocol part and not beginning with a '/').
> > (at least one or the other is needed)
> >
> > So the idea is good, I think.
> > But it's a bit late.
> > After a pre2 we're supposed to fix real showstoppers (I fixed two segfaults
> > yesterady), not introduce new features, even small ones, that could break
> > something in 1.1
> > Sorry.
> 
> On second thought...
> Dawit Alemayehu sent me this patch, which does even smarter things : allow to enter
> a subdir in the current directory, and if it doesn't exist, then prepend
> "http://".
> 
> +        else
> +        {
> +            KURL path ( getURL() );
> +            QDir::setCurrent ( path.directory () );
> +            QFileInfo f ( QDir::currentDirPath().append( "/" ).append( url
> +).data() );
> +            debug ( f.filePath() );
> +               if ( f.exists() )
> +                url = f.filePath();
> +            else
> +                url = url.prepend ("http://");
> +        }
> 
> Looks like this feature is really wanted for 1.1 ...
> Which behaviour is preferred ?
> 

I think the above patch is nice, but not the one below:

> BTW, he also suggested to remove trailing and leading white space (before,
> of course) :
> +       // strip off any leading and trailing white space
> +       while (url.find(' ') == 0)
> +         url.remove(0, 1);
> +       while (url.findRev(' ') == (signed) url.length()-1)
> +             url.remove(url.length()-1, 1);
> 

The spaces may be part of the name, just try  "mkdir \ adirectory\ \ ".
This creates a directory which has a space at thebeggining and two
trailing spaces. It would be a pity not to be able to go into this
directory from kfm :-)

Greetings,

--
Antonio Larrosa Jimenez
antlarr@arrakis.es        larrosa@kde.org
http://www.arrakis.es/~rlarrosa
Klein bottles for rent -- inquire within.

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic