Made a settings value for calling functions at the end of gui

initialization
This commit is contained in:
bjschuma 2010-01-16 12:25:48 -05:00
parent 17335545d4
commit 23c5ce7bc2
1 changed files with 5 additions and 0 deletions

View File

@ -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