Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/shell/ActivityRegistry.py
diff options
context:
space:
mode:
Diffstat (limited to 'shell/ActivityRegistry.py')
-rw-r--r--shell/ActivityRegistry.py7
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):