Konqueror RMB popup menu & khtml referrer
Waldo Bastian
bastian at kde.org
Sun Aug 10 15:53:51 BST 2003
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
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.
I have made a patch that makes it possible to attach the referrer to a
KFileItem. Now I have only one small problem left. I can change khtml's popup
code like this:
- - emit d->m_extension->popupMenu( client, QCursor::pos(), popupURL,
- - QString::fromLatin1( "text/html" ),
S_IFREG /*always a file*/ );
+ KFileItem item( popupURL, QString::fromLatin1( "text/html" ), S_IFREG /
*always a file*/ );
+ item.setReferrer(referrer);
+ KFileItemList items;
+ items.append( &item );
+
+ emit d->m_extension->popupMenu( client, QCursor::pos(), items );
now everything works great except that void KonqMainWindow::slotPopupMenu(...)
sets "bool showPropsAndFileType" depending on the function signature that was
used.
Any ideas how to set showPropsAndFileType based on something else?
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/Nlx/N4pvrENfboIRAmWLAJ45vmN5o1nf5QL3gMS+b1CNaHVwlQCZASdy
7AfYX/bc5rv8/iB0gp0t+fc=
=/5lJ
-----END PGP SIGNATURE-----
More information about the kfm-devel
mailing list