Fixed add spouse/family view update problem
svn: r570
This commit is contained in:
parent
44aa464fe0
commit
e1185f5142
2
NEWS
2
NEWS
@ -3,6 +3,8 @@ Version 0.6.2pre
|
||||
* Improved GEDCOM import/export. Gramps now passes the GEDCHK program
|
||||
and can now properly handle the quirks in names, notes, and parent/child
|
||||
relationships from PAF, Legacy, FTW, Brother's Keeper, and Family Origins.
|
||||
* After an Add Spouse, make the new spouse display in the Family View
|
||||
interface.
|
||||
|
||||
Version 0.6.1
|
||||
* Fixed Family View/Pedigree View button swap
|
||||
|
@ -97,7 +97,7 @@ gtkrcFile = "%s/gtkrc" % rootDir
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
progName = "gramps"
|
||||
version = "0.6.2pre"
|
||||
version = "0.6.2"
|
||||
copyright = "© 2001 Donald N. Allingham"
|
||||
authors = ["Donald N. Allingham", "David Hampton"]
|
||||
comments = _("Gramps (Genealogical Research and Analysis Management Programming System) is a personal genealogy program.")
|
||||
|
@ -1367,34 +1367,38 @@ def load_family(family=None):
|
||||
number_of_families = len(active_person.getFamilyList())
|
||||
if number_of_families > 1:
|
||||
myMenu = GtkMenu()
|
||||
if active_person != None:
|
||||
for family in active_person.getFamilyList():
|
||||
index = 0
|
||||
opt_index = 0
|
||||
for f in active_person.getFamilyList():
|
||||
person = None
|
||||
if family.getMother() == active_person:
|
||||
if family.getFather() != None:
|
||||
person = family.getFather()
|
||||
if f.getMother() == active_person:
|
||||
if f.getFather() != None:
|
||||
person = f.getFather()
|
||||
else:
|
||||
if family.getMother() != None:
|
||||
person = family.getMother()
|
||||
if f.getMother() != None:
|
||||
person = f.getMother()
|
||||
|
||||
menuitem = GtkMenuItem(Config.nameof(person))
|
||||
myMenu.append(menuitem)
|
||||
menuitem.set_data("person",person)
|
||||
menuitem.set_data("family",family)
|
||||
menuitem.set_data("family",f)
|
||||
menuitem.connect("activate",on_spouselist_changed)
|
||||
menuitem.show()
|
||||
|
||||
if family and f == family:
|
||||
opt_index = index
|
||||
index = index + 1
|
||||
gtop.get_widget("fv_spouse").set_menu(myMenu)
|
||||
gtop.get_widget("fv_spouse").set_history(opt_index)
|
||||
gtop.get_widget("lab_or_list").set_page(1)
|
||||
gtop.get_widget("edit_sp").set_sensitive(1)
|
||||
gtop.get_widget("delete_sp").set_sensitive(1)
|
||||
elif number_of_families == 1:
|
||||
gtop.get_widget("lab_or_list").set_page(0)
|
||||
family = active_person.getFamilyList()[0]
|
||||
if active_person != family.getFather():
|
||||
spouse = family.getFather()
|
||||
f = active_person.getFamilyList()[0]
|
||||
if active_person != f.getFather():
|
||||
spouse = f.getFather()
|
||||
else:
|
||||
spouse = family.getMother()
|
||||
spouse = f.getMother()
|
||||
active_spouse = spouse
|
||||
fv_spouse1 = gtop.get_widget("fv_spouse1")
|
||||
fv_spouse1.set_text(Config.nameof(spouse))
|
||||
@ -1414,6 +1418,9 @@ def load_family(family=None):
|
||||
gtop.get_widget("delete_sp").set_sensitive(0)
|
||||
|
||||
if number_of_families > 0:
|
||||
if family:
|
||||
display_marriage(family)
|
||||
else:
|
||||
display_marriage(active_person.getFamilyList()[0])
|
||||
else:
|
||||
display_marriage(None)
|
||||
|
@ -567,12 +567,12 @@ def exportData(database, filename, progress, pbar, fbar, sbar):
|
||||
try:
|
||||
g = open(filename,"w")
|
||||
except IOError,msg:
|
||||
msg = "%s\n%s" % (_("Could not open %s") % filename,str(msg))
|
||||
msg = "%s\n%s" % (_("%s could not be opened\n") % filename,str(msg))
|
||||
GnomeErrorDialog(msg)
|
||||
progress.destroy()
|
||||
return
|
||||
except:
|
||||
GnomeErrorDialog(_("Could not open %s") % filename)
|
||||
GnomeErrorDialog(_("%s could not be opened\n") % filename)
|
||||
progress.destroy()
|
||||
return
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user