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)
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))
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)