a few tweaks

This commit is contained in:
David Rose 2009-10-25 21:39:41 +00:00
parent fa500f10a3
commit a36bc45d08
2 changed files with 9 additions and 1 deletions

View File

@ -804,7 +804,7 @@ class AppRunner(DirectObject):
plugin takes down the splash window when it sees the plugin takes down the splash window when it sees the
onwindowopen notification. """ onwindowopen notification. """
self.sendRequest('notify', message) self.sendRequest('notify', message.lower())
def evalScript(self, expression, needsResponse = False): def evalScript(self, expression, needsResponse = False):
""" Evaluates an arbitrary JavaScript expression in the global """ Evaluates an arbitrary JavaScript expression in the global

View File

@ -13,6 +13,11 @@ class DWBPackageInstaller(DirectWaitBar, PackageInstaller):
Specify updateText = True (the default) to update the text label Specify updateText = True (the default) to update the text label
with the name of the package or False to leave it up to you to set with the name of the package or False to leave it up to you to set
it. it.
You can specify a callback function with finished = func; this
function will be called, with one boolean parameter, when the
download has completed. The parameter will be true on success, or
false on failure.
""" """
def __init__(self, appRunner, parent = None, **kw): def __init__(self, appRunner, parent = None, **kw):
@ -30,6 +35,7 @@ class DWBPackageInstaller(DirectWaitBar, PackageInstaller):
('text_scale', 0.1, None), ('text_scale', 0.1, None),
('perPackage', False, None), ('perPackage', False, None),
('updateText', True, None), ('updateText', True, None),
('finished', None, None),
) )
self.defineoptions(kw, optiondefs) self.defineoptions(kw, optiondefs)
DirectWaitBar.__init__(self, parent, **kw) DirectWaitBar.__init__(self, parent, **kw)
@ -84,3 +90,5 @@ class DWBPackageInstaller(DirectWaitBar, PackageInstaller):
self.hide() self.hide()
if self['finished']:
self['finished'](success)