redcar/redcar — pull request #48 by eric1234 (2012-01-29 04:58:37+00:00)
Title: Disabled plugins

Here is the rest of the support to allow disabling plugins. This is actually two patches. The first is a bug fix that prevents the "Reload" from working if the Plugin Manager is on screen. The second is the actual meat. I made the following changes to the Plugin UI.

* I added a link that will say "Enable" or "Disable" (depending on current state). When clicked it carries out the action and gives the user some feedback. Disabling only takes affect on restart but enable will have the plugin working right away (it basically does a reload after moving it to the right list and persisting changes, hence my bug fix).
* I added a list of all disabled plugins (as of boot time).
* To help the user know what plugins are dependent on others I put that in the UI. A plugin will list all other plugins that are using it as a dependency so you know what else you need to disable if you want to disable a plugin.

I am storing the list of disabled plugins under ~/.redcar/storage/disabled_plugins.yaml. It is just a simply YAML list.

I am NOT currently making sure the user doesn't shoot themselves in the foot. If they really want they could theoretically disable all plugins. We may want to mark certain plugins are not able to be disabled (core, application). But if a user does do this (for some unknown reason) all they need to do is delete the disabled_plugins.yaml file and they are back up and running.