Plugins with settings overlay need restart
This commit is contained in:
1 parent
19ff9ac664
commit
c693bce761
2 files changed
+4
-1
No files matched your search
@@ -211,6 +211,8 @@ def init_pluginsystem(settings):
|
||||
|
||||
def handle_plugin_loaded(name, plugin):
|
||||
if hasattr(plugin.instance, "__plugin_settings_overlay__"):
|
||||
plugin.needs_restart = True
|
||||
|
||||
# plugin has a settings overlay, inject it
|
||||
overlay_definition = getattr(plugin.instance, "__plugin_settings_overlay__")
|
||||
if isinstance(overlay_definition, (tuple, list)):
|
||||
|
||||
@@ -134,6 +134,7 @@ class PluginInfo(object):
|
||||
self.bundled = False
|
||||
self.loaded = False
|
||||
self.managable = True
|
||||
self.needs_restart = False
|
||||
|
||||
self._name = name
|
||||
self._version = version
|
||||
@@ -900,7 +901,7 @@ class PluginManager(object):
|
||||
pass
|
||||
|
||||
def is_restart_needing_plugin(self, plugin):
|
||||
return self.has_restart_needing_implementation(plugin) or self.has_restart_needing_hooks(plugin)
|
||||
return plugin.needs_restart or self.has_restart_needing_implementation(plugin) or self.has_restart_needing_hooks(plugin)
|
||||
|
||||
def has_restart_needing_implementation(self, plugin):
|
||||
if not plugin.implementation:
|
||||
|
||||
Reference in new issue
Block a user