示例#1
0
 def create_note(self, place, data, trans):
     new_note = Note()
     tag = StyledTextTag(StyledTextTagType.FONTFACE, 'Monospace',
                         [(0, len(data))])
     text = StyledText(data, [tag])
     new_note.set_styledtext(text)
     note_type = NoteType()
     note_type.set((NoteType.CUSTOM, _("Place titles")))
     new_note.set_type(note_type)
     handle = self.db.add_note(new_note, trans)
     place.add_note(handle)
示例#2
0
 def create_note(self, place, data, trans):
     new_note = Note()
     tag = StyledTextTag(StyledTextTagType.FONTFACE, 'Monospace',
                         [(0, len(data))])
     text = StyledText(data, [tag])
     new_note.set_styledtext(text)
     note_type = NoteType()
     note_type.set((NoteType.CUSTOM, _("Place titles")))
     new_note.set_type(note_type)
     handle = self.db.add_note(new_note, trans)
     place.add_note(handle)
示例#3
0
 def column_type(self, data):
     """Return the type of the Note in readable format."""
     temp = NoteType()
     temp.set(data[Note.POS_TYPE])
     return cuni(str(temp))
示例#4
0
 def column_type(self, data):
     """Return the type of the Note in readable format."""
     temp = NoteType()
     temp.set(data[Note.POS_TYPE])
     return str(temp)