Bug 207297 - [Patch] 'Delete Address Book' button cannot be added from the 'Configure Toolbars' dialogue.
Summary: [Patch] 'Delete Address Book' button cannot be added from the 'Configure Tool...
Status: VERIFIED FIXED
Alias: None
Product: kaddressbook
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords: investigated
Depends on:
Blocks:
 
Reported: 2009-09-14 00:01 UTC by Sabine Faure
Modified: 2009-10-23 16:00 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
proposed fix (2.33 KB, patch)
2009-10-10 01:01 UTC, David Faure
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Sabine Faure 2009-09-14 00:01:12 UTC
Version:            (using Devel)
Compiler:          gcc 4.3.2 
OS:                Linux
Installed from:    Compiled sources

- Launch KAB
- Go to Settings menu/Configure Toolbars...
- The 'Configure Toolbars' dialogue appears
- Select 'Main Toolbar <kaddressbook>' from the 'Toolbar' combo box.
- In the 'Available actions' column select 'Delete Address Book'
- click on the right hand side arrow.
- Click on 'Apply'

The 'Delete Address Book' button should be added to the Kaddressbook toolbar but it is not.
Instead the 'Search field' disappear for no reason.

Trunk, Svn Rev 1022237
Comment 1 Sabine Faure 2009-10-09 17:09:57 UTC
I retested this today and the Search field does not disappear anymore but the 'Delete Address Book' button is still not added in the toolbar.

The same thing happens when trying to add 'Address Book Properties'.

Whereas if you add any other action (ex:Copy Address Book Folder) then it works and a button is added to the Main toolbar in KAB.

Trunk, Svn Rev1033074
Comment 2 Sabine Faure 2009-10-09 18:05:43 UTC
In fact those two buttons('Delete Address Book' and 'Address Book Properties') are added but not displayed when clicking on 'Apply'.

To see them, click on 'Ok' and select an Addressbook (ex: Personal Contacts). the two buttons appear next to the search field in the Main toolbar.

If you click on 'Contacts' (=the Kolab resource) then they are no longer displayed until you select an addressbook again.

Trunk, Svn Rev 1033074
Comment 3 David Faure 2009-10-10 01:01:44 UTC
Created attachment 37480 [details]
proposed fix

Tobias: this is because of the use of QAction::setVisible in standardcontactactionmanager.cpp. It makes the actions appear and disappear, which is quite unexpected I think, it would be better to just enable/disable them. In fact the attached patch works ok for me.

I guess the only difference is that the Edit menu looks a bit more "crowded" because it contains "Delete Addressbook" at all times. But I think GUI styleguides say that it's better to disable actions than to have them disappear altogether.
Comment 4 Tobias Koenig 2009-10-13 13:57:53 UTC
SVN commit 1034746 by tokoe:

Disable actions instead of hiding them fixes some
problems with actions that can not be added to a toolbar.
Thanks to dfaure for the patch!

BUG: 207297


 M  +6 -6      standardcontactactionmanager.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1034746
Comment 5 Sabine Faure 2009-10-23 16:00:58 UTC
It is corrected now.

It is possible to add or remove any of the toolbar buttons now.


Trunk, Svn Rev 1039367