Adapt to object icons name changes.
This commit is contained in:
parent
a79a3198c5
commit
01c15298b8
@ -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):
|
||||||
|
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user