[Kde-pim] EntityTreeView and context menus

Jonathan Marten jjm2 at keelhaul.demon.co.uk
Mon Feb 27 15:56:40 GMT 2012


I've been investigating bug 259963 (wrong context menu when clicking
over a blank area in the middle column in KAddressBook).  The problem
seems to be in Akonadi::EntityTreeView::contextMenuEvent() where it
looks at the clicked index to see whether it is a valid Item, and
chooses the menu accordingly.  The problem is that, if the click is
over blank space, there is no way to tell whether the item or
collection menu should apply.

The only fix that I can think of so far is to add a property to the
EntityTreeView to indicate whether the view is showing items or
collections, to be set by the calling application.  It would only be
used in the case of a click not over anything, and the default
operation if this were not set would be the same as before so other
applications should not break.

Any comments?  Would such an addition be acceptable for a bug fix (so
into 4.8 branch), or would it have to wait for 4.9 for BC reasons?  If
it can go in then I'll code the change and submit it for review.

Regards,
-- 
Jonathan Marten                         http://www.keelhaul.demon.co.uk
Twickenham, UK                          jjm2 at keelhaul.demon.co.uk
_______________________________________________
KDE PIM mailing list kde-pim at kde.org
https://mail.kde.org/mailman/listinfo/kde-pim
KDE PIM home page at http://pim.kde.org/



More information about the kde-pim mailing list