2006-09-04 Don Allingham <don@gramps-project.org>
* src/GrampsDb/_ReadGedcom.py: don't delete tabs * src/DisplayTabs/_NoteTab.py: allow tabs to be entered svn: r7302
This commit is contained in:
parent
81e5d2a251
commit
2d4d9c84c4
@ -1,3 +1,7 @@
|
|||||||
|
2006-09-04 Don Allingham <don@gramps-project.org>
|
||||||
|
* src/GrampsDb/_ReadGedcom.py: don't delete tabs
|
||||||
|
* src/DisplayTabs/_NoteTab.py: allow tabs to be entered
|
||||||
|
|
||||||
2006-09-03 Don Allingham <don@gramps-project.org>
|
2006-09-03 Don Allingham <don@gramps-project.org>
|
||||||
* src/ScratchPad.py: add dnd support for MediaRefs (bug #417)
|
* src/ScratchPad.py: add dnd support for MediaRefs (bug #417)
|
||||||
* src/DdTargets.py: add dnd support for MediaRefs (bug #417)
|
* src/DdTargets.py: add dnd support for MediaRefs (bug #417)
|
||||||
|
@ -77,6 +77,8 @@ class NoteTab(GrampsTab):
|
|||||||
vbox = gtk.VBox()
|
vbox = gtk.VBox()
|
||||||
|
|
||||||
self.text = gtk.TextView()
|
self.text = gtk.TextView()
|
||||||
|
self.text.set_accepts_tab(True)
|
||||||
|
|
||||||
self.flowed = gtk.RadioButton(None, _('Flowed'))
|
self.flowed = gtk.RadioButton(None, _('Flowed'))
|
||||||
self.format = gtk.RadioButton(self.flowed, _('Formatted'))
|
self.format = gtk.RadioButton(self.flowed, _('Formatted'))
|
||||||
|
|
||||||
@ -106,7 +108,7 @@ class NoteTab(GrampsTab):
|
|||||||
hbox.pack_start(self.format, False)
|
hbox.pack_start(self.format, False)
|
||||||
|
|
||||||
vbox.pack_start(hbox, False)
|
vbox.pack_start(hbox, False)
|
||||||
|
|
||||||
self.pack_start(vbox, True)
|
self.pack_start(vbox, True)
|
||||||
self.buf = self.text.get_buffer()
|
self.buf = self.text.get_buffer()
|
||||||
if self.note_obj:
|
if self.note_obj:
|
||||||
|
@ -149,7 +149,7 @@ _event_family_str = _("%(event_name)s of %(family)s")
|
|||||||
_event_person_str = _("%(event_name)s of %(person)s")
|
_event_person_str = _("%(event_name)s of %(person)s")
|
||||||
|
|
||||||
_transtable = string.maketrans('','')
|
_transtable = string.maketrans('','')
|
||||||
_delc = _transtable[0:31]
|
_delc = _transtable[0:8] + _transtable[10:31]
|
||||||
_transtable2 = _transtable[0:128] + ('?' * 128)
|
_transtable2 = _transtable[0:128] + ('?' * 128)
|
||||||
|
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
@ -353,7 +353,7 @@ class NoteParser:
|
|||||||
self.person_count = 0
|
self.person_count = 0
|
||||||
f = open(filename,"rU")
|
f = open(filename,"rU")
|
||||||
innote = False
|
innote = False
|
||||||
|
|
||||||
for line in f:
|
for line in f:
|
||||||
try:
|
try:
|
||||||
text = string.translate(line,_transtable,_delc)
|
text = string.translate(line,_transtable,_delc)
|
||||||
@ -393,7 +393,7 @@ class NoteParser:
|
|||||||
self.person_count += 1
|
self.person_count += 1
|
||||||
|
|
||||||
f.close()
|
f.close()
|
||||||
|
|
||||||
def get_map(self):
|
def get_map(self):
|
||||||
return self.name_map
|
return self.name_map
|
||||||
|
|
||||||
@ -959,8 +959,7 @@ class GedcomParser(UpdateCallback):
|
|||||||
source.add_attribute(a)
|
source.add_attribute(a)
|
||||||
|
|
||||||
def func_source_text(self, matches, source, level):
|
def func_source_text(self, matches, source, level):
|
||||||
note = source.get_note()
|
source.set_note(matches[2])
|
||||||
source.set_note(note.strip())
|
|
||||||
|
|
||||||
def func_source_note(self, matches, source, level):
|
def func_source_note(self, matches, source, level):
|
||||||
note = self.parse_note(matches, source, level+1, '')
|
note = self.parse_note(matches, source, level+1, '')
|
||||||
|
Loading…
Reference in New Issue
Block a user