* 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
This commit is contained in:
Alex Roitman 2005-03-10 00:04:50 +00:00
parent d5e54d4ed4
commit 4c545b90d0
5 changed files with 98 additions and 16 deletions

View File

@ -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 <don@gramps-project.org>
* src/NameEdit.py: assign date on close

View File

@ -55,7 +55,7 @@ import NameDisplay
#
#-------------------------------------------------------------------------
pycode_tgts = [
('url' , 0, 0)
('url' , 0, 0),
('srcref', 0, 4)]
#-------------------------------------------------------------------------

View File

@ -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:

View File

@ -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("<database xmlns=\"http://gramps.sourceforge.net/database\">\n")
self.g.write(" <header>\n")
self.g.write(" <created date=\"%s %s %s\"" % \
(date[2],string.upper(date[1]),date[4]))
(date[2],date[1].upper(),date[4]))
self.g.write(" version=\"" + const.version + "\"")
self.g.write(" people=\"%d\"" % person_len)
self.g.write(" families=\"%d\"" % family_len)
@ -304,7 +302,7 @@ class XmlWriter:
mrel=' mrel="%s"' % const.child_rel_notrans[alt[1]]
else:
mrel=''
if alt[2] != "Birth":
if alt[2] != RelLib.Person.CHILD_REL_BIRTH:
frel=' frel="%s"' % const.child_rel_notrans[alt[2]]
else:
frel=''
@ -455,7 +453,7 @@ class XmlWriter:
self.g.write('<%s format="%d">' % (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("</%s>\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("</%s>\n" % val)
def dump_event(self,event,index=1):

View File

@ -411,7 +411,7 @@
<property name="max_length">0</property>
<property name="text" translatable="yes"></property>
<property name="has_frame">True</property>
<property name="invisible_char" translatable="yes">*</property>
<property name="invisible_char">*</property>
<property name="activates_default">False</property>
<signal name="changed" handler="on_filter_name_changed"/>
</widget>
@ -434,7 +434,7 @@
<property name="max_length">0</property>
<property name="text" translatable="yes"></property>
<property name="has_frame">True</property>
<property name="invisible_char" translatable="yes">*</property>
<property name="invisible_char">*</property>
<property name="activates_default">False</property>
</widget>
<packing>
@ -544,12 +544,70 @@
<property name="visible">True</property>
<property name="can_default">True</property>
<property name="can_focus">True</property>
<property name="label">gtk-close</property>
<property name="use_stock">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
<property name="focus_on_click">True</property>
<property name="response_id">0</property>
<signal name="clicked" handler="on_close_clicked"/>
<child>
<widget class="GtkAlignment" id="alignment1">
<property name="visible">True</property>
<property name="xalign">0.5</property>
<property name="yalign">0.5</property>
<property name="xscale">0</property>
<property name="yscale">0</property>
<property name="top_padding">0</property>
<property name="bottom_padding">0</property>
<property name="left_padding">0</property>
<property name="right_padding">0</property>
<child>
<widget class="GtkHBox" id="hbox6">
<property name="visible">True</property>
<property name="homogeneous">False</property>
<property name="spacing">2</property>
<child>
<widget class="GtkImage" id="image1">
<property name="visible">True</property>
<property name="stock">gtk-ok</property>
<property name="icon_size">4</property>
<property name="xalign">0.5</property>
<property name="yalign">0.5</property>
<property name="xpad">0</property>
<property name="ypad">0</property>
</widget>
<packing>
<property name="padding">0</property>
<property name="expand">False</property>
<property name="fill">False</property>
</packing>
</child>
<child>
<widget class="GtkLabel" id="label29">
<property name="visible">True</property>
<property name="label">Apply and close</property>
<property name="use_underline">True</property>
<property name="use_markup">False</property>
<property name="justify">GTK_JUSTIFY_LEFT</property>
<property name="wrap">False</property>
<property name="selectable">False</property>
<property name="xalign">0.5</property>
<property name="yalign">0.5</property>
<property name="xpad">0</property>
<property name="ypad">0</property>
</widget>
<packing>
<property name="padding">0</property>
<property name="expand">False</property>
<property name="fill">False</property>
</packing>
</child>
</widget>
</child>
</widget>
</child>
</widget>
</child>
</widget>
@ -721,6 +779,27 @@
<property name="fill">True</property>
</packing>
</child>
<child>
<widget class="GtkLabel" id="label30">
<property name="visible">True</property>
<property name="label" translatable="yes">Note: changes take effect only after this window is closed</property>
<property name="use_underline">False</property>
<property name="use_markup">False</property>
<property name="justify">GTK_JUSTIFY_LEFT</property>
<property name="wrap">False</property>
<property name="selectable">False</property>
<property name="xalign">0.5</property>
<property name="yalign">0.5</property>
<property name="xpad">6</property>
<property name="ypad">0</property>
</widget>
<packing>
<property name="padding">0</property>
<property name="expand">False</property>
<property name="fill">False</property>
</packing>
</child>
</widget>
<packing>
<property name="padding">0</property>