[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-core-devel
Subject: Re: Local relative URLs in Konqueror location bar
From: David Faure <david () mandrakesoft ! com>
Date: 2000-09-02 16:05:55
[Download RAW message or body]
At 23:06 01/09/00 +0200, you wrote:
>On Fri, Sep 01, 2000 at 01:41:07PM -0700, Kurt Granroth wrote:
>
>Hi,
>
>> Now when in Konqueror (in any directory or any view) I go to the
>> location bar and start typing 'www'. It immediately completes it for
>> me. Cool.. so I hit END and start typeing 'img'.. and it completes.
>>
>> This is really slick as it makes accessing directories (and files --
>> it completes on filenames, too) really quick.
>>
>> Unfortunately, it doesn't quite work. When I hit return, it attempts
>> to append a 'http://' on the front like so:
>>
>> http://www/img
>>
>> Now the combo knows that this is local since it is doing the
>> completion, but it is somehow not passing along that information.
>
>it's a mixture of completion modes, actually the "relative" completion is
>a bug, sort of. KURLCompletion seems to do relative completions
This surprises me. How does it know the current directory ?
Or does it assume $HOME ? Or getcwd() (which would be a huge bug here,
since you have no control over the cwd of a KDE app, generally) ?
>but konqueror doesn't accept a relative url. Instead it seems to ask the
>URIFilter to do something with it, which tries to make a URL out of that,
>I think.
Yes.
>I guess konqueror should be fixed to accept relative paths as
>well?
konqueror accepts relative urls on the command line, because in that
case it's easy, the cwd is known.
>Always relative to your homedirectory? Or relative to the active
>view, if it is a KonqDirPart?
Looks like it should be the latter, yes (and there should be no relative
path support if not, e.g. when replacing an HTTP URL with a path).
In fact this is similar to the code in slotOpenTerminal. Something like
if ( locationBarURL.isRelativeURL() )
{
KURL u( m_currentView->url() );
if ( u.isLocalFile() )
{
if ( m_currentView->serviceType() != "inode/directory" )
u.setPath( u.directory() );
// Use u as the base URL for the relative URL
locationBarURL = KURL( u, locationBarURL );
}
}
David.
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic