Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/services
diff options
context:
space:
mode:
authorTomeu Vizoso <tomeu@tomeuvizoso.net>2007-08-21 14:53:42 (GMT)
committer Tomeu Vizoso <tomeu@tomeuvizoso.net>2007-08-21 14:53:42 (GMT)
commit2be1cdbab3dcb3a174385ed2b4f7a825343324de (patch)
treefffe43d3d9a5ce3eeb8f0556fc32ada33f6a69e3 /services
parent254433a3935cfa736f10aa918435ed5e11f4a53c (diff)
Add Audio and Video file types.
Diffstat (limited to 'services')
-rw-r--r--services/shell/objecttypeservice.py28
1 files changed, 21 insertions, 7 deletions
diff --git a/services/shell/objecttypeservice.py b/services/shell/objecttypeservice.py
index f949375..20dc956 100644
--- a/services/shell/objecttypeservice.py
+++ b/services/shell/objecttypeservice.py
@@ -30,15 +30,28 @@ class ObjectTypeRegistry(dbus.service.Object):
self._types = {}
- self._add_primitive('Text', _('Text'), 'theme:text',
- [ 'text/plain', 'text/rtf', 'application/pdf',
+ self._add_primitive('Text', _('Text'), 'theme:text-x-generic',
+ ['text/plain', 'text/rtf', 'application/pdf',
'application/x-pdf', 'text/html',
'application/vnd.oasis.opendocument.text',
- 'application/rtf', 'text/rtf' ])
- self._add_primitive('Image', _('Image'), 'theme:image',
- [ 'image/png', 'image/gif', 'image/jpeg' ])
- self._add_primitive('Audio', _('Audio'), 'theme:audio', [ 'audio/ogg' ])
- self._add_primitive('Video', _('Video'), 'theme:video', [ 'video/ogg' ])
+ 'application/rtf', 'text/rtf'])
+
+ self._add_primitive('Image', _('Image'), 'theme:image-x-generic',
+ ['image/png', 'image/gif', 'image/jpeg'])
+
+ self._add_primitive('Audio', _('Audio'), 'theme:audio-x-generic',
+ ['audio/ogg'])
+
+ self._add_primitive('Video', _('Video'), 'theme:video-x-generic',
+ ['video/ogg'])
+
+ self._add_primitive('Etoys project', _('Etoys project'),
+ 'theme:application-x-squeak-project',
+ ['application/x-squeak-project'])
+
+ self._add_primitive('Link', _('Link'),
+ 'theme:text-uri-list',
+ ['text/x-moz-url', 'text/uri-list'])
def _add_primitive(self, type_id, name, icon, mime_types):
object_type = {'type_id': type_id,
@@ -51,6 +64,7 @@ class ObjectTypeRegistry(dbus.service.Object):
for object_type in self._types.values():
if mime_type in object_type['mime_types']:
return object_type
+ return None
@dbus.service.method(_REGISTRY_IFACE,
in_signature="s", out_signature="a{sv}")