Added support for marriage types, along with more translation information
svn: r60
This commit is contained in:
parent
f55040fea3
commit
0ce5ae5ff4
@ -89,6 +89,8 @@ usetabs = 0
|
||||
hide_altnames = 0
|
||||
lastfile = None
|
||||
nameof = utils.normal_name
|
||||
display_attr = 0
|
||||
attr_name = ""
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
@ -132,6 +134,8 @@ def loadConfig(call):
|
||||
global hide_altnames
|
||||
global lastfile
|
||||
global nameof
|
||||
global display_attr
|
||||
global attr_name
|
||||
global _druid
|
||||
global _name_format
|
||||
global _callback
|
||||
@ -139,6 +143,9 @@ def loadConfig(call):
|
||||
_callback = call
|
||||
lastfile = gnome.config.get_string("/gramps/data/LastFile")
|
||||
usetabs = gnome.config.get_bool("/gramps/config/UseTabs")
|
||||
display_attr = gnome.config.get_bool("/gramps/config/DisplayAttr")
|
||||
attr_name = gnome.config.get_string("/gramps/config/DisplayAttrName")
|
||||
|
||||
hide_altnames = gnome.config.get_bool("/gramps/config/DisplayAltNames")
|
||||
autoload = gnome.config.get_bool("/gramps/config/autoLoad")
|
||||
dateFormat = gnome.config.get_int("/gramps/config/dateFormat")
|
||||
@ -163,6 +170,12 @@ def loadConfig(call):
|
||||
ListColors.evenfg = get_config_color(EVENFGCOLOR,(0,0,0))
|
||||
ListColors.evenbg = get_config_color(EVENBGCOLOR,(0xffff,0xffff,0xffff))
|
||||
|
||||
if display_attr == None:
|
||||
display_attr = 0
|
||||
|
||||
if attr_name == None:
|
||||
attr_name = ""
|
||||
|
||||
if autoload == None:
|
||||
autoload = 1
|
||||
if usetabs == None:
|
||||
@ -252,16 +265,22 @@ def on_propertybox_apply(obj,page):
|
||||
global nameof
|
||||
global owner
|
||||
global usetabs
|
||||
global display_attr
|
||||
global attr_name
|
||||
global hide_altnames
|
||||
|
||||
if page != -1:
|
||||
return
|
||||
|
||||
autoload = prefsTop.get_widget("autoload").get_active()
|
||||
display_attr = prefsTop.get_widget("attr_display").get_active()
|
||||
attr_name = string.strip(prefsTop.get_widget("attr_name").get_text())
|
||||
usetabs = prefsTop.get_widget("usetabs").get_active()
|
||||
hide_altnames = prefsTop.get_widget("display_altnames").get_active()
|
||||
|
||||
gnome.config.set_bool("/gramps/config/UseTabs",usetabs)
|
||||
gnome.config.set_bool("/gramps/config/DisplayAttr",display_attr)
|
||||
gnome.config.set_string("/gramps/config/DisplayAttrName",attr_name)
|
||||
gnome.config.set_bool("/gramps/config/autoLoad",autoload)
|
||||
gnome.config.set_bool("/gramps/config/DisplayAltNames",hide_altnames)
|
||||
|
||||
@ -389,9 +408,14 @@ def display_preferences_box():
|
||||
pbox = prefsTop.get_widget("propertybox")
|
||||
auto = prefsTop.get_widget("autoload")
|
||||
tabs = prefsTop.get_widget("usetabs")
|
||||
display_attr_obj = prefsTop.get_widget("attr_display")
|
||||
display_altnames = prefsTop.get_widget("display_altnames")
|
||||
auto.set_active(autoload)
|
||||
tabs.set_active(usetabs)
|
||||
|
||||
display_attr_obj.set_active(display_attr)
|
||||
prefsTop.get_widget("attr_name").set_text(attr_name)
|
||||
|
||||
display_altnames.set_active(hide_altnames)
|
||||
|
||||
date_option = prefsTop.get_widget("date_format")
|
||||
|
@ -80,7 +80,7 @@
|
||||
<widget>
|
||||
<class>GtkTable</class>
|
||||
<name>table14</name>
|
||||
<rows>3</rows>
|
||||
<rows>4</rows>
|
||||
<columns>2</columns>
|
||||
<homogeneous>False</homogeneous>
|
||||
<row_spacing>0</row_spacing>
|
||||
@ -100,8 +100,8 @@
|
||||
<child>
|
||||
<left_attach>0</left_attach>
|
||||
<right_attach>1</right_attach>
|
||||
<top_attach>2</top_attach>
|
||||
<bottom_attach>3</bottom_attach>
|
||||
<top_attach>3</top_attach>
|
||||
<bottom_attach>4</bottom_attach>
|
||||
<xpad>5</xpad>
|
||||
<ypad>5</ypad>
|
||||
<xexpand>False</xexpand>
|
||||
@ -176,6 +176,7 @@
|
||||
<widget>
|
||||
<class>GtkEntry</class>
|
||||
<name>birthDate</name>
|
||||
<width>250</width>
|
||||
<can_focus>True</can_focus>
|
||||
<editable>True</editable>
|
||||
<text_visible>True</text_visible>
|
||||
@ -232,8 +233,8 @@
|
||||
<child>
|
||||
<left_attach>1</left_attach>
|
||||
<right_attach>2</right_attach>
|
||||
<top_attach>2</top_attach>
|
||||
<bottom_attach>3</bottom_attach>
|
||||
<top_attach>3</top_attach>
|
||||
<bottom_attach>4</bottom_attach>
|
||||
<xpad>5</xpad>
|
||||
<ypad>5</ypad>
|
||||
<xexpand>True</xexpand>
|
||||
@ -308,6 +309,7 @@
|
||||
<widget>
|
||||
<class>GtkEntry</class>
|
||||
<name>deathDate</name>
|
||||
<width>250</width>
|
||||
<can_focus>True</can_focus>
|
||||
<editable>True</editable>
|
||||
<text_visible>True</text_visible>
|
||||
@ -356,35 +358,6 @@
|
||||
</widget>
|
||||
</widget>
|
||||
|
||||
<widget>
|
||||
<class>GtkFrame</class>
|
||||
<name>frame5</name>
|
||||
<label>Photo</label>
|
||||
<label_xalign>0</label_xalign>
|
||||
<shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
|
||||
<child>
|
||||
<left_attach>1</left_attach>
|
||||
<right_attach>2</right_attach>
|
||||
<top_attach>0</top_attach>
|
||||
<bottom_attach>2</bottom_attach>
|
||||
<xpad>5</xpad>
|
||||
<ypad>5</ypad>
|
||||
<xexpand>False</xexpand>
|
||||
<yexpand>False</yexpand>
|
||||
<xshrink>False</xshrink>
|
||||
<yshrink>False</yshrink>
|
||||
<xfill>True</xfill>
|
||||
<yfill>True</yfill>
|
||||
</child>
|
||||
|
||||
<widget>
|
||||
<class>GnomePixmap</class>
|
||||
<name>personPix</name>
|
||||
<width>200</width>
|
||||
<height>200</height>
|
||||
</widget>
|
||||
</widget>
|
||||
|
||||
<widget>
|
||||
<class>GtkFrame</class>
|
||||
<name>frame2</name>
|
||||
@ -737,6 +710,169 @@
|
||||
</widget>
|
||||
</widget>
|
||||
</widget>
|
||||
|
||||
<widget>
|
||||
<class>GtkFrame</class>
|
||||
<name>frame5</name>
|
||||
<label>Photo</label>
|
||||
<label_xalign>0</label_xalign>
|
||||
<shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
|
||||
<child>
|
||||
<left_attach>1</left_attach>
|
||||
<right_attach>2</right_attach>
|
||||
<top_attach>0</top_attach>
|
||||
<bottom_attach>3</bottom_attach>
|
||||
<xpad>5</xpad>
|
||||
<ypad>5</ypad>
|
||||
<xexpand>False</xexpand>
|
||||
<yexpand>False</yexpand>
|
||||
<xshrink>False</xshrink>
|
||||
<yshrink>False</yshrink>
|
||||
<xfill>True</xfill>
|
||||
<yfill>True</yfill>
|
||||
</child>
|
||||
|
||||
<widget>
|
||||
<class>GnomePixmap</class>
|
||||
<name>personPix</name>
|
||||
</widget>
|
||||
</widget>
|
||||
|
||||
<widget>
|
||||
<class>GtkFrame</class>
|
||||
<name>frame6</name>
|
||||
<label>Indentification</label>
|
||||
<label_xalign>0</label_xalign>
|
||||
<shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
|
||||
<child>
|
||||
<left_attach>0</left_attach>
|
||||
<right_attach>1</right_attach>
|
||||
<top_attach>2</top_attach>
|
||||
<bottom_attach>3</bottom_attach>
|
||||
<xpad>5</xpad>
|
||||
<ypad>5</ypad>
|
||||
<xexpand>False</xexpand>
|
||||
<yexpand>False</yexpand>
|
||||
<xshrink>False</xshrink>
|
||||
<yshrink>False</yshrink>
|
||||
<xfill>True</xfill>
|
||||
<yfill>True</yfill>
|
||||
</child>
|
||||
|
||||
<widget>
|
||||
<class>GtkTable</class>
|
||||
<name>table18</name>
|
||||
<rows>2</rows>
|
||||
<columns>2</columns>
|
||||
<homogeneous>False</homogeneous>
|
||||
<row_spacing>0</row_spacing>
|
||||
<column_spacing>0</column_spacing>
|
||||
|
||||
<widget>
|
||||
<class>GtkLabel</class>
|
||||
<name>gid</name>
|
||||
<label></label>
|
||||
<justify>GTK_JUSTIFY_CENTER</justify>
|
||||
<wrap>False</wrap>
|
||||
<xalign>0</xalign>
|
||||
<yalign>0.5</yalign>
|
||||
<xpad>0</xpad>
|
||||
<ypad>0</ypad>
|
||||
<child>
|
||||
<left_attach>1</left_attach>
|
||||
<right_attach>2</right_attach>
|
||||
<top_attach>0</top_attach>
|
||||
<bottom_attach>1</bottom_attach>
|
||||
<xpad>5</xpad>
|
||||
<ypad>5</ypad>
|
||||
<xexpand>True</xexpand>
|
||||
<yexpand>False</yexpand>
|
||||
<xshrink>False</xshrink>
|
||||
<yshrink>False</yshrink>
|
||||
<xfill>True</xfill>
|
||||
<yfill>False</yfill>
|
||||
</child>
|
||||
</widget>
|
||||
|
||||
<widget>
|
||||
<class>GtkLabel</class>
|
||||
<name>user_data</name>
|
||||
<label></label>
|
||||
<justify>GTK_JUSTIFY_CENTER</justify>
|
||||
<wrap>False</wrap>
|
||||
<xalign>0</xalign>
|
||||
<yalign>0.5</yalign>
|
||||
<xpad>0</xpad>
|
||||
<ypad>0</ypad>
|
||||
<child>
|
||||
<left_attach>1</left_attach>
|
||||
<right_attach>2</right_attach>
|
||||
<top_attach>1</top_attach>
|
||||
<bottom_attach>2</bottom_attach>
|
||||
<xpad>5</xpad>
|
||||
<ypad>5</ypad>
|
||||
<xexpand>True</xexpand>
|
||||
<yexpand>False</yexpand>
|
||||
<xshrink>False</xshrink>
|
||||
<yshrink>False</yshrink>
|
||||
<xfill>True</xfill>
|
||||
<yfill>False</yfill>
|
||||
</child>
|
||||
</widget>
|
||||
|
||||
<widget>
|
||||
<class>GtkLabel</class>
|
||||
<name>label152</name>
|
||||
<label>gramps ID : </label>
|
||||
<justify>GTK_JUSTIFY_CENTER</justify>
|
||||
<wrap>False</wrap>
|
||||
<xalign>1</xalign>
|
||||
<yalign>0.5</yalign>
|
||||
<xpad>0</xpad>
|
||||
<ypad>0</ypad>
|
||||
<child>
|
||||
<left_attach>0</left_attach>
|
||||
<right_attach>1</right_attach>
|
||||
<top_attach>0</top_attach>
|
||||
<bottom_attach>1</bottom_attach>
|
||||
<xpad>5</xpad>
|
||||
<ypad>5</ypad>
|
||||
<xexpand>False</xexpand>
|
||||
<yexpand>False</yexpand>
|
||||
<xshrink>False</xshrink>
|
||||
<yshrink>False</yshrink>
|
||||
<xfill>True</xfill>
|
||||
<yfill>False</yfill>
|
||||
</child>
|
||||
</widget>
|
||||
|
||||
<widget>
|
||||
<class>GtkLabel</class>
|
||||
<name>user_label</name>
|
||||
<label></label>
|
||||
<justify>GTK_JUSTIFY_CENTER</justify>
|
||||
<wrap>False</wrap>
|
||||
<xalign>1</xalign>
|
||||
<yalign>0.5</yalign>
|
||||
<xpad>0</xpad>
|
||||
<ypad>0</ypad>
|
||||
<child>
|
||||
<left_attach>0</left_attach>
|
||||
<right_attach>1</right_attach>
|
||||
<top_attach>1</top_attach>
|
||||
<bottom_attach>2</bottom_attach>
|
||||
<xpad>5</xpad>
|
||||
<ypad>5</ypad>
|
||||
<xexpand>False</xexpand>
|
||||
<yexpand>False</yexpand>
|
||||
<xshrink>False</xshrink>
|
||||
<yshrink>False</yshrink>
|
||||
<xfill>True</xfill>
|
||||
<yfill>False</yfill>
|
||||
</child>
|
||||
</widget>
|
||||
</widget>
|
||||
</widget>
|
||||
</widget>
|
||||
</widget>
|
||||
|
||||
|
@ -174,6 +174,20 @@ class EditPerson:
|
||||
birth = person.getBirth()
|
||||
death = person.getDeath()
|
||||
|
||||
self.get_widget("gid").set_text(str(person.getId()))
|
||||
if Config.display_attr:
|
||||
self.get_widget("user_label").set_text("%s : " % Config.attr_name)
|
||||
val = ""
|
||||
for attr in self.person.getAttributeList():
|
||||
if attr.getType() == Config.attr_name:
|
||||
val = attr.getValue()
|
||||
break
|
||||
self.get_widget("user_data").set_text(val)
|
||||
|
||||
else:
|
||||
self.get_widget("user_label").hide()
|
||||
self.get_widget("user_data").hide()
|
||||
|
||||
# initial values
|
||||
self.get_widget("activepersonTitle").set_text(Config.nameof(person))
|
||||
self.suffix.set_text(name.getSuffix())
|
||||
@ -1015,7 +1029,7 @@ def on_apply_person_clicked(obj):
|
||||
if error == 1:
|
||||
msg = _("Changing the gender caused problems with marriage information.")
|
||||
msg2 = _("Please check the person's marriages.")
|
||||
GnomeErrorDialog(msg + msg2)
|
||||
GnomeErrorDialog(msg + '\n' + msg2)
|
||||
|
||||
text = edit_person_obj.notes_field.get_chars(0,-1)
|
||||
if text != person.getNote():
|
||||
|
@ -269,6 +269,8 @@ class GrampsParser(handler.ContentHandler):
|
||||
self.family = self.db.findFamily(attrs["id"],self.fmap)
|
||||
else:
|
||||
self.family = self.db.findFamilyNoMap(attrs["id"])
|
||||
if attrs.has_key("type"):
|
||||
self.family.setRelationship(attrs["type"])
|
||||
|
||||
#---------------------------------------------------------------------
|
||||
#
|
||||
|
@ -84,6 +84,7 @@ class Marriage:
|
||||
"on_photolist_button_press_event" : on_photolist_button_press_event,
|
||||
"on_addphoto_clicked" : on_add_photo_clicked,
|
||||
"on_deletephoto_clicked" : on_delete_photo_clicked,
|
||||
"on_close_marriage_editor" : on_close_marriage_editor,
|
||||
"destroy_passed_object" : utils.destroy_passed_object
|
||||
})
|
||||
|
||||
@ -100,6 +101,8 @@ class Marriage:
|
||||
self.place_field = self.get_widget("marriagePlace")
|
||||
self.name_field = self.get_widget("marriageEventName")
|
||||
self.descr_field = self.get_widget("marriageDescription")
|
||||
self.type_field = self.get_widget("marriage_type")
|
||||
self.notes_field = self.get_widget("marriageNotes")
|
||||
|
||||
# set initial data
|
||||
mevent_list = self.get_widget("marriageEvent")
|
||||
@ -107,11 +110,19 @@ class Marriage:
|
||||
self.name_field.set_text("")
|
||||
self.load_images()
|
||||
|
||||
self.type_field.set_popdown_strings(const.familyRelations)
|
||||
self.type_field.entry.set_text(family.getRelationship())
|
||||
|
||||
# stored object data
|
||||
top_window.set_data(MARRIAGE,self)
|
||||
self.event_list.set_data(MARRIAGE,self)
|
||||
self.event_list.set_data(INDEX,-1)
|
||||
|
||||
# set notes data
|
||||
self.notes_field.set_point(0)
|
||||
self.notes_field.insert_defaults(family.getNote())
|
||||
self.notes_field.set_word_wrap(1)
|
||||
|
||||
self.redraw_events()
|
||||
top_window.show()
|
||||
|
||||
@ -201,6 +212,26 @@ class Marriage:
|
||||
def get_widget(self,name):
|
||||
return self.top.get_widget(name)
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
#
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
def on_close_marriage_editor(obj):
|
||||
family_obj = obj.get_data(MARRIAGE)
|
||||
|
||||
relation = family_obj.type_field.entry.get_text()
|
||||
if relation != family_obj.family.getRelationship():
|
||||
family_obj.family.setRelationship(relation)
|
||||
utils.modified()
|
||||
|
||||
text = family_obj.notes_field.get_chars(0,-1)
|
||||
if text != family_obj.family.getNote():
|
||||
family_obj.family.setNote(text)
|
||||
utils.modified()
|
||||
|
||||
utils.destroy_passed_object(family_obj.get_widget("marriageEditor"))
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
# on_add_clicked - creates a new event from the data displayed in the
|
||||
|
@ -51,6 +51,7 @@ class OpenOfficeDoc(TextDoc):
|
||||
def open(self,filename):
|
||||
import time
|
||||
|
||||
print filename
|
||||
t = time.localtime(time.time())
|
||||
self.time = "%04d-%02d-%02dT%02d:%02d:%02d" % \
|
||||
(t[0],t[1],t[2],t[3],t[4],t[5])
|
||||
|
@ -22,23 +22,33 @@ from TextDoc import *
|
||||
|
||||
import reportlab.platypus.tables
|
||||
from reportlab.platypus import SimpleDocTemplate, Paragraph, Spacer, PageBreak, Image
|
||||
from reportlab.rl_config import defaultPageSize
|
||||
from reportlab.lib.units import cm
|
||||
from reportlab.lib.colors import Color
|
||||
from reportlab.lib.enums import TA_LEFT, TA_RIGHT, TA_CENTER, TA_JUSTIFY
|
||||
|
||||
import reportlab.lib.styles
|
||||
|
||||
from latin_utf8 import latin_to_utf8
|
||||
|
||||
try:
|
||||
import PIL.Image
|
||||
no_pil = 0
|
||||
except:
|
||||
no_pil = 1
|
||||
|
||||
#------------------------------------------------------------------------
|
||||
#
|
||||
#
|
||||
#
|
||||
#------------------------------------------------------------------------
|
||||
def page_def(canvas,doc):
|
||||
canvas.saveState()
|
||||
canvas.restoreState()
|
||||
|
||||
#------------------------------------------------------------------------
|
||||
#
|
||||
#
|
||||
#
|
||||
#------------------------------------------------------------------------
|
||||
def make_color(color):
|
||||
return Color(float(color[0])/255.0, float(color[1])/255.0,
|
||||
float(color[2])/255.0)
|
||||
@ -112,6 +122,7 @@ class PdfDoc(TextDoc):
|
||||
|
||||
def end_paragraph(self):
|
||||
if self.in_table == 0 and self.image == 0:
|
||||
print self.text
|
||||
self.story.append(Paragraph(self.text,self.current_para))
|
||||
self.story.append(Spacer(1,0.25*cm))
|
||||
else:
|
||||
|
@ -179,12 +179,6 @@ class Name:
|
||||
else:
|
||||
return "%s %s, %s" % (self.FirstName, self.Surname, self.Suffix)
|
||||
|
||||
def getNote(self):
|
||||
return self.note
|
||||
|
||||
def setNote(self,text):
|
||||
self.note = text
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
#
|
||||
@ -458,9 +452,17 @@ class Family:
|
||||
self.Children = []
|
||||
self.Marriage = None
|
||||
self.Divorce = None
|
||||
self.type = ""
|
||||
self.EventList = []
|
||||
self.id = -1
|
||||
self.photoList = []
|
||||
self.note = ""
|
||||
|
||||
def getNote(self):
|
||||
return self.note
|
||||
|
||||
def setNote(self,text):
|
||||
self.note = text
|
||||
|
||||
def setId(self,id) :
|
||||
self.id = id
|
||||
@ -468,6 +470,12 @@ class Family:
|
||||
def getId(self) :
|
||||
return self.id
|
||||
|
||||
def setRelationship(self,type):
|
||||
self.type = type
|
||||
|
||||
def getRelationship(self):
|
||||
return self.type
|
||||
|
||||
def setFather(self,person):
|
||||
self.Father = person
|
||||
|
||||
@ -691,6 +699,12 @@ class RelDataBase:
|
||||
map[attr.getType()] = 1
|
||||
return map.keys()
|
||||
|
||||
def getFamilyRelationTypes(self):
|
||||
map = {}
|
||||
for family in self.familyMap.values():
|
||||
map[family.getRelationship()] = 1
|
||||
return map.keys()
|
||||
|
||||
def findPerson(self,idVal,map):
|
||||
if map.has_key(idVal):
|
||||
person = self.personMap[map[idVal]]
|
||||
|
@ -123,7 +123,7 @@ def dump_my_event(g,name,event):
|
||||
#-------------------------------------------------------------------------
|
||||
def write_ref(g,label,person):
|
||||
if person:
|
||||
g.write("<" + label + " ref=\"" + str(person.getId()) + "\"/>\n")
|
||||
g.write('<%s ref="%s"/>\n' % (label,str(person.getId())))
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
@ -132,7 +132,20 @@ def write_ref(g,label,person):
|
||||
#-------------------------------------------------------------------------
|
||||
def write_id(g,label,person):
|
||||
if person:
|
||||
g.write("<" + label + " id=\"" + str(person.getId()) + "\">\n")
|
||||
g.write('<%s id="%s">\n' % (label,str(person.getId())))
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
#
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
def write_family_id(g,family):
|
||||
if family:
|
||||
rel = family.getRelationship()
|
||||
if rel != "":
|
||||
g.write('<family id="%s" type="%s">\n' % (str(family.getId()),rel))
|
||||
else:
|
||||
g.write('<family id="%s">\n' % str(family.getId()))
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
@ -141,7 +154,7 @@ def write_id(g,label,person):
|
||||
#-------------------------------------------------------------------------
|
||||
def write_line(g,label,value):
|
||||
if value:
|
||||
g.write("<" + label + ">" + fix(value) + "</" + label + ">\n")
|
||||
g.write('<%s>%s</%s>\n' % (label,fix(value),label))
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
@ -149,12 +162,12 @@ def write_line(g,label,value):
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
def dump_name(g,label,name):
|
||||
g.write("<" + label + ">\n")
|
||||
g.write('<%s>\n' % label)
|
||||
write_line(g,"first",name.getFirstName())
|
||||
write_line(g,"last",name.getSurname())
|
||||
write_line(g,"suffix",name.getSuffix())
|
||||
write_line(g,"title",name.getTitle())
|
||||
g.write("</" + label + ">\n")
|
||||
g.write('</%s>\n' % label)
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
@ -289,7 +302,7 @@ def exportData(database, filename, callback):
|
||||
callback(float(count)/float(total))
|
||||
count = count + 1
|
||||
|
||||
write_id(g,"family",family)
|
||||
write_family_id(g,family)
|
||||
write_ref(g,"father",family.getFather())
|
||||
write_ref(g,"mother",family.getMother())
|
||||
|
||||
@ -310,6 +323,7 @@ def exportData(database, filename, callback):
|
||||
for person in family.getChildList():
|
||||
write_ref(g,"child",person)
|
||||
g.write("</childlist>\n")
|
||||
writeNote(g,"note",family.getNote())
|
||||
g.write("</family>\n")
|
||||
g.write("</families>\n")
|
||||
|
||||
|
@ -54,12 +54,42 @@
|
||||
<widget>
|
||||
<class>GtkTable</class>
|
||||
<name>table13</name>
|
||||
<rows>3</rows>
|
||||
<columns>1</columns>
|
||||
<rows>5</rows>
|
||||
<columns>2</columns>
|
||||
<homogeneous>False</homogeneous>
|
||||
<row_spacing>0</row_spacing>
|
||||
<column_spacing>0</column_spacing>
|
||||
|
||||
<widget>
|
||||
<class>GtkEntry</class>
|
||||
<name>attr_name</name>
|
||||
<can_focus>True</can_focus>
|
||||
<signal>
|
||||
<name>changed</name>
|
||||
<handler>on_object_toggled</handler>
|
||||
<object>propertybox</object>
|
||||
<last_modification_time>Thu, 24 May 2001 21:14:30 GMT</last_modification_time>
|
||||
</signal>
|
||||
<editable>True</editable>
|
||||
<text_visible>True</text_visible>
|
||||
<text_max_length>0</text_max_length>
|
||||
<text></text>
|
||||
<child>
|
||||
<left_attach>1</left_attach>
|
||||
<right_attach>2</right_attach>
|
||||
<top_attach>3</top_attach>
|
||||
<bottom_attach>4</bottom_attach>
|
||||
<xpad>0</xpad>
|
||||
<ypad>0</ypad>
|
||||
<xexpand>True</xexpand>
|
||||
<yexpand>False</yexpand>
|
||||
<xshrink>False</xshrink>
|
||||
<yshrink>False</yshrink>
|
||||
<xfill>True</xfill>
|
||||
<yfill>False</yfill>
|
||||
</child>
|
||||
</widget>
|
||||
|
||||
<widget>
|
||||
<class>GtkCheckButton</class>
|
||||
<name>usetabs</name>
|
||||
@ -78,37 +108,8 @@
|
||||
<right_attach>1</right_attach>
|
||||
<top_attach>1</top_attach>
|
||||
<bottom_attach>2</bottom_attach>
|
||||
<xpad>0</xpad>
|
||||
<ypad>0</ypad>
|
||||
<xexpand>False</xexpand>
|
||||
<yexpand>False</yexpand>
|
||||
<xshrink>False</xshrink>
|
||||
<yshrink>False</yshrink>
|
||||
<xfill>True</xfill>
|
||||
<yfill>False</yfill>
|
||||
</child>
|
||||
</widget>
|
||||
|
||||
<widget>
|
||||
<class>GtkCheckButton</class>
|
||||
<name>display_altnames</name>
|
||||
<can_focus>True</can_focus>
|
||||
<signal>
|
||||
<name>toggled</name>
|
||||
<handler>on_object_toggled</handler>
|
||||
<object>propertybox</object>
|
||||
<last_modification_time>Sun, 22 Apr 2001 21:20:17 GMT</last_modification_time>
|
||||
</signal>
|
||||
<label>Do not display alternate names in person list</label>
|
||||
<active>False</active>
|
||||
<draw_indicator>True</draw_indicator>
|
||||
<child>
|
||||
<left_attach>0</left_attach>
|
||||
<right_attach>1</right_attach>
|
||||
<top_attach>2</top_attach>
|
||||
<bottom_attach>3</bottom_attach>
|
||||
<xpad>0</xpad>
|
||||
<ypad>0</ypad>
|
||||
<xpad>5</xpad>
|
||||
<ypad>5</ypad>
|
||||
<xexpand>False</xexpand>
|
||||
<yexpand>False</yexpand>
|
||||
<xshrink>False</xshrink>
|
||||
@ -136,8 +137,66 @@
|
||||
<right_attach>1</right_attach>
|
||||
<top_attach>0</top_attach>
|
||||
<bottom_attach>1</bottom_attach>
|
||||
<xpad>0</xpad>
|
||||
<ypad>0</ypad>
|
||||
<xpad>5</xpad>
|
||||
<ypad>5</ypad>
|
||||
<xexpand>False</xexpand>
|
||||
<yexpand>False</yexpand>
|
||||
<xshrink>False</xshrink>
|
||||
<yshrink>False</yshrink>
|
||||
<xfill>True</xfill>
|
||||
<yfill>False</yfill>
|
||||
</child>
|
||||
</widget>
|
||||
|
||||
<widget>
|
||||
<class>GtkCheckButton</class>
|
||||
<name>display_altnames</name>
|
||||
<can_focus>True</can_focus>
|
||||
<signal>
|
||||
<name>toggled</name>
|
||||
<handler>on_object_toggled</handler>
|
||||
<object>propertybox</object>
|
||||
<last_modification_time>Sun, 22 Apr 2001 21:20:17 GMT</last_modification_time>
|
||||
</signal>
|
||||
<label>Do not display alternate names in person list</label>
|
||||
<active>False</active>
|
||||
<draw_indicator>True</draw_indicator>
|
||||
<child>
|
||||
<left_attach>0</left_attach>
|
||||
<right_attach>1</right_attach>
|
||||
<top_attach>2</top_attach>
|
||||
<bottom_attach>3</bottom_attach>
|
||||
<xpad>5</xpad>
|
||||
<ypad>5</ypad>
|
||||
<xexpand>False</xexpand>
|
||||
<yexpand>False</yexpand>
|
||||
<xshrink>False</xshrink>
|
||||
<yshrink>False</yshrink>
|
||||
<xfill>True</xfill>
|
||||
<yfill>False</yfill>
|
||||
</child>
|
||||
</widget>
|
||||
|
||||
<widget>
|
||||
<class>GtkCheckButton</class>
|
||||
<name>attr_display</name>
|
||||
<can_focus>True</can_focus>
|
||||
<signal>
|
||||
<name>toggled</name>
|
||||
<handler>on_object_toggled</handler>
|
||||
<object>propertybox</object>
|
||||
<last_modification_time>Thu, 24 May 2001 21:14:10 GMT</last_modification_time>
|
||||
</signal>
|
||||
<label>Display attribute on Edit Person form</label>
|
||||
<active>False</active>
|
||||
<draw_indicator>True</draw_indicator>
|
||||
<child>
|
||||
<left_attach>0</left_attach>
|
||||
<right_attach>1</right_attach>
|
||||
<top_attach>3</top_attach>
|
||||
<bottom_attach>4</bottom_attach>
|
||||
<xpad>5</xpad>
|
||||
<ypad>5</ypad>
|
||||
<xexpand>False</xexpand>
|
||||
<yexpand>False</yexpand>
|
||||
<xshrink>False</xshrink>
|
||||
@ -1191,7 +1250,7 @@ information.</text>
|
||||
<widget>
|
||||
<class>GtkLabel</class>
|
||||
<name>label141</name>
|
||||
<label>Please enter following information. You can change it at
|
||||
<label>Please enter the following information. You can change it at
|
||||
anytime in the program's preference settings</label>
|
||||
<justify>GTK_JUSTIFY_LEFT</justify>
|
||||
<wrap>False</wrap>
|
||||
|
@ -86,7 +86,7 @@ useExceptions= 0
|
||||
# Constants
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
picWidth = 200.0
|
||||
picWidth = 275.0
|
||||
thumbScale = 100.0
|
||||
indexFile = "data.gramps"
|
||||
male = _("male")
|
||||
@ -151,6 +151,13 @@ personalConstantAttributes = {
|
||||
"Social Security Number": "SSN"
|
||||
}
|
||||
|
||||
familyConstantRelations = [
|
||||
"Married",
|
||||
"Common Law",
|
||||
"Partners",
|
||||
"Unknown"
|
||||
]
|
||||
|
||||
personalEvents = personalConstantEvents.keys()
|
||||
personalEvents.sort()
|
||||
|
||||
@ -159,3 +166,5 @@ personalAttributes.sort()
|
||||
|
||||
marriageEvents = familyConstantEvents.keys()
|
||||
marriageEvents.sort()
|
||||
|
||||
familyRelations = familyConstantRelations
|
||||
|
@ -547,6 +547,7 @@ def new_database_response(val):
|
||||
const.personalEvents.sort()
|
||||
const.personalAttributes = const.personalConstantAttributes.keys()
|
||||
const.personalAttributes.sort()
|
||||
const.familyRelations = const.familyConstantRelations
|
||||
database.new()
|
||||
topWindow.set_title("Gramps")
|
||||
active_person = None
|
||||
@ -645,14 +646,11 @@ def read_file(filename):
|
||||
|
||||
statusbar.set_status(_("Loading %s ...") % filename)
|
||||
|
||||
try:
|
||||
if load_database(filename) == 1:
|
||||
topWindow.set_title("%s - %s" % (_("Gramps"),filename))
|
||||
else:
|
||||
statusbar.set_status("")
|
||||
Config.save_last_file("")
|
||||
except:
|
||||
displayError(_("Failure reading %s") % filename)
|
||||
|
||||
statusbar.set_progress(0.0)
|
||||
|
||||
@ -910,7 +908,7 @@ def on_delete_person_clicked(obj):
|
||||
if not active_person:
|
||||
return
|
||||
|
||||
topWindow.question(_("Do you really wish to delete %s") % \
|
||||
topWindow.question(_("Do you really wish to delete %s?") % \
|
||||
Config.nameof(active_person), delete_person_response)
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
@ -1223,6 +1221,9 @@ def revert_query(value):
|
||||
|
||||
const.marriageEvents = const.familyConstantEvents.keys()
|
||||
const.marriageEvents.sort()
|
||||
|
||||
const.familyRelations = const.familyConstantRelations
|
||||
|
||||
file = database.getSavePath()
|
||||
database.new()
|
||||
read_file(file)
|
||||
@ -1764,6 +1765,11 @@ def load_database(name):
|
||||
if type not in const.personalAttributes:
|
||||
const.personalAttributes.append(type)
|
||||
|
||||
mylist = database.getFamilyRelationTypes()
|
||||
for type in mylist:
|
||||
if type not in const.familyRelations:
|
||||
const.familyRelations.append(type)
|
||||
|
||||
Config.save_last_file(name)
|
||||
Main.get_widget("filter").set_text("")
|
||||
active_person = database.getDefaultPerson()
|
||||
@ -1895,7 +1901,7 @@ def on_edit_bookmarks_activate(obj):
|
||||
def on_default_person_activate(obj):
|
||||
if active_person:
|
||||
name = active_person.getPrimaryName().getRegularName()
|
||||
topWindow.question(_("Do you wish to set %s as the home person") % name, \
|
||||
topWindow.question(_("Do you wish to set %s as the home person?") % name, \
|
||||
set_person)
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
|
Binary file not shown.
@ -29,7 +29,7 @@
|
||||
<class>GtkVBox</class>
|
||||
<child_name>GnomeDialog:vbox</child_name>
|
||||
<name>dialog-vbox5</name>
|
||||
<width>400</width>
|
||||
<width>500</width>
|
||||
<homogeneous>False</homogeneous>
|
||||
<spacing>8</spacing>
|
||||
<child>
|
||||
@ -63,9 +63,9 @@
|
||||
<can_focus>True</can_focus>
|
||||
<signal>
|
||||
<name>clicked</name>
|
||||
<handler>destroy_passed_object</handler>
|
||||
<handler>on_close_marriage_editor</handler>
|
||||
<object>marriageEditor</object>
|
||||
<last_modification_time>Sat, 25 Nov 2000 00:55:34 GMT</last_modification_time>
|
||||
<last_modification_time>Thu, 24 May 2001 22:53:21 GMT</last_modification_time>
|
||||
</signal>
|
||||
<stock_button>GNOME_STOCK_BUTTON_CLOSE</stock_button>
|
||||
</widget>
|
||||
@ -85,7 +85,6 @@
|
||||
<widget>
|
||||
<class>GtkLabel</class>
|
||||
<name>marriageTitle</name>
|
||||
<width>0</width>
|
||||
<label>Marriage/Family Editor</label>
|
||||
<justify>GTK_JUSTIFY_CENTER</justify>
|
||||
<wrap>False</wrap>
|
||||
@ -110,6 +109,72 @@
|
||||
</child>
|
||||
</widget>
|
||||
|
||||
<widget>
|
||||
<class>GtkHBox</class>
|
||||
<name>hbox15</name>
|
||||
<homogeneous>False</homogeneous>
|
||||
<spacing>0</spacing>
|
||||
<child>
|
||||
<padding>0</padding>
|
||||
<expand>True</expand>
|
||||
<fill>True</fill>
|
||||
</child>
|
||||
|
||||
<widget>
|
||||
<class>GtkLabel</class>
|
||||
<name>label202</name>
|
||||
<label>Relationship Type : </label>
|
||||
<justify>GTK_JUSTIFY_CENTER</justify>
|
||||
<wrap>False</wrap>
|
||||
<xalign>0.5</xalign>
|
||||
<yalign>0.5</yalign>
|
||||
<xpad>0</xpad>
|
||||
<ypad>10</ypad>
|
||||
<child>
|
||||
<padding>4</padding>
|
||||
<expand>False</expand>
|
||||
<fill>False</fill>
|
||||
</child>
|
||||
</widget>
|
||||
|
||||
<widget>
|
||||
<class>GtkCombo</class>
|
||||
<name>marriage_type</name>
|
||||
<value_in_list>False</value_in_list>
|
||||
<ok_if_empty>True</ok_if_empty>
|
||||
<case_sensitive>False</case_sensitive>
|
||||
<use_arrows>True</use_arrows>
|
||||
<use_arrows_always>False</use_arrows_always>
|
||||
<items></items>
|
||||
<child>
|
||||
<padding>5</padding>
|
||||
<expand>True</expand>
|
||||
<fill>True</fill>
|
||||
</child>
|
||||
|
||||
<widget>
|
||||
<class>GtkEntry</class>
|
||||
<child_name>GtkCombo:entry</child_name>
|
||||
<name>combo-entry1</name>
|
||||
<can_focus>True</can_focus>
|
||||
<editable>True</editable>
|
||||
<text_visible>True</text_visible>
|
||||
<text_max_length>0</text_max_length>
|
||||
<text></text>
|
||||
</widget>
|
||||
</widget>
|
||||
</widget>
|
||||
|
||||
<widget>
|
||||
<class>GtkHSeparator</class>
|
||||
<name>hseparator5</name>
|
||||
<child>
|
||||
<padding>5</padding>
|
||||
<expand>True</expand>
|
||||
<fill>True</fill>
|
||||
</child>
|
||||
</widget>
|
||||
|
||||
<widget>
|
||||
<class>GtkNotebook</class>
|
||||
<name>notebook4</name>
|
||||
@ -356,6 +421,7 @@
|
||||
<last_modification_time>Sun, 11 Feb 2001 22:58:04 GMT</last_modification_time>
|
||||
</signal>
|
||||
<label>Source</label>
|
||||
<relief>GTK_RELIEF_NORMAL</relief>
|
||||
<child>
|
||||
<padding>3</padding>
|
||||
<expand>False</expand>
|
||||
@ -479,6 +545,7 @@
|
||||
<last_modification_time>Sat, 25 Nov 2000 16:52:41 GMT</last_modification_time>
|
||||
</signal>
|
||||
<label>Add</label>
|
||||
<relief>GTK_RELIEF_NORMAL</relief>
|
||||
</widget>
|
||||
|
||||
<widget>
|
||||
@ -493,6 +560,7 @@
|
||||
<last_modification_time>Sat, 25 Nov 2000 16:52:46 GMT</last_modification_time>
|
||||
</signal>
|
||||
<label>Update</label>
|
||||
<relief>GTK_RELIEF_NORMAL</relief>
|
||||
</widget>
|
||||
|
||||
<widget>
|
||||
@ -507,6 +575,7 @@
|
||||
<last_modification_time>Sat, 25 Nov 2000 16:52:55 GMT</last_modification_time>
|
||||
</signal>
|
||||
<label>Delete</label>
|
||||
<relief>GTK_RELIEF_NORMAL</relief>
|
||||
</widget>
|
||||
</widget>
|
||||
</widget>
|
||||
@ -628,6 +697,7 @@
|
||||
<last_modification_time>Thu, 29 Mar 2001 13:45:03 GMT</last_modification_time>
|
||||
</signal>
|
||||
<label>Add Photo</label>
|
||||
<relief>GTK_RELIEF_NORMAL</relief>
|
||||
</widget>
|
||||
|
||||
<widget>
|
||||
@ -642,6 +712,7 @@
|
||||
<last_modification_time>Thu, 29 Mar 2001 13:45:15 GMT</last_modification_time>
|
||||
</signal>
|
||||
<label>Delete Photo</label>
|
||||
<relief>GTK_RELIEF_NORMAL</relief>
|
||||
</widget>
|
||||
|
||||
<widget>
|
||||
@ -656,6 +727,7 @@
|
||||
<last_modification_time>Thu, 29 Mar 2001 13:44:47 GMT</last_modification_time>
|
||||
</signal>
|
||||
<label>Make Primary</label>
|
||||
<relief>GTK_RELIEF_NORMAL</relief>
|
||||
</widget>
|
||||
</widget>
|
||||
</widget>
|
||||
|
@ -432,7 +432,7 @@ def on_save_clicked(obj):
|
||||
#
|
||||
#------------------------------------------------------------------------
|
||||
def get_description():
|
||||
return _("Creates a family group report, showing information on a set of parents and their children.")
|
||||
return _("Produces a detailed report on the selected person.")
|
||||
|
||||
def get_name():
|
||||
return _("Generate files/Individual Summary")
|
||||
|
@ -68,8 +68,7 @@ def ancestors_of(p1,list):
|
||||
#
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
def get_name(p1):
|
||||
|
||||
def get_name_obj(p1):
|
||||
if p1 == None:
|
||||
return None
|
||||
else:
|
||||
@ -874,8 +873,8 @@ class Merge:
|
||||
f2 = p2.getMainFamily()
|
||||
|
||||
if f1 and f2:
|
||||
dad1 = get_name(f1.getFather())
|
||||
dad2 = get_name(f2.getFather())
|
||||
dad1 = get_name_obj(f1.getFather())
|
||||
dad2 = get_name_obj(f2.getFather())
|
||||
|
||||
value = self.name_match(dad1,dad2)
|
||||
|
||||
@ -884,8 +883,8 @@ class Merge:
|
||||
|
||||
chance = chance + value
|
||||
|
||||
mom1 = get_name(f1.getMother())
|
||||
mom2 = get_name(f2.getMother())
|
||||
mom1 = get_name_obj(f1.getMother())
|
||||
mom2 = get_name_obj(f2.getMother())
|
||||
|
||||
value = self.name_match(mom1,mom2)
|
||||
if value == -1:
|
||||
@ -902,8 +901,8 @@ class Merge:
|
||||
if father1 == father2:
|
||||
chance = chance + 1
|
||||
else:
|
||||
fname1 = get_name(father1)
|
||||
fname2 = get_name(father2)
|
||||
fname1 = get_name_obj(father1)
|
||||
fname2 = get_name_obj(father2)
|
||||
value = self.name_match(fname1,fname2)
|
||||
if value != -1:
|
||||
chance = chance + value
|
||||
@ -914,8 +913,8 @@ class Merge:
|
||||
if mother1 == mother2:
|
||||
chance = chance + 1
|
||||
else:
|
||||
mname1 = get_name(mother1)
|
||||
mname2 = get_name(mother2)
|
||||
mname1 = get_name_obj(mother1)
|
||||
mname2 = get_name_obj(mother2)
|
||||
value = self.name_match(mname1,mname2)
|
||||
if value != -1:
|
||||
chance = chance + value
|
||||
|
@ -15,7 +15,7 @@
|
||||
<widget>
|
||||
<class>GtkDialog</class>
|
||||
<name>filters</name>
|
||||
<title>Gramps - Event Correlation</title>
|
||||
<title>Gramps - Event Comparison</title>
|
||||
<type>GTK_WINDOW_DIALOG</type>
|
||||
<position>GTK_WIN_POS_NONE</position>
|
||||
<modal>False</modal>
|
||||
|
@ -15,7 +15,7 @@
|
||||
<widget>
|
||||
<class>GtkWindow</class>
|
||||
<name>status</name>
|
||||
<title>GEDCOM import status</title>
|
||||
<title>GEDCOM Import Status</title>
|
||||
<type>GTK_WINDOW_TOPLEVEL</type>
|
||||
<position>GTK_WIN_POS_CENTER</position>
|
||||
<modal>False</modal>
|
||||
@ -92,7 +92,7 @@
|
||||
<widget>
|
||||
<class>GtkWindow</class>
|
||||
<name>gedcomImport</name>
|
||||
<title>Gramps - GEDCOM import</title>
|
||||
<title>Gramps - GEDCOM Import</title>
|
||||
<type>GTK_WINDOW_TOPLEVEL</type>
|
||||
<position>GTK_WIN_POS_CENTER</position>
|
||||
<modal>True</modal>
|
||||
|
@ -204,7 +204,7 @@
|
||||
<widget>
|
||||
<class>GtkLabel</class>
|
||||
<name>label8</name>
|
||||
<label>Birth date : </label>
|
||||
<label>Birth Date : </label>
|
||||
<justify>GTK_JUSTIFY_CENTER</justify>
|
||||
<wrap>False</wrap>
|
||||
<xalign>1</xalign>
|
||||
@ -230,7 +230,7 @@
|
||||
<widget>
|
||||
<class>GtkLabel</class>
|
||||
<name>label12</name>
|
||||
<label>Death date : </label>
|
||||
<label>Death Date : </label>
|
||||
<justify>GTK_JUSTIFY_CENTER</justify>
|
||||
<wrap>False</wrap>
|
||||
<xalign>1</xalign>
|
||||
@ -856,7 +856,7 @@
|
||||
<widget>
|
||||
<class>GtkLabel</class>
|
||||
<name>label13</name>
|
||||
<label>Death date : </label>
|
||||
<label>Death Date : </label>
|
||||
<justify>GTK_JUSTIFY_CENTER</justify>
|
||||
<wrap>False</wrap>
|
||||
<xalign>1</xalign>
|
||||
@ -960,7 +960,7 @@
|
||||
<widget>
|
||||
<class>GtkLabel</class>
|
||||
<name>label9</name>
|
||||
<label>Birth date : </label>
|
||||
<label>Birth Date : </label>
|
||||
<justify>GTK_JUSTIFY_CENTER</justify>
|
||||
<wrap>False</wrap>
|
||||
<xalign>1</xalign>
|
||||
|
@ -72,7 +72,7 @@
|
||||
<widget>
|
||||
<class>GtkButton</class>
|
||||
<name>button3</name>
|
||||
<tooltip>Close window</tooltip>
|
||||
<tooltip>Close Window</tooltip>
|
||||
<can_default>True</can_default>
|
||||
<can_focus>True</can_focus>
|
||||
<signal>
|
||||
|
1989
gramps/src/po/sv.po
1989
gramps/src/po/sv.po
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user