Review Request: Use a KDualAction to show/hide toolbar if there is only one

Aurélien Gâteau agateau at kde.org
Fri Oct 22 14:13:10 BST 2010



> On 2010-10-21 11:24:58, David Faure wrote:
> > Is the shortcut for this new action still configurable [I fixed that yesterday or so]?
> > It seems to me that this code leads to two actions with the same name in the actioncollection: the old m_toolBarActions.first() and the new kdualaction.
> > This should be somehow restructured so that the old action is deleted, or not created in the first place, or removed from the collection (but still deleted later), or renamed in the collection...

I don't think it adds two actions with the same name in the actioncollection. The action is added to the collection by the handleToolBar() method. The current code calls handleToolBar() unconditionally, but the new code was changed so that handleToolBar() is only called if there is more than one toolbar.


- Aurélien


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://svn.reviewboard.kde.org/r/5641/#review8286
-----------------------------------------------------------


On 2010-10-17 10:30:53, Aurélien Gâteau wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://svn.reviewboard.kde.org/r/5641/
> -----------------------------------------------------------
> 
> (Updated 2010-10-17 10:30:53)
> 
> 
> Review request for kdelibs.
> 
> 
> Summary
> -------
> 
> Now that the actions to show/hide menubar and statusbar are KDualAction, the action which show/hide the toolbar should be changed as well for consistency.
> 
> I only changed the case where there is only one toolbar because when there are multiple toolbars the action is turned into a submenu labeled "Toolbars Shown". It makes sense here to have toggle actions because the submenu only lists the name of the toolbars, without verbs.
> 
> 
> Diffs
> -----
> 
>   trunk/KDE/kdelibs/kdeui/xmlgui/ktoolbarhandler.cpp 1186567 
> 
> Diff: http://svn.reviewboard.kde.org/r/5641/diff
> 
> 
> Testing
> -------
> 
> Tested with a single-toolbar application (KWrite) and a multi-toolbar one (Konqueror).
> 
> 
> Thanks,
> 
> Aurélien
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20101022/135d0765/attachment.htm>


More information about the kde-core-devel mailing list