Update KIPI toolbar button after installation of kipi-plugins
Summary: In case there are no KIPI plugins installed, Gwenview can offer to {nav Install Plugins}. After installation completed, the {nav Plugins} entry in the menubar would update itself, however the KIPI toolbar button would still show {nav No Plugin found}. By always listening to `KIPIInterface::loadingFinished`, we are notified through `mPluginLoadTimer` when the menu needs to be updated in reaction to the plugin installation finishing. To avoid showing {nav Install Plugins} as a {nav Last Used Plugin} in case the installation was aborted, that section is only added when it makes sense, i.e. when there is actually more than one plugin to show. While `mExportActionList` does not contain {nav Install Plugins} anymore after installation completed successfully, it is still contained in `mDefaultAction`, which cannot be prevented easily due to not having access to `KIPIInterfacePrivate::mInstallPluginAction`. Therefore we only ever add actions from `mExportActionList`, which is the right thing to do in any case. Test Plan: Install {nav Discover}, remove `kipi-plugins`, open Gwenview and click on {nav Plugins > Install Plugins}. Keep Gwenview open while installing `kipi-plugins` and observe both the menu entry and the toolbar button populating themselves after installation completed. Restarting Gwenview afterwards should populate the toolbar button like normal. Reviewers: #gwenview, faridb Reviewed By: faridb Differential Revision: https://phabricator.kde.org/D13252
parent
3bb8beb5
Please register or sign in to comment