Add API to get the mime types
This commit is contained in:
parent
27a3644dab
commit
98c5c0734e
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user