Closed s0600204 closed 3 years ago
Looks interesting
About your thoughts:
Would it be worth adding methods to the Plugin class that can be used to check if it is in Error or Warning?
Not really, one could simply check the Plugin.State
value, if needed, I think is better this way, since anyway is already there :)
Should the Plugin class set all status flags internally (as with this PR the DependenciesNotSatisfied and OptionalDependenciesNotSatified flags are set outside the class)?
Not really sure what you mean, I suppose you suggest if it would be better to have methods to change the state? In that case is the same as the previous point
Would the is_disabled method be better as an is_enabled method?
In my opinion yes, most of the time you do would do if plugin.is_enabled():
, is a bit more concise and clear then if not plugin.is_disabled():
.
This PR adds a way of acquiring the status or state of a plugin.
It is now possible to query a plugin directly to see if it is loaded or disabled; and to request a suitable status icon and tooltip for use in GUI (preview).
There are also a few more status icon varieties.
Thoughts:
Would it be worth adding methods to the
Plugin
class that can be used to check if it is in Error or Warning?is_usable
method? (True
when Loaded and not Errored.)Should the Plugin class set all status flags internally (as with this PR the
DependenciesNotSatisfied
andOptionalDependenciesNotSatified
flags are set outside the class)?Would the
is_disabled
method be better as anis_enabled
method?