Add labels to SytledText and Note

This commit is contained in:
Doug Blank 2016-01-31 09:17:35 -05:00
parent c4e7d0ec25
commit 18ac940566
2 changed files with 20 additions and 0 deletions

View File

@ -141,6 +141,19 @@ class Note(BasicPrimaryObject):
"private": bool,
}
@classmethod
def get_labels(cls, _):
return {
"handle": _("Handle"),
"gramps_id": _("Gramps ID"),
"text": _("Text"),
"format": _("Format"),
"type": _("Type"),
"change": _("Last changed"),
"tag_list": _("Tags"),
"private": _("Private"),
}
@classmethod
def from_struct(cls, struct):
"""

View File

@ -339,6 +339,13 @@ class StyledText(object):
"tags": [StyledTextTag],
}
@classmethod
def get_labels(cls, _):
return {
"string": _("Text"),
"tags": _("Styled Text Tags"),
}
def unserialize(self, data):
"""
Convert a serialized tuple of data to an object.