Merge branch 'master' of git+ssh://dev.laptop.org/git/sugar
This commit is contained in:
commit
c5ab58ed6c
@ -31,7 +31,8 @@ class ObjectTypeRegistry(dbus.service.Object):
|
|||||||
from gettext import gettext as _
|
from gettext import gettext as _
|
||||||
self._add_primitive('Text', _('Text'), 'theme:object-text',
|
self._add_primitive('Text', _('Text'), 'theme:object-text',
|
||||||
[ 'text/plain', 'text/rtf', 'application/pdf',
|
[ 'text/plain', 'text/rtf', 'application/pdf',
|
||||||
'application/x-pdf', 'text/html' ])
|
'application/x-pdf', 'text/html',
|
||||||
|
'application/vnd.oasis.opendocument.text' ])
|
||||||
self._add_primitive('Image', _('Image'), 'theme:object-image',
|
self._add_primitive('Image', _('Image'), 'theme:object-image',
|
||||||
[ 'image/png', 'image/gif', 'image/jpeg' ])
|
[ 'image/png', 'image/gif', 'image/jpeg' ])
|
||||||
|
|
||||||
|
@ -51,7 +51,7 @@ def delete(uid):
|
|||||||
|
|
||||||
def get_properties(uid):
|
def get_properties(uid):
|
||||||
logging.debug('dbus_helpers.get_properties: %s' % uid)
|
logging.debug('dbus_helpers.get_properties: %s' % uid)
|
||||||
return _data_store.get_properties(uid)
|
return _data_store.get_properties(uid, [])
|
||||||
|
|
||||||
def get_filename(uid):
|
def get_filename(uid):
|
||||||
filename = _data_store.get_filename(uid)
|
filename = _data_store.get_filename(uid)
|
||||||
|
@ -25,16 +25,17 @@ def _object_type_from_dict(info_dict):
|
|||||||
if info_dict:
|
if info_dict:
|
||||||
return ObjectType(info_dict['type_id'],
|
return ObjectType(info_dict['type_id'],
|
||||||
info_dict['name'],
|
info_dict['name'],
|
||||||
info_dict['icon'])
|
info_dict['icon'],
|
||||||
|
info_dict['mime_types'])
|
||||||
else:
|
else:
|
||||||
return None
|
return None
|
||||||
|
|
||||||
class ObjectType(object):
|
class ObjectType(object):
|
||||||
def __init__(self, type_id, name, icon):
|
def __init__(self, type_id, name, icon, mime_types):
|
||||||
self.type_id = type_id
|
self.type_id = type_id
|
||||||
self.name = name
|
self.name = name
|
||||||
self.icon = icon
|
self.icon = icon
|
||||||
self.mime_types = []
|
self.mime_types = mime_types
|
||||||
|
|
||||||
class ObjectTypeRegistry(object):
|
class ObjectTypeRegistry(object):
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
|
Loading…
Reference in New Issue
Block a user