Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/shell
diff options
context:
space:
mode:
authorMarco Pesenti Gritti <marco@localhost.localdomain>2007-05-27 18:43:31 (GMT)
committer Marco Pesenti Gritti <marco@localhost.localdomain>2007-05-27 18:43:31 (GMT)
commit11437e34849b77a84fa94ff9ea65d0ca8f6f35e3 (patch)
treef77b467814a70e7b4b1e13c9e006bbd7a51c076b /shell
parent42fef182f4a2853cd7da0c550f77a81c5f749d90 (diff)
Add mime matching to the registry.
Diffstat (limited to 'shell')
-rw-r--r--shell/shellservice.py12
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