[PATCH] KToggleToolbarAction, KWidgetAction

John Firebaugh jfirebaugh at kde.org
Mon Apr 8 03:45:36 BST 2002


The attached patch adds two new KAction-subclasses: KToggleToolbarAction and 
KWidgetAction. The first handles everything associated with a "Show ___ 
Toolbar" menu item, including updating itself when the toolbar is shown or 
hidden programmatically. Use of this class will make bugs like "Bug#40413: 
Selections in Settings are displayed incorrectly" easy to fix. The second 
provides an easy way to insert custom widgets into toolbars. It removes the 
necessity of subclassing KAction for every widget you want to insert into a 
toolbar.

To support KToggleToolbarAction I had to make a small change to 
kxmlguibuilder: it now queries the main window for the specified toolbar and 
creates a new one only if the query returns null.

Under the hood, use of KToggleToolbarAction changes one thing that may or may 
not be of significance: a toolbar with an associated KToggleToolbarAction 
will always be created, at the time the action is plugged, regardless of 
whether the toolbar is ever used.

Comments, suggestions, objections? If none of the latter, I will commit in 2 
days.

later,
John
-------------- next part --------------
A non-text attachment was scrubbed...
Name: newkactions.diff
Type: text/x-diff
Size: 6756 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20020407/856e340a/attachment.diff>


More information about the kde-core-devel mailing list