diff options
Diffstat (limited to 'shell/shellservice.py')
-rw-r--r-- | shell/shellservice.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/shell/shellservice.py b/shell/shellservice.py index 4e8f469..e6d11bf 100644 --- a/shell/shellservice.py +++ b/shell/shellservice.py @@ -90,6 +90,18 @@ class ShellService(dbus.service.Object): return result + @dbus.service.method(_DBUS_ACTIVITY_REGISTRY_IFACE, + in_signature="s", out_signature="aa{sv}") + def GetActivitiesForType(self, mime_type): + result = [] + + for bundle in bundleregistry.get_registry(): + service_name = bundle.get_service_name().lower() + if mime_type in bundle.get_mime_types(): + result.append(self._get_activity_info(bundle).to_dict()) + + return result + @dbus.service.signal(_DBUS_OWNER_IFACE, signature="s") def ColorChanged(self, color): pass |