Made a settings value for calling functions at the end of gui
initialization
This commit is contained in:
parent
17335545d4
commit
23c5ce7bc2
|
@ -51,6 +51,9 @@ def loop():
|
|||
|
||||
#lab = label.Label("Hello, World!")
|
||||
#vbox.pack(lab)
|
||||
if settings.has("gtkfuncs") == True:
|
||||
for func in settings.get("gtkfuncs", True):
|
||||
func([win,vbox,bar])
|
||||
|
||||
settings.set("guirunning",True)
|
||||
gtk.main()
|
||||
|
@ -59,6 +62,7 @@ def loop():
|
|||
# Called every time the plugin is enabled
|
||||
def open():
|
||||
settings.init("guirunning",False)
|
||||
#settings.init("gtkfuncs", [])
|
||||
if settings.get("guirunning") == True:
|
||||
settings.set("loop",loop)
|
||||
pass
|
||||
|
@ -67,6 +71,7 @@ def open():
|
|||
# Called every time the plugin is stopped
|
||||
def close():
|
||||
gtk.main_quit()
|
||||
settings.delete("gtkfuncs")
|
||||
pass
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue