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

List:       kde-core-devel
Subject:    Re: konqueror truncates requested URL
From:       Simon Hausmann <shaus () helios ! Med ! Uni-Magdeburg ! DE>
Date:       2000-05-31 9:16:48
[Download RAW message or body]



On Wed, 31 May 2000, David Faure wrote:

> On Wed, May 31, 2000 at 09:54:19AM +0200, Simon Hausmann wrote:
> > 
> > 
> > On Tue, 30 May 2000 pbrown@redhat.com wrote:
> > 
> > > On Tue, 30 May 2000 pbrown@redhat.com wrote:
> > > 
> > > > OK I'm working on hunting this down but if someone more familiar with the
> > > > code can find it faster, even better.
> > > > 
> > > > If I launch a .desktop file of type Link with the URL:
> > > > 
> > > > http://cgi.ebay.com/aw-cgi/eBayISAPI.dll?ViewItem&item=344797145
> > > 
> > > [ description of problems deleted ]
> > > 
> > > OK!  I found it.  Here's the offender, in class KFileManager (krun.cpp):
> > > 
> > > /****************/
> > > bool KFileManager::openFileManagerWindow( const KURL& _url )
> > > {
> > >   QString cmd = "kfmclient openURL ";
> > >   cmd += _url.url();
> > >   system( cmd );
> > >   return true; // assume kfmclient succeeded
> > > }
> > > 
> > > Problems with this function?
> > > 
> > > 1. it is in kdelibs, but makes a call into a kdebase program (kfmclient)
> > 
> > I guess the "right" solution would be to let the user choose his favourite
> > browser and use that one to open up the window.
> 
> Not exactly browser, but file manager. As the name says,
> this is used when the user wants to 'run' (i.e. clicks on, i.e. KRun)
> a directory. How do you want to avoid the dependency to kdebase ?
> Only konqueror (in the KDE stuff) can open and display a directory.

That's true.

> > That means we'd need to ask KTrader for an implementation of a service
> > like "Browser" :) and execute that service via klauncher?
> Not exactly, what we want here is to find an application that
> can handle the inode/directory mimetype.

(see below :)

> > Hrhmmm, that means we'd have to make the netscape .desktop file in
> > kappfinder implementation this servicetype and do the same for
> > kfmclient. This way the user could choose his favourite browser.
> This has nothing to do with netscape, whose file-manager abilities
> are quite ... limited :)

True ;-)

> > However I don't see how you want to get rid of the kdebase dependency?
> 
> Yeah. "kfmclient not found" is no better than "no application found
> for inode/directory", is it ?
> 
> Except if we want configurability here, but this is not what you
> wanted to point out, is it ?
> 
> > > 2. it has high overhead because it calls kfmclient.  Is there a way we
> > >   could do a more direct call? The code here is short and sweet, which is
> > >   why it was written, but it results in what turns out to be a very long
> > >   path.  I must be missing something.
> > 
> > Why is it hight overhead to call kfmclient? I don't see any faster way to
> > open up a new konqueror browser window.
> > 
> > kfmclient re-uses an existing/running konqueror instance to open up a new
> > window (through the Konqueror dcop interface) or it launches a new
> > konqueror process, through klauncher/kdeinit .
> 
> Right. And calling an external executable is the only solution that gets
> rid of all sorts of library dependencies.
> What else would you do anyway ? Send a DCOP signal to konqueror ?
> Talk about configurability.... and if it's not running you're in trouble.
> Then you have to launch it, and you're back to duplicating what kfmclient
> does transparently.

I fully agree

> Now the real question is : why the h*** is the URL above calling
> openFileManagerWindow ??? It's not a directory, is it ?

Well, the point is: We do not only call this for "inode/directory" but
also for "text/html" in KRun::runURL() !

So I think "text/html" we should make configurable, as here we can easily
have other applications being able to render text/html (although I
obviously vote for making Konqueror/khtml the default browser ;-)

Bye,
 Simon

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

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