From 57e9789b8a4821e49c499e776a4411a86c244676 Mon Sep 17 00:00:00 2001 From: Marco Pesenti Gritti Date: Wed, 11 Apr 2007 16:33:13 +0200 Subject: [PATCH] Merge type definitions from the old registry. --- sugar/objects/typeregistry.py | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/sugar/objects/typeregistry.py b/sugar/objects/typeregistry.py index 342c50ee..e9f8feed 100644 --- a/sugar/objects/typeregistry.py +++ b/sugar/objects/typeregistry.py @@ -25,14 +25,30 @@ _text_type = { 'type_id' : 'Text', 'name' : _('Text'), 'icon' : 'theme:object-text', - 'formats' : [ 'text/plain', 'application/pdf' ] + 'formats' : [ 'text/plain', + 'application/pdf', + 'application/x-pdf', + 'application/msword', + 'application/rtf', + 'text/rtf', + 'application/x-abiword', + 'application/vnd.oasis.opendocument.text'] } _image_type = { 'type_id' : 'Image', 'name' : _('Image'), 'icon' : 'theme:object-image', - 'formats' : [ 'image/jpeg', 'image/gif', 'image/png' ] + 'formats' : [ 'image/jpeg', + 'image/gif', + 'image/png', + 'image/tiff' ] +} + +_other_type = { + 'type_id' : 'Other', + 'name' : _('Other'), + 'formats' : [] } class _RootNode(_TypeNode): @@ -61,8 +77,10 @@ class _TypeNode(list): class TypeRegistry(object): def __init__(self): self._tree = _RootNode() + self._tree.append_primitive(_image_type) self._tree.append_primitive(_text_type) + self._tree.append_primitive(_other_type) self._bundle_registry = bundleregistry.get_registry() for bundle in self._bundle_registry: