diff options
author | Marco Pesenti Gritti <marco@localhost.localdomain> | 2006-07-15 10:31:06 (GMT) |
---|---|---|
committer | Marco Pesenti Gritti <marco@localhost.localdomain> | 2006-07-15 10:31:06 (GMT) |
commit | 21b46a002256f7004c45c7ac379a93ce75d7834f (patch) | |
tree | 35474ae2d15f152a9a09b9b3d142363a669579e0 /shell/ActivityRegistry.py | |
parent | db08c3795f5e02245477126e8eb19e0049303332 (diff) |
Bunch of fixes, sharing should be back to work
Diffstat (limited to 'shell/ActivityRegistry.py')
-rw-r--r-- | shell/ActivityRegistry.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/shell/ActivityRegistry.py b/shell/ActivityRegistry.py index 6d296bb..70a502f 100644 --- a/shell/ActivityRegistry.py +++ b/shell/ActivityRegistry.py @@ -44,6 +44,13 @@ class ActivityRegistry: def __init__(self): self._activities = [] + def get_activity(self, default_type): + """Returns an activity given his default type""" + for activity in self._activities: + if activity.get_default_type() == default_type: + return activity + return None + def scan_directory(self, path): """Scan a directory for activities and add them to the registry.""" if os.path.isdir(path): |