Adapt to object icons name changes.

This commit is contained in:
Marco Pesenti Gritti 2007-08-16 13:06:39 +02:00
parent a79a3198c5
commit 01c15298b8
2 changed files with 5 additions and 4 deletions

View File

@ -17,6 +17,8 @@
import dbus import dbus
import dbus.service import dbus.service
from gettext import gettext as _
_REGISTRY_IFACE = "org.laptop.ObjectTypeRegistry" _REGISTRY_IFACE = "org.laptop.ObjectTypeRegistry"
_REGISTRY_PATH = "/org/laptop/ObjectTypeRegistry" _REGISTRY_PATH = "/org/laptop/ObjectTypeRegistry"
@ -28,12 +30,11 @@ class ObjectTypeRegistry(dbus.service.Object):
self._types = {} self._types = {}
from gettext import gettext as _ self._add_primitive('Text', _('Text'), 'theme: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' ]) 'application/vnd.oasis.opendocument.text' ])
self._add_primitive('Image', _('Image'), 'theme:object-image', self._add_primitive('Image', _('Image'), 'theme:image',
[ 'image/png', 'image/gif', 'image/jpeg' ]) [ 'image/png', 'image/gif', 'image/jpeg' ])
def _add_primitive(self, type_id, name, icon, mime_types): def _add_primitive(self, type_id, name, icon, mime_types):

View File

@ -88,7 +88,7 @@ class ClipboardIcon(CanvasIcon):
if icon_name: if icon_name:
self.props.icon_name = icon_name self.props.icon_name = icon_name
else: else:
self.props.icon_name = 'theme:object-generic' self.props.icon_name = 'theme:unknown-object'
self._name = name self._name = name
self._percent = percent self._percent = percent