* src/StartupDialog.py: fix close

* src/plugins/Desbrowser.py: Use ActivPersonTool
	* src/PluginUtils/_Tool.py: active person tool added


svn: r6412
This commit is contained in:
Don Allingham
2006-04-22 04:48:40 +00:00
parent 64b7cb7ad1
commit 3ee48954ea
6 changed files with 41 additions and 20 deletions

View File

@ -96,6 +96,28 @@ class Tool:
pass
class ActivePersonTool(Tool):
"""
The Tool base class. This is a base class for generating
customized tools. It cannot be used as is, but it can be easily
sub-classed to create a functional tool.
"""
def __init__(self, dbstate, options_class, name):
if not dbstate.get_active_person():
from QuestionDialog import ErrorDialog
ErrorDialog(_('Active person has not been set'),
_('You must select an active person for this '
'tool to work properly.'))
self.fail = True
return
Tool.__init__(self, dbstate, options_class, name)
self.fail = False
#------------------------------------------------------------------------
#
# Command-line tool