[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-pim
Subject:    Re: [Kde-pim] EntityTreeView and context menus
From:       Kevin Krammer <kevin.krammer () gmx ! at>
Date:       2012-02-27 16:09:52
Message-ID: 201202271709.56549.kevin.krammer () gmx ! at
[Download RAW message or body]

[Attachment #2 (multipart/signed)]


On Monday, 2012-02-27, Jonathan Marten wrote:
> 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.

What about derving from EntityTreeView in KAddressBook and overwriting the 
event handler method, delegating to base class implementation when event 
position is on a valid item?

I am not sure clicking in empty space will always result in either collection 
or item context menu, an application could want different behavior.

Cheers,
Kevin

-- 
Kevin Krammer, KDE developer, xdg-utils developer
KDE user support, developer mentoring

["signature.asc" (application/pgp-signature)]

_______________________________________________
KDE PIM mailing list kde-pim@kde.org
https://mail.kde.org/mailman/listinfo/kde-pim
KDE PIM home page at http://pim.kde.org/

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic