Konqueror RMB popup menu & khtml referrer

Waldo Bastian bastian at kde.org
Mon Aug 11 12:36:41 BST 2003


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Monday 11 August 2003 12:57, David Faure wrote:
> On Sunday 10 August 2003 16:53, Waldo Bastian wrote:
> > Hi David,
> >
> > I have a problem with konqie's popup menu. There are several actions that
> > operate on the selected URL, such as "Open in New Window" and for those
> > to work correctly, the referrer must be set correctly. Konqueror doesn't
> > know how to do that, it only knows about the URL of the part as a whole,
> > but it doesn't know about frames that may influence the referrer. So
> > khtml should tell konqueror about the refererrer.
>
> This could be accessible via a property of the part....
>
> > I have made a patch that makes it possible to attach the referrer to a
> > KFileItem.
>
> I don't like this idea very much. KFileItems tend to be created in very
> large number, and when listing /usr we really don't need a referrer per
> item (ok an empty QString is only 4 bytes, but still...). I feel that
> KFileItem is much too low-level for this kind of information.

It doesn't cause any overhead, see attached patch. 

> > now everything works great except that void
> > KonqMainWindow::slotPopupMenu(...) sets "bool showPropsAndFileType"
> > depending on the function signature that was used.
>
> Hmm, yeah, the problem of a generic framework which wants to adapt
> popup menus to the kind of part requesting the popupmenu....
>
> > Any ideas how to set showPropsAndFileType based on something else?
>
> Can I suggest to rewind a little bit on the possible solutions?
>
> We have 4 variants of the popupMenu signal already... I feel that this
> should have been done with a struct as parameter instead, like we did with
> URLArgs. What about adding a 5th popupMenu signal, with a struct as param?
> In fact we could even use URLArgs for this, AFAICS, since opening the url
> which the popup menu is about, is just like a openURL call - we need all
> the URLArgs data, including all the metadata etc.
>
> So I'd suggest
>   void popupMenu( KXMLGUIClient *client,
>                   const QPoint &global, const KURL &url,
>                   const URLArgs& args, mode_t mode = (mode_t)-1 );
>
> (Note that the URLArgs ship the mimetype already, in the "serviceType"
> member).

Fine with me as well. I didn't want to add yet another popupMenu signal since 
we have so many already.

Cheers,
Waldo
- -- 
bastian at kde.org -=|[ SuSE, The Linux Desktop Experts ]|=- bastian at suse.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE/N3/JN4pvrENfboIRAqOFAJ46Se4ZZ6+sdAvj8bCQPdBuRoup4QCgmKsn
LWvsZpoD3qAN3SHq3rIk1wM=
=Tesj
-----END PGP SIGNATURE-----
-------------- next part --------------
A non-text attachment was scrubbed...
Name: kfileitem.patch
Type: text/x-diff
Size: 1695 bytes
Desc: not available
URL: <https://mail.kde.org/mailman/private/kfm-devel/attachments/20030811/a59177f6/attachment.patch>


More information about the kfm-devel mailing list