diff --git a/gramps2/ChangeLog b/gramps2/ChangeLog index b36af96df..ad46b694f 100644 --- a/gramps2/ChangeLog +++ b/gramps2/ChangeLog @@ -1,3 +1,7 @@ +2006-09-04 Don Allingham + * src/GrampsDb/_ReadGedcom.py: don't delete tabs + * src/DisplayTabs/_NoteTab.py: allow tabs to be entered + 2006-09-03 Don Allingham * src/ScratchPad.py: add dnd support for MediaRefs (bug #417) * src/DdTargets.py: add dnd support for MediaRefs (bug #417) diff --git a/gramps2/src/DisplayTabs/_NoteTab.py b/gramps2/src/DisplayTabs/_NoteTab.py index c1d293f33..269d43426 100644 --- a/gramps2/src/DisplayTabs/_NoteTab.py +++ b/gramps2/src/DisplayTabs/_NoteTab.py @@ -77,6 +77,8 @@ class NoteTab(GrampsTab): vbox = gtk.VBox() self.text = gtk.TextView() + self.text.set_accepts_tab(True) + self.flowed = gtk.RadioButton(None, _('Flowed')) self.format = gtk.RadioButton(self.flowed, _('Formatted')) @@ -106,7 +108,7 @@ class NoteTab(GrampsTab): hbox.pack_start(self.format, False) vbox.pack_start(hbox, False) - + self.pack_start(vbox, True) self.buf = self.text.get_buffer() if self.note_obj: diff --git a/gramps2/src/GrampsDb/_ReadGedcom.py b/gramps2/src/GrampsDb/_ReadGedcom.py index 39f90b966..d7778d9aa 100644 --- a/gramps2/src/GrampsDb/_ReadGedcom.py +++ b/gramps2/src/GrampsDb/_ReadGedcom.py @@ -149,7 +149,7 @@ _event_family_str = _("%(event_name)s of %(family)s") _event_person_str = _("%(event_name)s of %(person)s") _transtable = string.maketrans('','') -_delc = _transtable[0:31] +_delc = _transtable[0:8] + _transtable[10:31] _transtable2 = _transtable[0:128] + ('?' * 128) #------------------------------------------------------------------------- @@ -353,7 +353,7 @@ class NoteParser: self.person_count = 0 f = open(filename,"rU") innote = False - + for line in f: try: text = string.translate(line,_transtable,_delc) @@ -393,7 +393,7 @@ class NoteParser: self.person_count += 1 f.close() - + def get_map(self): return self.name_map @@ -959,8 +959,7 @@ class GedcomParser(UpdateCallback): source.add_attribute(a) def func_source_text(self, matches, source, level): - note = source.get_note() - source.set_note(note.strip()) + source.set_note(matches[2]) def func_source_note(self, matches, source, level): note = self.parse_note(matches, source, level+1, '')