From 8c1061b9a745198cc2c8498f42bd39fc6ddf7598 Mon Sep 17 00:00:00 2001 From: Alex Roitman Date: Thu, 10 Mar 2005 00:04:50 +0000 Subject: [PATCH] * src/ReadXML.py (start_childof): Use integer relations. * src/WriteXML.py (write_xml_data): Properly test frel. * src/rule.glade: Change button label; add "need to close" label. * src/EditPlace.py: Typo. svn: r4149 --- gramps2/ChangeLog | 5 +++ gramps2/src/EditPlace.py | 2 +- gramps2/src/ReadXML.py | 4 +- gramps2/src/WriteXML.py | 16 ++++---- gramps2/src/rule.glade | 87 ++++++++++++++++++++++++++++++++++++++-- 5 files changed, 98 insertions(+), 16 deletions(-) diff --git a/gramps2/ChangeLog b/gramps2/ChangeLog index 76a609600..ed3f1f414 100644 --- a/gramps2/ChangeLog +++ b/gramps2/ChangeLog @@ -16,6 +16,11 @@ * src/data/gramps.schemas: Place dont-ask key into interface dir. * src/Marriage.py (did_data_change): Compare gramps_id, not handle. + * src/ReadXML.py (start_childof): Use integer relations. + * src/WriteXML.py (write_xml_data): Properly test frel. + * src/rule.glade: Change button label; add "need to close" label. + * src/EditPlace.py: Typo. + 2005-03-09 Don Allingham * src/NameEdit.py: assign date on close diff --git a/gramps2/src/EditPlace.py b/gramps2/src/EditPlace.py index 6a9073bb8..f80c367b6 100644 --- a/gramps2/src/EditPlace.py +++ b/gramps2/src/EditPlace.py @@ -55,7 +55,7 @@ import NameDisplay # #------------------------------------------------------------------------- pycode_tgts = [ - ('url' , 0, 0) + ('url' , 0, 0), ('srcref', 0, 4)] #------------------------------------------------------------------------- diff --git a/gramps2/src/ReadXML.py b/gramps2/src/ReadXML.py index d0feeba07..074361d83 100644 --- a/gramps2/src/ReadXML.py +++ b/gramps2/src/ReadXML.py @@ -797,14 +797,14 @@ class GrampsParser: if attrs.has_key("mrel"): try: - mrel = const.child_rel_notrans[attrs["mrel"]] + mrel = const.child_rel_notrans.index(attrs["mrel"]) except: mrel = RelLib.Person.CHILD_REL_NONE else: mrel = RelLib.Person.CHILD_REL_BIRTH if attrs.has_key("frel"): try: - frel = const.child_rel_notrans[attrs["frel"]] + frel = const.child_rel_notrans.index(attrs["frel"]) except: frel = RelLib.Person.CHILD_REL_NONE else: diff --git a/gramps2/src/WriteXML.py b/gramps2/src/WriteXML.py index 1ee5943bc..6ae924f78 100644 --- a/gramps2/src/WriteXML.py +++ b/gramps2/src/WriteXML.py @@ -1,7 +1,7 @@ # # Gramps - a GTK+/GNOME based genealogy program # -# Copyright (C) 2000-2004 Donald N. Allingham +# Copyright (C) 2000-2005 Donald N. Allingham # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -30,11 +30,11 @@ GRAMPS' XML file format. # load standard python libraries # #------------------------------------------------------------------------- -import string import time import shutil import os import codecs +from gettext import gettext as _ #------------------------------------------------------------------------- # @@ -51,8 +51,6 @@ import gtk import const import RelLib import Date - -from gettext import gettext as _ from QuestionDialog import ErrorDialog #------------------------------------------------------------------------- @@ -196,7 +194,7 @@ class XmlWriter: def write_xml_data(self): - date = string.split(time.ctime(time.time())) + date = time.ctime(time.time()).split() owner = self.db.get_researcher() person_len = self.db.get_number_of_people() family_len = len(self.db.get_family_handles()) @@ -211,7 +209,7 @@ class XmlWriter: self.g.write("\n") self.g.write("
\n") self.g.write(" ' % (val,format)) else: self.g.write('<%s>' % val) - self.g.write(self.fix(string.rstrip(text))) + self.g.write(self.fix(text.rstrip())) self.g.write("\n" % val) def write_text(self,val,text,indent=0): @@ -465,7 +463,7 @@ class XmlWriter: self.g.write(" " * indent) self.g.write('<%s>' % val) - self.g.write(self.fix(string.rstrip(text))) + self.g.write(self.fix(text.rstrip())) self.g.write("\n" % val) def dump_event(self,event,index=1): diff --git a/gramps2/src/rule.glade b/gramps2/src/rule.glade index 1fb07eee7..aec7737f3 100644 --- a/gramps2/src/rule.glade +++ b/gramps2/src/rule.glade @@ -411,7 +411,7 @@ 0 True - * + * False @@ -434,7 +434,7 @@ 0 True - * + * False @@ -544,12 +544,70 @@ True True True - gtk-close - True GTK_RELIEF_NORMAL True 0 + + + + True + 0.5 + 0.5 + 0 + 0 + 0 + 0 + 0 + 0 + + + + True + False + 2 + + + + True + gtk-ok + 4 + 0.5 + 0.5 + 0 + 0 + + + 0 + False + False + + + + + + True + Apply and close + True + False + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + + + 0 + False + False + + + + + + @@ -721,6 +779,27 @@ True + + + + True + Note: changes take effect only after this window is closed + False + False + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 6 + 0 + + + 0 + False + False + + 0