Quit plugins on exit
Plugins should have a chance to clean up after themselves when we are shutting down.
This commit is contained in:
parent
eae86f2dae
commit
53908f3b1e
|
@ -65,4 +65,6 @@ def startup():
|
||||||
|
|
||||||
def shutdown():
|
def shutdown():
|
||||||
event.start("PREQUIT")
|
event.start("PREQUIT")
|
||||||
|
import plugin
|
||||||
|
plugin.quit()
|
||||||
event.start("POSTQUIT")
|
event.start("POSTQUIT")
|
||||||
|
|
|
@ -22,6 +22,14 @@ def init():
|
||||||
if p_dir == None:
|
if p_dir == None:
|
||||||
p_dir = path.plugin_dir()
|
p_dir = path.plugin_dir()
|
||||||
|
|
||||||
|
def quit():
|
||||||
|
global loaded
|
||||||
|
for mod in loaded:
|
||||||
|
try:
|
||||||
|
loaded[mod].stop()
|
||||||
|
except:
|
||||||
|
pass
|
||||||
|
|
||||||
|
|
||||||
def install_once(filepath):
|
def install_once(filepath):
|
||||||
global install
|
global install
|
||||||
|
|
Loading…
Reference in New Issue