Summary: | New Contact, New group and Quick Search actions are preselected by default in the 'Configure Toolbar' dialogue | ||
---|---|---|---|
Product: | [Applications] kontact | Reporter: | Sabine Faure <sabine> |
Component: | general | Assignee: | David Faure <faure> |
Status: | VERIFIED FIXED | ||
Severity: | normal | CC: | faure, kdepim-bugs, tokoe |
Priority: | NOR | ||
Version: | SVN trunk | ||
Target Milestone: | --- | ||
Platform: | Compiled Sources | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: | |||
Attachments: | proposed fix |
Description
Sabine Faure
2009-09-13 23:53:54 UTC
Except for Quick Search maybe. - Click on the 'Defaults' button from the 'Configure Toolbars' dialogue. All the buttons that you have added are removed except the default ones 'New Contact' and 'New Group' Trunk,Svn Rev 1022237 Kontact specific bug A solution would be to do the KToolBar::removeAction again after editing toolbars (I made that patch here), but this leaves the unwanted actions visible in the toolbar editing dialog. I think a better solution would be to modify the XML at runtime to really remove the actions from the toolbar. Created attachment 37114 [details] proposed fix For review and/or archiving purposes: here's the suggested fix (modifying the XML on startup and after toolbar editing). Requires the kdelibs patch in http://reviewboard.kde.org/r/1694. The problem is that if the user adds "New Contact" explicitely, the code will remove it again. Maybe we should have <Action name="akonadi_contact_create" remove_in_kontact="true"/> in kaddressbookui.rc, so that we only remove the default actions and not the ones added by the user. This would replace invisibleToolbarActions(). I also wonder what happens when editing toolbars in kontact and then using kaddressbook standalone -- the actions will be missing, since the local ui.rc file will not contain the actions anymore. Argh. Seems the only clean solution is to have two ui.rc files, either in the sources (duplication) or at runtime (making a local copy with the actions removed, and using that for the kaddressbook part in kontact...) SVN commit 1027982 by dfaure: Better solution for hiding specific actions in kontact: tagging them in the xml and removing them from the xml dynamically, so that they don't appear in "Configure Toolbars" (but so that it's still possible to manually add them). I still need to convert the other plugins to this system, but this solves 207296 at least. CCMAIL: kde-pim@kde.org BUG: 207296 M +2 -2 kaddressbook/kaddressbookui.rc M +5 -7 kontact/plugins/kaddressbook/kaddressbook_plugin.cpp M +1 -1 kontact/plugins/kaddressbook/kaddressbook_plugin.h M +47 -12 kontact/src/mainwindow.cpp M +1 -0 kontact/src/mainwindow.h WebSVN link: http://websvn.kde.org/?view=rev&revision=1027982 SVN commit 1028153 by dfaure: Even better fix for 207296, using the strategy described on k-c-d ("Re: Review Request: Use in-memory dom document when editing toolbars...") This way toolbar changes in kontact don't mess up kaddressbook; and users can freely edit toolbars without some hidden magic removing their newly-added actions; and upgrades are handled, etc. Had to add a unique name to the Plugin ctor, to differenciate the 3 korganizer plugins though, so this is an API change in kontactinterface (volker said it was ok until 4.4 is released). CCBUG: 207296 M +3 -6 kdepim/kaddressbook/kaddressbookui.rc M +1 -1 kdepim/kontact/plugins/akregator/akregatorplugin.desktop M +6 -5 kdepim/kontact/plugins/kaddressbook/kaddressbook_plugin.cpp M +1 -1 kdepim/kontact/plugins/kaddressbook/kaddressbook_plugin.h M +1 -1 kdepim/kontact/plugins/kaddressbook/kaddressbookplugin.desktop M +1 -1 kdepim/kontact/plugins/kjots/kjots_plugin.desktop M +1 -1 kdepim/kontact/plugins/kmail/kmailplugin.desktop M +1 -1 kdepim/kontact/plugins/knode/knodeplugin.desktop M +1 -1 kdepim/kontact/plugins/knotes/knotesplugin.desktop M +1 -1 kdepim/kontact/plugins/korganizer/journalplugin.cpp M +1 -1 kdepim/kontact/plugins/korganizer/journalplugin.desktop M +1 -1 kdepim/kontact/plugins/korganizer/korganizerplugin.cpp M +1 -1 kdepim/kontact/plugins/korganizer/korganizerplugin.desktop M +1 -1 kdepim/kontact/plugins/korganizer/todoplugin.cpp M +1 -1 kdepim/kontact/plugins/korganizer/todoplugin.desktop M +1 -1 kdepim/kontact/plugins/ktimetracker/ktimetracker_plugin.desktop M +1 -1 kdepim/kontact/plugins/planner/plannerplugin.desktop M +1 -1 kdepim/kontact/plugins/specialdates/specialdatesplugin.desktop M +1 -1 kdepim/kontact/plugins/summary/summaryplugin.desktop M +10 -16 kdepim/kontact/src/kontactui.rc M +0 -47 kdepim/kontact/src/mainwindow.cpp M +0 -1 kdepim/kontact/src/mainwindow.h M +58 -3 kdepimlibs/kontactinterface/plugin.cpp M +5 -6 kdepimlibs/kontactinterface/plugin.h WebSVN link: http://websvn.kde.org/?view=rev&revision=1028153 It is corrected now. When selecting a button from the 'Configure Toolbars' dialogue only the selected button gets added now. Trunk, Svn Rev 1030016 |