KToggleAction in menus

Thomas McGuire thomas.mcguire at gmx.net
Tue May 1 13:53:27 BST 2007


Hello,

Am Tuesday 01 May 2007 Alex Merry wrote:
> I just noticed a minor thing with KWrite (trunk).  In the Settings menu,
> there are three Show options: Show Toolbar, Show Statusbar and Show
> Path.  Each has a checkbox next to it.
>
> If you click Show Toolbar, it changes the checkbox value, but not the
> text.  However, clicking Show Statusbar will enable the checkbox _and_
> change the text to Hide Statusbar (same for Show Path).  Show Statusbar
> is from KStandardAction, while Show Path is defined in KWrite itself.
>
> I'm assuming the checkbox is unconditionally displayed for
> KToggleAction, in which case the text shouldn't change when toggled.
>
> Should the alternative ("Hide") text be discarded?
IMHO no. KMail has the same bug (the mark as todo/important context menus).
In KMail however, KToggleAction::setCheckedState is called for those actions, 
I assume KWrite does the same. Acording to the APIDOX at 
http://www.englishbreakfastnetwork.org/apidocs/apidox-kde-4.0/kdelibs-apidocs/kdeui/html/classKToggleAction.html#22ba13df6bebeacf041574639161aaaf , 
the checkbox should not be shown when KToggleAction::setCheckedState was 
called (" This feature replaces the checkmark that usually appears in front 
of the text, in menus.").
However the checkbox is still shown after the call, which indicates this is a 
bug in KToogleAction.

Regards,
Thomas







More information about the kde-core-devel mailing list