From 11437e34849b77a84fa94ff9ea65d0ca8f6f35e3 Mon Sep 17 00:00:00 2001 From: Marco Pesenti Gritti Date: Sun, 27 May 2007 18:43:31 +0000 Subject: Add mime matching to the registry. --- (limited to 'shell') 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 -- cgit v0.9.1