[Kde-pim] Review Request: Allow the default context menu for EntityTreeView to be specified

Kevin Krammer kevin.krammer at gmx.at
Thu Mar 1 18:21:15 GMT 2012


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/104132/#review11059
-----------------------------------------------------------



akonadi/entitytreeview.h
<http://git.reviewboard.kde.org/r/104132/#comment8943>

    "item" in this context is IMHO a bit too ambiguous in this context.
    
    Maybe something like
    "This menu is used as a fallback if the context of the menu request is neither an item nor a collection, e.g. click on an empty area inside the view"



akonadi/entitytreeview.cpp
<http://git.reviewboard.kde.org/r/104132/#comment8942>

    Just initialize this with d->mDefaultPopupMenu and make the "else" body the "then" body with inverted condition


- Kevin Krammer


On March 1, 2012, 5:54 p.m., Jonathan Marten wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/104132/
> -----------------------------------------------------------
> 
> (Updated March 1, 2012, 5:54 p.m.)
> 
> 
> Review request for KDEPIM-Libraries.
> 
> 
> Description
> -------
> 
> The referenced bug happens because EntityTreeView::contextMenuEvent() looks at the clicked item to see whether it is an Item or a Collection, and chooses the context menu accordingly.  However, if the menu button click is over blank space then there is no item to test, so the code at present arbitrarily chooses the collection menu.  This is incorrect for the middle column of KAddressBook.
> 
> This change adds a Boolean flag to the EntityTreeView to specify whether it contains Items or Collections, and for a menu click over blank space this is used to choose the appropriate menu.  For a menu click over an item this flag is not used.  The default is true (i.e. Collections), so the operation of the library with unmodified applications is the same as before.
> 
> Some discussion at http://lists.kde.org/?t=133035828400002&r=1&w=2
> 
> 
> This addresses bug 259963.
>     http://bugs.kde.org/show_bug.cgi?id=259963
> 
> 
> Diffs
> -----
> 
>   akonadi/entitytreeview.h f1ffc95 
>   akonadi/entitytreeview.cpp cb2fad6 
> 
> Diff: http://git.reviewboard.kde.org/r/104132/diff/
> 
> 
> Testing
> -------
> 
> Built kdepimlibs with this change and modified KAddressBook to call setIsCollection(false) for the middle column.  The correct context menu is displayed whether over an address item or over blank space.
> 
> 
> Thanks,
> 
> Jonathan Marten
> 
>

_______________________________________________
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