Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/sugar/objects
diff options
context:
space:
mode:
authorMarco Pesenti Gritti <marco@localhost.localdomain>2007-04-11 14:33:13 (GMT)
committer Marco Pesenti Gritti <marco@localhost.localdomain>2007-04-11 14:33:13 (GMT)
commit57e9789b8a4821e49c499e776a4411a86c244676 (patch)
treeb3ed409286a65d4c968766e4226059ef0516ff77 /sugar/objects
parentfcb57779a275e8a3343b71f991c23cb98f5c1e7a (diff)
Merge type definitions from the old registry.
Diffstat (limited to 'sugar/objects')
-rw-r--r--sugar/objects/typeregistry.py22
1 files changed, 20 insertions, 2 deletions
diff --git a/sugar/objects/typeregistry.py b/sugar/objects/typeregistry.py
index 342c50e..e9f8fee 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: