2007-04-04 Don Allingham <don@gramps-project.org>

* src/DateHandler/_DateParser.py: fix text string that contians a valid
	modifier.
	* src/Editors/_EditPerson.py: disable OK button on save to prevent
	double clicks
	* src/Editors/_EditPrimary.py: disable OK button on save to prevent
	double clicks
	* src/docgen/ODFDoc.py: XML escape strings



svn: r8351
This commit is contained in:
Don Allingham 2007-04-05 02:46:56 +00:00
parent 6948cf26e2
commit 2fb4abbb1f
8 changed files with 72 additions and 58 deletions

View File

@ -1,3 +1,12 @@
2007-04-04 Don Allingham <don@gramps-project.org>
* src/DateHandler/_DateParser.py: fix text string that contians a valid
modifier.
* src/Editors/_EditPerson.py: disable OK button on save to prevent
double clicks
* src/Editors/_EditPrimary.py: disable OK button on save to prevent
double clicks
* src/docgen/ODFDoc.py: XML escape strings
2007-04-01 Benny Malengier <bm@cage.ugent.be> 2007-04-01 Benny Malengier <bm@cage.ugent.be>
* help/nl/nl.po: correct keyword error * help/nl/nl.po: correct keyword error
NarrativeWeb NarrativeWeb

View File

@ -1,4 +1,4 @@
# s#
# Gramps - a GTK+/GNOME based genealogy program # Gramps - a GTK+/GNOME based genealogy program
# #
# Copyright (C) 2002-2006 Donald N. Allingham # Copyright (C) 2002-2006 Donald N. Allingham

View File

@ -528,7 +528,10 @@ class DateParser:
grps = match.groups() grps = match.groups()
start = self._parse_subdate(grps[1], self.parser[cal]) start = self._parse_subdate(grps[1], self.parser[cal])
mod = self.modifier_to_int.get(grps[0].lower(), Date.MOD_NONE) mod = self.modifier_to_int.get(grps[0].lower(), Date.MOD_NONE)
if bc: if start == Date.EMPTY:
date.set_modifier(Date.MOD_TEXTONLY)
date.set_text_value(text)
elif bc:
date.set(qual, mod, cal, self.invert_year(start)) date.set(qual, mod, cal, self.invert_year(start))
else: else:
date.set(qual, mod, cal, start) date.set(qual, mod, cal, start)

View File

@ -152,7 +152,6 @@ class EditEventRef(EditReference):
self.track, self.track,
self.db.readonly) self.db.readonly)
def _create_tabbed_pages(self): def _create_tabbed_pages(self):
""" """
Creates the notebook tabs and inserts them into the main Creates the notebook tabs and inserts them into the main

View File

@ -582,10 +582,12 @@ class EditPerson(EditPrimary):
Save the data. Save the data.
""" """
self.ok_button.set_sensitive(False)
if self.object_is_empty(): if self.object_is_empty():
ErrorDialog(_("Cannot save person"), ErrorDialog(_("Cannot save person"),
_("No data exists for this person. Please " _("No data exists for this person. Please "
"enter data or cancel the edit.")) "enter data or cancel the edit."))
self.ok_button.set_sensitive(True)
return return
self._check_for_unknown_gender() self._check_for_unknown_gender()

View File

@ -44,6 +44,7 @@ class EditPrimary(ManagedWindow.ManagedWindow):
self.callback = callback self.callback = callback
self.signal_keys = [] self.signal_keys = []
self.get_from_handle = get_from_handle self.get_from_handle = get_from_handle
self.ok_button = None
ManagedWindow.ManagedWindow.__init__(self, uistate, track, obj) ManagedWindow.ManagedWindow.__init__(self, uistate, track, obj)
@ -108,6 +109,7 @@ class EditPrimary(ManagedWindow.ManagedWindow):
self.empty_object().serialize()[1:]) == 0 self.empty_object().serialize()[1:]) == 0
def define_ok_button(self,button,function): def define_ok_button(self,button,function):
self.ok_button = button
button.connect('clicked',function) button.connect('clicked',function)
button.set_sensitive(not self.db.readonly) button.set_sensitive(not self.db.readonly)

View File

@ -1,7 +1,6 @@
# This is the src/data level Makefile for gramps # This is the src/data level Makefile for gramps
# $Id$ # $Id$
# #
SUBDIRS = templates
pkgdatadir = $(datadir)/@PACKAGE@/data pkgdatadir = $(datadir)/@PACKAGE@/data
dist_pkgdata_DATA = \ dist_pkgdata_DATA = \

View File

@ -1113,7 +1113,7 @@ class ODFDoc(BaseDoc.BaseDoc):
self.cntnt.write('<text:span text:style-name="F%s">' % para_name) self.cntnt.write('<text:span text:style-name="F%s">' % para_name)
text = text.replace('\t','<text:tab-stop/>') text = text.replace('\t','<text:tab-stop/>')
text = text.replace('\n','<text:line-break/>') text = text.replace('\n','<text:line-break/>')
self.cntnt.write(text) self.cntnt.write(escape(text))
self.cntnt.write('</text:span>') self.cntnt.write('</text:span>')
self.cntnt.write('</text:p>\n') self.cntnt.write('</text:p>\n')
self.cntnt.write('</draw:rect>\n') self.cntnt.write('</draw:rect>\n')