Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/sugar/activity/bundle.py
diff options
context:
space:
mode:
authorMarco Pesenti Gritti <marco@localhost.localdomain>2007-05-24 15:53:57 (GMT)
committer Marco Pesenti Gritti <marco@localhost.localdomain>2007-05-24 15:53:57 (GMT)
commit98c5c0734ecfbf3e996b80bbe0b615e63b94295a (patch)
treeb90c5ade24543d0e5cedf395d636fe8260fbce1d /sugar/activity/bundle.py
parent27a3644daba79f877d7528517d4e3a58da5c40fd (diff)
Add API to get the mime types
Diffstat (limited to 'sugar/activity/bundle.py')
-rw-r--r--sugar/activity/bundle.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/sugar/activity/bundle.py b/sugar/activity/bundle.py
index d3c490f..1ef30dd 100644
--- a/sugar/activity/bundle.py
+++ b/sugar/activity/bundle.py
@@ -42,6 +42,7 @@ class Bundle:
self._name = None
self._icon = None
self._service_name = None
+ self._mime_types = None
self._show_launcher = True
self._valid = True
self._path = path
@@ -91,6 +92,10 @@ class Bundle:
self._valid = False
logging.error('%s must specify exec or class' % self._path)
+ if cp.has_option(section, 'mime_types'):
+ mime_list = cp.get(section, 'show_launcher')
+ self._mime_types = mime_list.strip(';')
+
if cp.has_option(section, 'show_launcher'):
if cp.get(section, 'show_launcher') == 'no':
self._show_launcher = False
@@ -166,6 +171,10 @@ class Bundle:
"""Get the main Activity class"""
return self._class
+ def get_mime_types(self):
+ """Get the MIME types supported by the activity"""
+ return self._mime_types
+
def get_show_launcher(self):
"""Get whether there should be a visible launcher for the activity"""
return self._show_launcher