Konqueror Context Specific Popup Menu

David Faure dfaure at klaralvdalens-datakonsult.se
Thu Sep 25 16:37:25 BST 2003


On Thursday 25 September 2003 16:47, Sashmit Bhaduri wrote:
> Alright.. done in new patch.  It took a long time to work because I kept on 
> misspelling Extension as Extention :)
LOL :)

> summary:
> 
> - added enum called ItemFlags to KParts::BrowserExtension
What about calling it PopupFlags? ItemFlags sounds like it applies to a KFileItem,
which isn't 100% correct (it applies to a list of them, or to a single URL,
and anyway it's really specific to the popupmenu).

NoClass could be called hmm, None, but that would clash with the X #defines,
so maybe Default.

The "ItemClass" name can be removed, just use an anonymous enum - all the
methods take an ItemFlags (->PopupFlags) anyway.

> - 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?)
Oh indeed. We forgot to add the URLArgs variant there. Can you make sure
that all the popupMenu variants are listed there?

> - 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.

Great.

> things that still can be done:
> - 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?
Yes it would be a good idea to clean this up, before it becomes part of 
the KDE-3.2 BC API.
You wouldn't have to change anything in the sidebar code. The sidebar sets
X-KDE-BrowserView-HierarchicalView=true in its .desktop file, and Konqueror
reads that in the KonqPopupMenu call, in konq_mainwindow.cc:3902.
This would simply be replaced with
   if ( m_currentView->isHierarchicalView() )
      flags |= ShowHierarchicalItems;

> - Perhaps depreciate the showProperties bool in KonqPopupMenu in favor of a 
> ShowProperties. We can't remove it wholesale without breaking BC, of course.
This can wait, indeed.

Would you have time to do the above-mentionned changes? Please tell me if
not, then I'll schedule some time to do it myself, I want those changes to go
in :)
Many thanks,
David.

-- 
David Faure -- faure at kde.org, dfaure at klaralvdalens-datakonsult.se
Qt/KDE/KOffice developer
Klarälvdalens Datakonsult AB, Platform-independent software solutions




More information about the kfm-devel mailing list