Depends on D1812
The preferences dialog should better not interact directly with the engine. It should call plugin_manager.load_plugin() instead, which would call engine.load_plugin() and emit a signal whether it succeeded or not! And the preferences dialog is connected to those signals and updates itself. The block below this line should be in PluginManager..
The dependant plugins logic should also be moved to the plugin manager. The preferences dialog should be connected to signals and update itself..
only minor comments
remove because unused?
This does a loop over the loaded plugins and for each item a loop over the rows. It could simply do a loop over the rows and check if the plugin is in loaded_plugins.. something like that. I'm only thinking it will get rid of this if, I don't really care about performance. :)
"""Handles the deactivation of one of the available plugins."""
will we ever use auto_hide?
See http://lazka.github.io/pgi-docs/#GObject-2.0/classes/Object.html#GObject.Object.handler_block for how to use handler_block to block the signals emitted by switch when you set it active, because that would not be useful for us. A bit more efficient this way, important just for good practice.
Same change should be made in __unload_plugin_cb.
If you try to turn on a switch, but for any reason the plugin can't be loaded, then the switch turns off and an infobar appears telling you that there was an error loading the plugin.
Just for UX. I think that if the infobar keeps always there telling you that there was an error to load A and then you load B and you still see that infobar with the error of the previous plugin it may confuse you.
Anyway, other possibilities is to not care about that and keep the infobar can forever (at least until other message needs to be showed in the infobar). Or just hide the infobar when other plugin has been loaded successfully.
This is a protected method. For the future, protected methods don't need this level of documentation. Look a bit: 3 lines of code and 5 lines of pydoc.
Remove show_builtins because it's unused? Also in PluginsBox
This can be gone by using self.list_store.preferences_dialog - you can rename it to dialog if you want to save some space