2007-03-03 Don Allingham <don@gramps-project.org>
* src/GrampsDb/_GrampsGEDDB.py: readonly database for GEDCOM * src/Editors/_EditNote.py: add additional fields * src/RelLib/_Note.py: cleanup * src/DisplayTabs/_NoteModel.py: display correctly * src/GrampsWidgets.py: readonly support for checkbox * src/glade/gramps.glade: note fixes * src/DisplayModels/_NoteModel.py: display data correctly * src/GrampsDbUtils/_GedcomParse.py: cleanup * example/gramps/example.gramps: new note support * example/gedcom/sample.ged: new note support svn: r8264
This commit is contained in:
@@ -26,6 +26,7 @@
|
||||
#-------------------------------------------------------------------------
|
||||
import time
|
||||
import logging
|
||||
import re
|
||||
log = logging.getLogger(".")
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
@@ -90,6 +91,11 @@ class NoteModel(BaseModel):
|
||||
|
||||
def column_preview(self,data):
|
||||
note = " ".join(data[2].split())
|
||||
note = re.sub(r'(<.*?>)', '', note)
|
||||
note = note.replace('&', '&')
|
||||
note = note.replace('<', '<')
|
||||
note = note.replace('>', '>')
|
||||
|
||||
if len(note) > 80:
|
||||
return note[:80]+"..."
|
||||
else:
|
||||
|
Reference in New Issue
Block a user