Konqueror Context Specific Popup Menu

Sashmit Bhaduri smt at inbox.lv
Thu Sep 25 15:47:46 BST 2003


On Wednesday 17 September 2003 12:31 pm, David Faure wrote:
> Maybe it's time to actually include hints in the popupMenu signal (the one
> in KParts::BrowserExtension), to be able to control what Konqueror should
> show. This is the only way KHTMLPart can say "this URL I'm giving you, is
> for me a 'view URL', since it's in a frame", or "this URL is an object in
> the page". Hard to express in a generic way, to find a good name :}
>
> Given that the popupMenu variant with URLArgs in it is very recent, I
> suggest to add an enum to that one, which can include values among
> ShowNavigationItems (for up/back/forward)
> ShowReload (for reload, currently we only set it over HTTP)
>
> Make sure to then fix the connect() in khtmlimage, let's not repeat errors
> from the past :) (the other connect to fix is in KonqView IIRC)

Alright.. done in new patch.  It took a long time to work because I kept on 
misspelling Extension as Extention :)

summary:

- added enum called ItemFlags to KParts::BrowserExtension
- changed the popupMenu urlArgs signal in KParts::BrowserExtension to include 
ItemFlags
- added a new popupMenu signal for the KFileItems varient - for konqiconview/
treeview
- connected these in khtmlpart and khtmlimage (should this be done in 
kmultipart also?)
- connected to these in konqiconview and konqtreeview
- let libkonq/KonqPopupMenu check for these flags and add right items


Also I removed "Stop Animations" from the context menu.. It's not very context 
specific in most web pages, as they don't have any animations. It's still in 
menus of course. 
ShowNavigationItems appears for images, as discussed earlier, and 
ShowBookmarkItems doesn't for konqiconview/konqtreeview.

things that still can be done:
- Perhaps move more logic from KonqPopupMenu to khtmlpart/konqiconview/
konqtreeview.
- Perhaps remove the isHierarchial stuff (added after 3.1), in favor of 
ShowHierarchicalItems in the enum (only konqtreeview would enable this).. is 
there any  problems with the sidebar in doing this?
- Perhaps depreciate the showProperties bool in KonqPopupMenu in favor of a 
ShowProperties. We can't remove it wholesale without breaking BC, of course.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: kdelibs.diff
Type: text/x-diff
Size: 5894 bytes
Desc: not available
URL: <https://mail.kde.org/mailman/private/kfm-devel/attachments/20030925/ec930d10/attachment.diff>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: kdebase.diff
Type: text/x-diff
Size: 15307 bytes
Desc: not available
URL: <https://mail.kde.org/mailman/private/kfm-devel/attachments/20030925/ec930d10/attachment-0001.diff>


More information about the kfm-devel mailing list