Updated several more plugins, more flexibility in ID naming
svn: r513
This commit is contained in:
parent
b697bde6de
commit
a40acfdddb
@ -23,6 +23,7 @@
|
|||||||
__author__ = "Don Allingham"
|
__author__ = "Don Allingham"
|
||||||
|
|
||||||
|
|
||||||
|
import re
|
||||||
from Date import *
|
from Date import *
|
||||||
|
|
||||||
CONF_VERY_HIGH = 4
|
CONF_VERY_HIGH = 4
|
||||||
@ -31,6 +32,8 @@ CONF_NORMAL = 2
|
|||||||
CONF_LOW = 1
|
CONF_LOW = 1
|
||||||
CONF_VERY_LOW = 0
|
CONF_VERY_LOW = 0
|
||||||
|
|
||||||
|
_id_reg = re.compile("%\d+d")
|
||||||
|
|
||||||
class SourceNote:
|
class SourceNote:
|
||||||
"""Base class for storing source references and notes"""
|
"""Base class for storing source references and notes"""
|
||||||
|
|
||||||
@ -1474,18 +1477,33 @@ class RelDataBase:
|
|||||||
self.fprefix = "F%d"
|
self.fprefix = "F%d"
|
||||||
|
|
||||||
def set_iprefix(self,val):
|
def set_iprefix(self,val):
|
||||||
|
if _id_reg.search(val):
|
||||||
|
self.iprefix = val
|
||||||
|
else:
|
||||||
self.iprefix = val + "%d"
|
self.iprefix = val + "%d"
|
||||||
|
|
||||||
def set_sprefix(self,val):
|
def set_sprefix(self,val):
|
||||||
|
if _id_reg.search(val):
|
||||||
|
self.sprefix = val
|
||||||
|
else:
|
||||||
self.sprefix = val + "%d"
|
self.sprefix = val + "%d"
|
||||||
|
|
||||||
def set_oprefix(self,val):
|
def set_oprefix(self,val):
|
||||||
|
if _id_reg.search(val):
|
||||||
|
self.oprefix = val
|
||||||
|
else:
|
||||||
self.oprefix = val + "%d"
|
self.oprefix = val + "%d"
|
||||||
|
|
||||||
def set_pprefix(self,val):
|
def set_pprefix(self,val):
|
||||||
|
if _id_reg.search(val):
|
||||||
|
self.pprefix = val
|
||||||
|
else:
|
||||||
self.pprefix = val + "%d"
|
self.pprefix = val + "%d"
|
||||||
|
|
||||||
def set_fprefix(self,val):
|
def set_fprefix(self,val):
|
||||||
|
if _id_reg.search(val):
|
||||||
|
self.fprefix = val
|
||||||
|
else:
|
||||||
self.fprefix = val + "%d"
|
self.fprefix = val + "%d"
|
||||||
|
|
||||||
def new(self):
|
def new(self):
|
||||||
|
@ -33,60 +33,55 @@ import intl
|
|||||||
|
|
||||||
_ = intl.gettext
|
_ = intl.gettext
|
||||||
|
|
||||||
topDialog = None
|
|
||||||
|
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
def on_apply_clicked(obj):
|
|
||||||
original = topDialog.get_widget("original_text").get_text()
|
|
||||||
new = topDialog.get_widget("new_text").get_text()
|
|
||||||
|
|
||||||
for person in db.getPersonMap().values():
|
|
||||||
for event in person.getEventList():
|
|
||||||
if event.getName() == original:
|
|
||||||
event.setName(new)
|
|
||||||
utils.modified()
|
|
||||||
|
|
||||||
on_close_clicked(obj)
|
|
||||||
|
|
||||||
#-------------------------------------------------------------------------
|
|
||||||
#
|
|
||||||
#
|
|
||||||
#
|
|
||||||
#-------------------------------------------------------------------------
|
|
||||||
def on_close_clicked(obj):
|
|
||||||
obj.destroy()
|
|
||||||
while events_pending():
|
|
||||||
mainiteration()
|
|
||||||
|
|
||||||
#-------------------------------------------------------------------------
|
|
||||||
#
|
|
||||||
#
|
|
||||||
#-------------------------------------------------------------------------
|
|
||||||
def runTool(database,person,callback):
|
def runTool(database,person,callback):
|
||||||
global active_person
|
ChangeTypes(database,person)
|
||||||
global topDialog
|
|
||||||
global glade_file
|
|
||||||
global db
|
|
||||||
|
|
||||||
active_person = person
|
class ChangeTypes:
|
||||||
db = database
|
def __init__(self,db,person):
|
||||||
|
self.person = person
|
||||||
|
self.db = db
|
||||||
|
|
||||||
base = os.path.dirname(__file__)
|
base = os.path.dirname(__file__)
|
||||||
glade_file = base + os.sep + "changetype.glade"
|
glade_file = "%s/%s" % (base,"changetype.glade")
|
||||||
topDialog = GladeXML(glade_file,"top")
|
self.glade = GladeXML(glade_file,"top")
|
||||||
|
|
||||||
topDialog.get_widget("original").set_popdown_strings(const.personalEvents)
|
self.glade.get_widget("original").set_popdown_strings(const.personalEvents)
|
||||||
topDialog.get_widget("new").set_popdown_strings(const.personalEvents)
|
self.glade.get_widget("new").set_popdown_strings(const.personalEvents)
|
||||||
|
|
||||||
topDialog.signal_autoconnect({
|
self.glade.signal_autoconnect({
|
||||||
"on_close_clicked" : on_close_clicked,
|
"on_close_clicked" : utils.destroy_passed_object,
|
||||||
"on_apply_clicked" : on_apply_clicked
|
"on_combo_insert_text" : utils.combo_insert_text,
|
||||||
|
"on_apply_clicked" : self.on_apply_clicked
|
||||||
})
|
})
|
||||||
|
|
||||||
|
def on_apply_clicked(self,obj):
|
||||||
|
modified = 0
|
||||||
|
original = self.glade.get_widget("original_text").get_text()
|
||||||
|
new = self.glade.get_widget("new_text").get_text()
|
||||||
|
|
||||||
|
print original
|
||||||
|
print new
|
||||||
|
for person in self.db.getPersonMap().values():
|
||||||
|
for event in person.getEventList():
|
||||||
|
print event.getName()
|
||||||
|
if event.getName() == original:
|
||||||
|
event.setName(new)
|
||||||
|
modified = modified + 1
|
||||||
|
utils.modified()
|
||||||
|
|
||||||
|
if modified == 1:
|
||||||
|
msg = _("1 event record was modified")
|
||||||
|
else:
|
||||||
|
msg = _("%d event records were modified") % modified
|
||||||
|
|
||||||
|
GnomeOkDialog(msg)
|
||||||
|
utils.destroy_passed_object(obj)
|
||||||
|
|
||||||
#------------------------------------------------------------------------
|
#------------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
|
@ -33,9 +33,9 @@ import libglade
|
|||||||
import RelLib
|
import RelLib
|
||||||
import utils
|
import utils
|
||||||
|
|
||||||
title_list = []
|
_title_re = re.compile(r"^([A-Za-z][A-Za-z]+\.)\s+(.*)$")
|
||||||
nick_list = []
|
_nick_re = re.compile(r"(.+)[(\"](.*)[)\"]")
|
||||||
cb = None
|
|
||||||
|
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
@ -45,73 +45,69 @@ cb = None
|
|||||||
#
|
#
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
def runTool(database,active_person,callback):
|
def runTool(database,active_person,callback):
|
||||||
|
PatchNames(database,callback)
|
||||||
|
|
||||||
global cb
|
class PatchNames:
|
||||||
|
|
||||||
cb = callback
|
def __init__(self,db,callback):
|
||||||
title_re = re.compile(r"^([A-Za-z][A-Za-z]+\.)\s+(.*)$")
|
self.cb = callback
|
||||||
nick_re = re.compile(r"(.+)[(\"](.*)[)\"]")
|
self.db = db
|
||||||
|
self.title_list = []
|
||||||
|
self.nick_list = []
|
||||||
|
|
||||||
personMap = database.getPersonMap()
|
personMap = self.db.getPersonMap()
|
||||||
for key in personMap.keys():
|
for key in personMap.keys():
|
||||||
|
|
||||||
person = personMap[key]
|
person = personMap[key]
|
||||||
first = person.getPrimaryName().getFirstName()
|
first = person.getPrimaryName().getFirstName()
|
||||||
match = title_re.match(first)
|
match = _title_re.match(first)
|
||||||
if match:
|
if match:
|
||||||
groups = match.groups()
|
groups = match.groups()
|
||||||
title_list.append((person,groups[0],groups[1]))
|
self.title_list.append((person,groups[0],groups[1]))
|
||||||
|
|
||||||
match = nick_re.match(first)
|
match = _nick_re.match(first)
|
||||||
if match:
|
if match:
|
||||||
groups = match.groups()
|
groups = match.groups()
|
||||||
nick_list.append((person,groups[0],groups[1]))
|
self.nick_list.append((person,groups[0],groups[1]))
|
||||||
|
|
||||||
msg = ""
|
msg = ""
|
||||||
if len(nick_list) > 0 or len(title_list) > 0:
|
if len(self.nick_list) > 0 or len(self.title_list) > 0:
|
||||||
if len(nick_list) > 0:
|
for name in self.nick_list:
|
||||||
for name in nick_list:
|
|
||||||
msg = msg + _("%s will be extracted as a nickname from %s\n") % \
|
msg = msg + _("%s will be extracted as a nickname from %s\n") % \
|
||||||
(name[2],name[0].getPrimaryName().getName())
|
(name[2],name[0].getPrimaryName().getName())
|
||||||
|
|
||||||
if len(title_list) > 0:
|
for name in self.title_list:
|
||||||
for name in title_list:
|
|
||||||
msg = msg + _("%s will be extracted as a title from %s\n") % \
|
msg = msg + _("%s will be extracted as a title from %s\n") % \
|
||||||
(name[0].getPrimaryName().getName(),name[1])
|
(name[0].getPrimaryName().getName(),name[1])
|
||||||
|
|
||||||
base = os.path.dirname(__file__)
|
base = os.path.dirname(__file__)
|
||||||
glade_file = base + os.sep + "patchnames.glade"
|
glade_file = base + os.sep + "patchnames.glade"
|
||||||
|
|
||||||
top = libglade.GladeXML(glade_file,"summary")
|
self.top = libglade.GladeXML(glade_file,"summary")
|
||||||
top.signal_autoconnect({
|
self.top.signal_autoconnect({
|
||||||
"destroy_passed_object" : utils.destroy_passed_object,
|
"destroy_passed_object" : utils.destroy_passed_object,
|
||||||
"on_ok_clicked" : on_ok_clicked
|
"on_ok_clicked" : self.on_ok_clicked
|
||||||
})
|
})
|
||||||
top.get_widget("textwindow").show_string(msg)
|
self.top.get_widget("textwindow").show_string(msg)
|
||||||
else:
|
else:
|
||||||
GnomeOkDialog(_("No titles or nicknames were found"))
|
GnomeOkDialog(_("No titles or nicknames were found"))
|
||||||
callback(0)
|
self.cb(0)
|
||||||
|
|
||||||
#-------------------------------------------------------------------------
|
def on_ok_clicked(self,obj):
|
||||||
#
|
for grp in self.nick_list:
|
||||||
#
|
|
||||||
#
|
|
||||||
#-------------------------------------------------------------------------
|
|
||||||
def on_ok_clicked(obj):
|
|
||||||
for grp in nick_list:
|
|
||||||
name = grp[0].getPrimaryName()
|
name = grp[0].getPrimaryName()
|
||||||
name.setFirstName(grp[1])
|
name.setFirstName(grp[1])
|
||||||
grp[0].setNickName(grp[2])
|
grp[0].setNickName(grp[2])
|
||||||
utils.modified()
|
utils.modified()
|
||||||
|
|
||||||
for grp in title_list:
|
for grp in self.title_list:
|
||||||
name = grp[0].getPrimaryName()
|
name = grp[0].getPrimaryName()
|
||||||
name.setFirstName(grp[2])
|
name.setFirstName(grp[2])
|
||||||
name.setTitle(grp[1])
|
name.setTitle(grp[1])
|
||||||
utils.modified()
|
utils.modified()
|
||||||
|
|
||||||
utils.destroy_passed_object(obj)
|
utils.destroy_passed_object(obj)
|
||||||
cb(1)
|
self.cb(1)
|
||||||
|
|
||||||
#------------------------------------------------------------------------
|
#------------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
|
@ -29,13 +29,10 @@ from libglade import *
|
|||||||
import RelLib
|
import RelLib
|
||||||
import sort
|
import sort
|
||||||
import intl
|
import intl
|
||||||
|
import utils
|
||||||
|
|
||||||
_ = intl.gettext
|
_ = intl.gettext
|
||||||
|
|
||||||
topDialog = None
|
|
||||||
other_person = None
|
|
||||||
col2person = []
|
|
||||||
|
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
@ -51,118 +48,6 @@ def filter(person,index,list,map):
|
|||||||
filter(family.getFather(),index+1,list,map)
|
filter(family.getFather(),index+1,list,map)
|
||||||
filter(family.getMother(),index+1,list,map)
|
filter(family.getMother(),index+1,list,map)
|
||||||
|
|
||||||
#-------------------------------------------------------------------------
|
|
||||||
#
|
|
||||||
#
|
|
||||||
#
|
|
||||||
#-------------------------------------------------------------------------
|
|
||||||
def on_peopleList_select_row(obj,a,b,c):
|
|
||||||
global other_person
|
|
||||||
|
|
||||||
other_person = col2person[a]
|
|
||||||
|
|
||||||
#-------------------------------------------------------------------------
|
|
||||||
#
|
|
||||||
#
|
|
||||||
#
|
|
||||||
#-------------------------------------------------------------------------
|
|
||||||
def on_apply_clicked(obj):
|
|
||||||
firstMap = {}
|
|
||||||
firstList = []
|
|
||||||
secondMap = {}
|
|
||||||
secondList = []
|
|
||||||
common = []
|
|
||||||
rank = 9999999
|
|
||||||
|
|
||||||
filter(active_person,0,firstList,firstMap)
|
|
||||||
filter(other_person,0,secondList,secondMap)
|
|
||||||
|
|
||||||
for person in firstList:
|
|
||||||
if person in secondList:
|
|
||||||
new_rank = firstMap[person]
|
|
||||||
if new_rank < rank:
|
|
||||||
rank = new_rank
|
|
||||||
common = [ person ]
|
|
||||||
elif new_rank == rank:
|
|
||||||
common.append(person)
|
|
||||||
|
|
||||||
firstRel = -1
|
|
||||||
secondRel = -1
|
|
||||||
|
|
||||||
firstName = active_person.getPrimaryName().getRegularName()
|
|
||||||
secondName = other_person.getPrimaryName().getRegularName()
|
|
||||||
|
|
||||||
length = len(common)
|
|
||||||
if length == 1:
|
|
||||||
person = common[0]
|
|
||||||
secondRel = firstMap[person]
|
|
||||||
firstRel = secondMap[person]
|
|
||||||
commontext = " Their common ancestor is "
|
|
||||||
commontext = commontext + person.getPrimaryName().getRegularName() + "."
|
|
||||||
elif length > 1:
|
|
||||||
index = 0
|
|
||||||
commontext = " Their common ancestors are "
|
|
||||||
for person in common:
|
|
||||||
secondRel = firstMap[person]
|
|
||||||
firstRel = secondMap[person]
|
|
||||||
if length == index + 1:
|
|
||||||
commontext = commontext + " and "
|
|
||||||
elif index != 0:
|
|
||||||
commontext = commontext + ", "
|
|
||||||
commontext = commontext + person.getPrimaryName().getRegularName()
|
|
||||||
index = index + 1
|
|
||||||
else:
|
|
||||||
commontext = ""
|
|
||||||
|
|
||||||
if firstRel == -1:
|
|
||||||
text = "There is no relationship between " + firstName + " and " + secondName + "."
|
|
||||||
elif firstRel == 0:
|
|
||||||
if other_person.getGender() == RelLib.Person.male:
|
|
||||||
root = "father"
|
|
||||||
else:
|
|
||||||
root = "mother"
|
|
||||||
if secondRel == 0:
|
|
||||||
text = firstName + " and " + secondName + " are the same person."
|
|
||||||
else:
|
|
||||||
text = secondName + get_prefix(secondRel,root) + firstName
|
|
||||||
elif secondRel == 0:
|
|
||||||
if other_person.getGender() == RelLib.Person.male:
|
|
||||||
text = secondName + get_prefix(firstRel,"son") + firstName + "."
|
|
||||||
else:
|
|
||||||
text = secondName + get_prefix(firstRel,"daughter") + firstName + "."
|
|
||||||
elif firstRel == 1:
|
|
||||||
if other_person.getGender() == RelLib.Person.male:
|
|
||||||
root = "uncle"
|
|
||||||
else:
|
|
||||||
root = "aunt"
|
|
||||||
if secondRel == 1:
|
|
||||||
if other_person.getGender() == RelLib.Person.male:
|
|
||||||
text = secondName + " is the brother of " + firstName + "."
|
|
||||||
else:
|
|
||||||
text = secondName + " is the sister of " + firstName + "."
|
|
||||||
else:
|
|
||||||
text = secondName + get_prefix(secondRel-1,root) + firstName + "."
|
|
||||||
elif secondRel == 1:
|
|
||||||
if other_person.getGender() == RelLib.Person.male:
|
|
||||||
text = secondName + get_prefix(firstRel-1,"nephew") + firstName + "."
|
|
||||||
else:
|
|
||||||
text = secondName + get_prefix(firstRel-1,"niece") + firstName + "."
|
|
||||||
else:
|
|
||||||
if secondRel > firstRel:
|
|
||||||
text = secondName + cousin(secondRel-1,secondRel-firstRel) + firstName + "."
|
|
||||||
else:
|
|
||||||
text = secondName + cousin(firstRel-1,firstRel-secondRel) + firstName + "."
|
|
||||||
|
|
||||||
text1 = topDialog.get_widget("text1")
|
|
||||||
text1.set_point(0)
|
|
||||||
length = text1.get_length()
|
|
||||||
text1.forward_delete(length)
|
|
||||||
if firstRel == 0 or secondRel == 0:
|
|
||||||
text1.insert_defaults(text)
|
|
||||||
else:
|
|
||||||
text1.insert_defaults(text + commontext)
|
|
||||||
text1.set_word_wrap(1)
|
|
||||||
|
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
@ -213,47 +98,148 @@ def get_prefix(level,root):
|
|||||||
#
|
#
|
||||||
#
|
#
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
def on_close_clicked(obj):
|
|
||||||
obj.destroy()
|
|
||||||
while events_pending():
|
|
||||||
mainiteration()
|
|
||||||
|
|
||||||
#-------------------------------------------------------------------------
|
|
||||||
#
|
|
||||||
#
|
|
||||||
#-------------------------------------------------------------------------
|
|
||||||
def runTool(database,person,callback):
|
def runTool(database,person,callback):
|
||||||
global active_person
|
|
||||||
global topDialog
|
|
||||||
global glade_file
|
|
||||||
global db
|
|
||||||
|
|
||||||
active_person = person
|
RelCalc(database,person)
|
||||||
db = database
|
|
||||||
|
#-------------------------------------------------------------------------
|
||||||
|
#
|
||||||
|
#
|
||||||
|
#
|
||||||
|
#-------------------------------------------------------------------------
|
||||||
|
class RelCalc:
|
||||||
|
|
||||||
|
def __init__(self,database,person):
|
||||||
|
self.person = person
|
||||||
|
self.db = database
|
||||||
|
|
||||||
base = os.path.dirname(__file__)
|
base = os.path.dirname(__file__)
|
||||||
glade_file = base + os.sep + "relcalc.glade"
|
glade_file = base + os.sep + "relcalc.glade"
|
||||||
topDialog = GladeXML(glade_file,"relcalc")
|
self.glade = GladeXML(glade_file,"relcalc")
|
||||||
|
|
||||||
name = person.getPrimaryName().getRegularName()
|
name = self.person.getPrimaryName().getRegularName()
|
||||||
|
|
||||||
topDialog.get_widget("name").set_text(_("Relationship to %s") % name)
|
self.glade.get_widget("name").set_text(_("Relationship to %s") % name)
|
||||||
peopleList = topDialog.get_widget("peopleList")
|
self.people = self.glade.get_widget("peopleList")
|
||||||
|
|
||||||
name_list = database.getPersonMap().values()
|
name_list = self.db.getPersonMap().values()
|
||||||
name_list.sort(sort.by_last_name)
|
name_list.sort(sort.by_last_name)
|
||||||
|
index = 0
|
||||||
for per in name_list:
|
for per in name_list:
|
||||||
col2person.append(per)
|
|
||||||
name = per.getPrimaryName().getName()
|
name = per.getPrimaryName().getName()
|
||||||
birthday = per.getBirth().getDate()
|
birthday = per.getBirth().getDate()
|
||||||
peopleList.append([name,birthday])
|
id = per.getId()
|
||||||
|
self.people.append([name,id,birthday])
|
||||||
|
self.people.set_row_data(index,per)
|
||||||
|
index = index + 1
|
||||||
|
|
||||||
topDialog.signal_autoconnect({
|
self.glade.signal_autoconnect({
|
||||||
"on_close_clicked" : on_close_clicked,
|
"on_close_clicked" : utils.destroy_passed_object,
|
||||||
"on_peopleList_select_row" : on_peopleList_select_row,
|
"on_apply_clicked" : self.on_apply_clicked
|
||||||
"on_apply_clicked" : on_apply_clicked
|
|
||||||
})
|
})
|
||||||
|
|
||||||
|
def on_apply_clicked(self,obj):
|
||||||
|
firstMap = {}
|
||||||
|
firstList = []
|
||||||
|
secondMap = {}
|
||||||
|
secondList = []
|
||||||
|
common = []
|
||||||
|
rank = 9999999
|
||||||
|
|
||||||
|
if len(self.people.selection) == 0:
|
||||||
|
return
|
||||||
|
|
||||||
|
other_person = self.people.get_row_data(self.people.selection[0])
|
||||||
|
filter(self.person,0,firstList,firstMap)
|
||||||
|
filter(other_person,0,secondList,secondMap)
|
||||||
|
|
||||||
|
for person in firstList:
|
||||||
|
if person in secondList:
|
||||||
|
new_rank = firstMap[person]
|
||||||
|
if new_rank < rank:
|
||||||
|
rank = new_rank
|
||||||
|
common = [ person ]
|
||||||
|
elif new_rank == rank:
|
||||||
|
common.append(person)
|
||||||
|
|
||||||
|
firstRel = -1
|
||||||
|
secondRel = -1
|
||||||
|
|
||||||
|
firstName = self.person.getPrimaryName().getRegularName()
|
||||||
|
secondName = other_person.getPrimaryName().getRegularName()
|
||||||
|
|
||||||
|
length = len(common)
|
||||||
|
if length == 1:
|
||||||
|
person = common[0]
|
||||||
|
secondRel = firstMap[person]
|
||||||
|
firstRel = secondMap[person]
|
||||||
|
name = person.getPrimaryName().getRegularName()
|
||||||
|
commontext = " " + _("Their common ancestor is %s.") % name
|
||||||
|
elif length > 1:
|
||||||
|
index = 0
|
||||||
|
commontext = " Their common ancestors are "
|
||||||
|
for person in common:
|
||||||
|
secondRel = firstMap[person]
|
||||||
|
firstRel = secondMap[person]
|
||||||
|
if length == index + 1:
|
||||||
|
commontext = commontext + " and "
|
||||||
|
elif index != 0:
|
||||||
|
commontext = commontext + ", "
|
||||||
|
commontext = commontext + person.getPrimaryName().getRegularName()
|
||||||
|
index = index + 1
|
||||||
|
else:
|
||||||
|
commontext = ""
|
||||||
|
|
||||||
|
if firstRel == -1:
|
||||||
|
msg = _("There is no relationship between %s and %s.")
|
||||||
|
text = msg % (firstName,secondName)
|
||||||
|
elif firstRel == 0:
|
||||||
|
if other_person.getGender() == RelLib.Person.male:
|
||||||
|
root = "father"
|
||||||
|
else:
|
||||||
|
root = "mother"
|
||||||
|
if secondRel == 0:
|
||||||
|
text = firstName + " and " + secondName + " are the same person."
|
||||||
|
else:
|
||||||
|
text = secondName + get_prefix(secondRel,root) + firstName
|
||||||
|
elif secondRel == 0:
|
||||||
|
if other_person.getGender() == RelLib.Person.male:
|
||||||
|
text = secondName + get_prefix(firstRel,"son") + firstName + "."
|
||||||
|
else:
|
||||||
|
text = secondName + get_prefix(firstRel,"daughter") + firstName + "."
|
||||||
|
elif firstRel == 1:
|
||||||
|
if other_person.getGender() == RelLib.Person.male:
|
||||||
|
root = "uncle"
|
||||||
|
else:
|
||||||
|
root = "aunt"
|
||||||
|
if secondRel == 1:
|
||||||
|
if other_person.getGender() == RelLib.Person.male:
|
||||||
|
text = secondName + " is the brother of " + firstName + "."
|
||||||
|
else:
|
||||||
|
text = secondName + " is the sister of " + firstName + "."
|
||||||
|
else:
|
||||||
|
text = secondName + get_prefix(secondRel-1,root) + firstName + "."
|
||||||
|
elif secondRel == 1:
|
||||||
|
if other_person.getGender() == RelLib.Person.male:
|
||||||
|
text = secondName + get_prefix(firstRel-1,"nephew") + firstName + "."
|
||||||
|
else:
|
||||||
|
text = secondName + get_prefix(firstRel-1,"niece") + firstName + "."
|
||||||
|
else:
|
||||||
|
if secondRel > firstRel:
|
||||||
|
text = secondName + cousin(secondRel-1,secondRel-firstRel) + firstName + "."
|
||||||
|
else:
|
||||||
|
text = secondName + cousin(firstRel-1,firstRel-secondRel) + firstName + "."
|
||||||
|
|
||||||
|
text1 = self.glade.get_widget("text1")
|
||||||
|
text1.set_point(0)
|
||||||
|
length = text1.get_length()
|
||||||
|
text1.forward_delete(length)
|
||||||
|
if firstRel == 0 or secondRel == 0:
|
||||||
|
text1.insert_defaults(text)
|
||||||
|
else:
|
||||||
|
text1.insert_defaults(text + commontext)
|
||||||
|
text1.set_word_wrap(1)
|
||||||
|
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
|
@ -32,7 +32,7 @@ _ = intl.gettext
|
|||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
def runTool(database,active_person,callback):
|
def runTool(database,active_person,callback):
|
||||||
|
|
||||||
for prefix in ["xyzzytemporaryid%d", "I%d"] :
|
for prefix in ["xyzzytemporaryid%d", database.iprefix] :
|
||||||
index = 0
|
index = 0
|
||||||
pmap = database.getPersonMap()
|
pmap = database.getPersonMap()
|
||||||
for id in pmap.keys():
|
for id in pmap.keys():
|
||||||
@ -43,7 +43,7 @@ def runTool(database,active_person,callback):
|
|||||||
del pmap[id]
|
del pmap[id]
|
||||||
index = index + 1
|
index = index + 1
|
||||||
|
|
||||||
for prefix in ["xyzzytemporaryid%d", "F%d"] :
|
for prefix in ["xyzzytemporaryid%d", database.fprefix] :
|
||||||
index = 0
|
index = 0
|
||||||
pmap = database.getFamilyMap()
|
pmap = database.getFamilyMap()
|
||||||
for id in pmap.keys():
|
for id in pmap.keys():
|
||||||
@ -54,7 +54,7 @@ def runTool(database,active_person,callback):
|
|||||||
del pmap[id]
|
del pmap[id]
|
||||||
index = index + 1
|
index = index + 1
|
||||||
|
|
||||||
for prefix in ["xyzzytemporaryid%d", "S%d"] :
|
for prefix in ["xyzzytemporaryid%d", database.sprefix] :
|
||||||
index = 0
|
index = 0
|
||||||
pmap = database.getSourceMap()
|
pmap = database.getSourceMap()
|
||||||
for id in pmap.keys():
|
for id in pmap.keys():
|
||||||
@ -65,6 +65,28 @@ def runTool(database,active_person,callback):
|
|||||||
del pmap[id]
|
del pmap[id]
|
||||||
index = index + 1
|
index = index + 1
|
||||||
|
|
||||||
|
for prefix in ["xyzzytemporaryid%d", database.pprefix] :
|
||||||
|
index = 0
|
||||||
|
pmap = database.getPlaceMap()
|
||||||
|
for id in pmap.keys():
|
||||||
|
newid = prefix % index
|
||||||
|
person = pmap[id]
|
||||||
|
person.setId(newid)
|
||||||
|
pmap[newid] = person
|
||||||
|
del pmap[id]
|
||||||
|
index = index + 1
|
||||||
|
|
||||||
|
for prefix in ["xyzzytemporaryid%d", database.oprefix] :
|
||||||
|
index = 0
|
||||||
|
pmap = database.getObjectMap()
|
||||||
|
for id in pmap.keys():
|
||||||
|
newid = prefix % index
|
||||||
|
person = pmap[id]
|
||||||
|
person.setId(newid)
|
||||||
|
pmap[newid] = person
|
||||||
|
del pmap[id]
|
||||||
|
index = index + 1
|
||||||
|
|
||||||
utils.modified()
|
utils.modified()
|
||||||
callback(1)
|
callback(1)
|
||||||
|
|
||||||
|
@ -13,30 +13,40 @@
|
|||||||
</project>
|
</project>
|
||||||
|
|
||||||
<widget>
|
<widget>
|
||||||
<class>GtkDialog</class>
|
<class>GnomeDialog</class>
|
||||||
<name>top</name>
|
<name>top</name>
|
||||||
<title>Change Event Types</title>
|
<title>Gramps - Change Event Types</title>
|
||||||
<type>GTK_WINDOW_TOPLEVEL</type>
|
<type>GTK_WINDOW_TOPLEVEL</type>
|
||||||
<position>GTK_WIN_POS_NONE</position>
|
<position>GTK_WIN_POS_NONE</position>
|
||||||
<modal>False</modal>
|
<modal>False</modal>
|
||||||
<allow_shrink>True</allow_shrink>
|
<allow_shrink>False</allow_shrink>
|
||||||
<allow_grow>True</allow_grow>
|
<allow_grow>True</allow_grow>
|
||||||
<auto_shrink>False</auto_shrink>
|
<auto_shrink>False</auto_shrink>
|
||||||
|
<auto_close>False</auto_close>
|
||||||
|
<hide_on_close>False</hide_on_close>
|
||||||
|
|
||||||
<widget>
|
<widget>
|
||||||
<class>GtkVBox</class>
|
<class>GtkVBox</class>
|
||||||
<child_name>Dialog:vbox</child_name>
|
<child_name>GnomeDialog:vbox</child_name>
|
||||||
<name>dialog-vbox1</name>
|
<name>dialog-vbox2</name>
|
||||||
<homogeneous>False</homogeneous>
|
<homogeneous>False</homogeneous>
|
||||||
<spacing>0</spacing>
|
<spacing>8</spacing>
|
||||||
|
<child>
|
||||||
|
<padding>4</padding>
|
||||||
|
<expand>True</expand>
|
||||||
|
<fill>True</fill>
|
||||||
|
</child>
|
||||||
|
|
||||||
<widget>
|
<widget>
|
||||||
<class>GtkHBox</class>
|
<class>GtkHButtonBox</class>
|
||||||
<child_name>Dialog:action_area</child_name>
|
<child_name>GnomeDialog:action_area</child_name>
|
||||||
<name>dialog-action_area1</name>
|
<name>dialog-action_area2</name>
|
||||||
<border_width>10</border_width>
|
<layout_style>GTK_BUTTONBOX_END</layout_style>
|
||||||
<homogeneous>True</homogeneous>
|
<spacing>8</spacing>
|
||||||
<spacing>5</spacing>
|
<child_min_width>85</child_min_width>
|
||||||
|
<child_min_height>27</child_min_height>
|
||||||
|
<child_ipad_x>7</child_ipad_x>
|
||||||
|
<child_ipad_y>0</child_ipad_y>
|
||||||
<child>
|
<child>
|
||||||
<padding>0</padding>
|
<padding>0</padding>
|
||||||
<expand>False</expand>
|
<expand>False</expand>
|
||||||
@ -44,59 +54,32 @@
|
|||||||
<pack>GTK_PACK_END</pack>
|
<pack>GTK_PACK_END</pack>
|
||||||
</child>
|
</child>
|
||||||
|
|
||||||
<widget>
|
|
||||||
<class>GtkHButtonBox</class>
|
|
||||||
<name>hbuttonbox1</name>
|
|
||||||
<layout_style>GTK_BUTTONBOX_DEFAULT_STYLE</layout_style>
|
|
||||||
<spacing>30</spacing>
|
|
||||||
<child_min_width>85</child_min_width>
|
|
||||||
<child_min_height>27</child_min_height>
|
|
||||||
<child_ipad_x>7</child_ipad_x>
|
|
||||||
<child_ipad_y>0</child_ipad_y>
|
|
||||||
<child>
|
|
||||||
<padding>0</padding>
|
|
||||||
<expand>True</expand>
|
|
||||||
<fill>True</fill>
|
|
||||||
</child>
|
|
||||||
|
|
||||||
<widget>
|
<widget>
|
||||||
<class>GtkButton</class>
|
<class>GtkButton</class>
|
||||||
<name>button1</name>
|
<name>button3</name>
|
||||||
<can_default>True</can_default>
|
<can_default>True</can_default>
|
||||||
<can_focus>True</can_focus>
|
<can_focus>True</can_focus>
|
||||||
<signal>
|
<signal>
|
||||||
<name>clicked</name>
|
<name>clicked</name>
|
||||||
<handler>on_apply_clicked</handler>
|
<handler>on_apply_clicked</handler>
|
||||||
<object>top</object>
|
<object>top</object>
|
||||||
<last_modification_time>Fri, 09 Mar 2001 17:49:10 GMT</last_modification_time>
|
<last_modification_time>Sat, 27 Oct 2001 23:16:31 GMT</last_modification_time>
|
||||||
</signal>
|
</signal>
|
||||||
<stock_button>GNOME_STOCK_BUTTON_OK</stock_button>
|
<stock_button>GNOME_STOCK_BUTTON_OK</stock_button>
|
||||||
<relief>GTK_RELIEF_NORMAL</relief>
|
|
||||||
</widget>
|
</widget>
|
||||||
|
|
||||||
<widget>
|
<widget>
|
||||||
<class>GtkButton</class>
|
<class>GtkButton</class>
|
||||||
<name>button2</name>
|
<name>button5</name>
|
||||||
<can_default>True</can_default>
|
<can_default>True</can_default>
|
||||||
<can_focus>True</can_focus>
|
<can_focus>True</can_focus>
|
||||||
<signal>
|
<signal>
|
||||||
<name>clicked</name>
|
<name>clicked</name>
|
||||||
<handler>on_close_clicked</handler>
|
<handler>on_close_clicked</handler>
|
||||||
<object>top</object>
|
<object>top</object>
|
||||||
<last_modification_time>Fri, 09 Mar 2001 17:48:57 GMT</last_modification_time>
|
<last_modification_time>Sat, 27 Oct 2001 23:16:19 GMT</last_modification_time>
|
||||||
</signal>
|
</signal>
|
||||||
<stock_button>GNOME_STOCK_BUTTON_CANCEL</stock_button>
|
<stock_button>GNOME_STOCK_BUTTON_CANCEL</stock_button>
|
||||||
<relief>GTK_RELIEF_NORMAL</relief>
|
|
||||||
</widget>
|
|
||||||
|
|
||||||
<widget>
|
|
||||||
<class>GtkButton</class>
|
|
||||||
<name>button3</name>
|
|
||||||
<can_default>True</can_default>
|
|
||||||
<can_focus>True</can_focus>
|
|
||||||
<stock_button>GNOME_STOCK_BUTTON_HELP</stock_button>
|
|
||||||
<relief>GTK_RELIEF_NORMAL</relief>
|
|
||||||
</widget>
|
|
||||||
</widget>
|
</widget>
|
||||||
</widget>
|
</widget>
|
||||||
|
|
||||||
@ -132,6 +115,7 @@
|
|||||||
<widget>
|
<widget>
|
||||||
<class>GtkCombo</class>
|
<class>GtkCombo</class>
|
||||||
<name>original</name>
|
<name>original</name>
|
||||||
|
<width>250</width>
|
||||||
<value_in_list>True</value_in_list>
|
<value_in_list>True</value_in_list>
|
||||||
<ok_if_empty>True</ok_if_empty>
|
<ok_if_empty>True</ok_if_empty>
|
||||||
<case_sensitive>True</case_sensitive>
|
<case_sensitive>True</case_sensitive>
|
||||||
@ -149,6 +133,12 @@
|
|||||||
<child_name>GtkCombo:entry</child_name>
|
<child_name>GtkCombo:entry</child_name>
|
||||||
<name>original_text</name>
|
<name>original_text</name>
|
||||||
<can_focus>True</can_focus>
|
<can_focus>True</can_focus>
|
||||||
|
<signal>
|
||||||
|
<name>insert_text</name>
|
||||||
|
<handler>on_combo_insert_text</handler>
|
||||||
|
<object>original</object>
|
||||||
|
<last_modification_time>Sat, 27 Oct 2001 23:12:54 GMT</last_modification_time>
|
||||||
|
</signal>
|
||||||
<editable>True</editable>
|
<editable>True</editable>
|
||||||
<text_visible>True</text_visible>
|
<text_visible>True</text_visible>
|
||||||
<text_max_length>0</text_max_length>
|
<text_max_length>0</text_max_length>
|
||||||
@ -193,6 +183,12 @@
|
|||||||
<child_name>GtkCombo:entry</child_name>
|
<child_name>GtkCombo:entry</child_name>
|
||||||
<name>new_text</name>
|
<name>new_text</name>
|
||||||
<can_focus>True</can_focus>
|
<can_focus>True</can_focus>
|
||||||
|
<signal>
|
||||||
|
<name>insert_text</name>
|
||||||
|
<handler>on_combo_insert_text</handler>
|
||||||
|
<object>new</object>
|
||||||
|
<last_modification_time>Sat, 27 Oct 2001 23:13:20 GMT</last_modification_time>
|
||||||
|
</signal>
|
||||||
<editable>True</editable>
|
<editable>True</editable>
|
||||||
<text_visible>True</text_visible>
|
<text_visible>True</text_visible>
|
||||||
<text_max_length>0</text_max_length>
|
<text_max_length>0</text_max_length>
|
||||||
|
@ -70,6 +70,7 @@
|
|||||||
<last_modification_time>Tue, 06 Feb 2001 23:47:29 GMT</last_modification_time>
|
<last_modification_time>Tue, 06 Feb 2001 23:47:29 GMT</last_modification_time>
|
||||||
</signal>
|
</signal>
|
||||||
<stock_button>GNOME_STOCK_BUTTON_APPLY</stock_button>
|
<stock_button>GNOME_STOCK_BUTTON_APPLY</stock_button>
|
||||||
|
<relief>GTK_RELIEF_NORMAL</relief>
|
||||||
</widget>
|
</widget>
|
||||||
|
|
||||||
<widget>
|
<widget>
|
||||||
@ -84,14 +85,7 @@
|
|||||||
<last_modification_time>Tue, 06 Feb 2001 23:47:17 GMT</last_modification_time>
|
<last_modification_time>Tue, 06 Feb 2001 23:47:17 GMT</last_modification_time>
|
||||||
</signal>
|
</signal>
|
||||||
<stock_button>GNOME_STOCK_BUTTON_CLOSE</stock_button>
|
<stock_button>GNOME_STOCK_BUTTON_CLOSE</stock_button>
|
||||||
</widget>
|
<relief>GTK_RELIEF_NORMAL</relief>
|
||||||
|
|
||||||
<widget>
|
|
||||||
<class>GtkButton</class>
|
|
||||||
<name>button3</name>
|
|
||||||
<can_default>True</can_default>
|
|
||||||
<can_focus>True</can_focus>
|
|
||||||
<stock_button>GNOME_STOCK_BUTTON_HELP</stock_button>
|
|
||||||
</widget>
|
</widget>
|
||||||
</widget>
|
</widget>
|
||||||
</widget>
|
</widget>
|
||||||
@ -150,7 +144,7 @@
|
|||||||
<widget>
|
<widget>
|
||||||
<class>GtkCList</class>
|
<class>GtkCList</class>
|
||||||
<name>peopleList</name>
|
<name>peopleList</name>
|
||||||
<width>400</width>
|
<width>500</width>
|
||||||
<height>150</height>
|
<height>150</height>
|
||||||
<can_focus>True</can_focus>
|
<can_focus>True</can_focus>
|
||||||
<signal>
|
<signal>
|
||||||
@ -158,8 +152,8 @@
|
|||||||
<handler>on_peopleList_select_row</handler>
|
<handler>on_peopleList_select_row</handler>
|
||||||
<last_modification_time>Wed, 07 Feb 2001 00:05:39 GMT</last_modification_time>
|
<last_modification_time>Wed, 07 Feb 2001 00:05:39 GMT</last_modification_time>
|
||||||
</signal>
|
</signal>
|
||||||
<columns>2</columns>
|
<columns>3</columns>
|
||||||
<column_widths>241,83</column_widths>
|
<column_widths>250,75,150</column_widths>
|
||||||
<selection_mode>GTK_SELECTION_SINGLE</selection_mode>
|
<selection_mode>GTK_SELECTION_SINGLE</selection_mode>
|
||||||
<show_titles>True</show_titles>
|
<show_titles>True</show_titles>
|
||||||
<shadow_type>GTK_SHADOW_IN</shadow_type>
|
<shadow_type>GTK_SHADOW_IN</shadow_type>
|
||||||
@ -177,6 +171,19 @@
|
|||||||
<ypad>0</ypad>
|
<ypad>0</ypad>
|
||||||
</widget>
|
</widget>
|
||||||
|
|
||||||
|
<widget>
|
||||||
|
<class>GtkLabel</class>
|
||||||
|
<child_name>CList:title</child_name>
|
||||||
|
<name>label4x</name>
|
||||||
|
<label>ID</label>
|
||||||
|
<justify>GTK_JUSTIFY_CENTER</justify>
|
||||||
|
<wrap>False</wrap>
|
||||||
|
<xalign>0.5</xalign>
|
||||||
|
<yalign>0.5</yalign>
|
||||||
|
<xpad>0</xpad>
|
||||||
|
<ypad>0</ypad>
|
||||||
|
</widget>
|
||||||
|
|
||||||
<widget>
|
<widget>
|
||||||
<class>GtkLabel</class>
|
<class>GtkLabel</class>
|
||||||
<child_name>CList:title</child_name>
|
<child_name>CList:title</child_name>
|
||||||
@ -197,7 +204,7 @@
|
|||||||
<name>hseparator2</name>
|
<name>hseparator2</name>
|
||||||
<child>
|
<child>
|
||||||
<padding>5</padding>
|
<padding>5</padding>
|
||||||
<expand>True</expand>
|
<expand>False</expand>
|
||||||
<fill>True</fill>
|
<fill>True</fill>
|
||||||
</child>
|
</child>
|
||||||
</widget>
|
</widget>
|
||||||
|
@ -83,15 +83,6 @@
|
|||||||
</signal>
|
</signal>
|
||||||
<stock_button>GNOME_STOCK_BUTTON_CLOSE</stock_button>
|
<stock_button>GNOME_STOCK_BUTTON_CLOSE</stock_button>
|
||||||
</widget>
|
</widget>
|
||||||
|
|
||||||
<widget>
|
|
||||||
<class>GtkButton</class>
|
|
||||||
<name>help</name>
|
|
||||||
<tooltip>Help is not implemented yet</tooltip>
|
|
||||||
<can_default>True</can_default>
|
|
||||||
<can_focus>True</can_focus>
|
|
||||||
<stock_button>GNOME_STOCK_BUTTON_HELP</stock_button>
|
|
||||||
</widget>
|
|
||||||
</widget>
|
</widget>
|
||||||
|
|
||||||
<widget>
|
<widget>
|
||||||
@ -254,6 +245,12 @@
|
|||||||
<name>name</name>
|
<name>name</name>
|
||||||
<tooltip>Name used to generate SoundEx code</tooltip>
|
<tooltip>Name used to generate SoundEx code</tooltip>
|
||||||
<can_focus>True</can_focus>
|
<can_focus>True</can_focus>
|
||||||
|
<signal>
|
||||||
|
<name>insert_text</name>
|
||||||
|
<handler>on_combo_insert_text</handler>
|
||||||
|
<object>nameList</object>
|
||||||
|
<last_modification_time>Sat, 27 Oct 2001 19:28:10 GMT</last_modification_time>
|
||||||
|
</signal>
|
||||||
<editable>True</editable>
|
<editable>True</editable>
|
||||||
<text_visible>True</text_visible>
|
<text_visible>True</text_visible>
|
||||||
<text_max_length>0</text_max_length>
|
<text_max_length>0</text_max_length>
|
||||||
|
@ -33,43 +33,53 @@ import intl
|
|||||||
|
|
||||||
_ = intl.gettext
|
_ = intl.gettext
|
||||||
|
|
||||||
topDialog = None
|
|
||||||
|
|
||||||
#-------------------------------------------------------------------------
|
|
||||||
#
|
|
||||||
#
|
|
||||||
#-------------------------------------------------------------------------
|
|
||||||
def on_apply_clicked(obj):
|
|
||||||
|
|
||||||
text = obj.get_text()
|
|
||||||
value = topDialog.get_widget("value").set_text(soundex.soundex(text))
|
|
||||||
|
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
def runTool(database,active_person,callback):
|
def runTool(database,active_person,callback):
|
||||||
global topDialog
|
SoundGen(database,active_person)
|
||||||
|
|
||||||
|
|
||||||
|
class SoundGen:
|
||||||
|
def __init__(self,database,active_person):
|
||||||
|
self.db = database
|
||||||
|
|
||||||
base = os.path.dirname(__file__)
|
base = os.path.dirname(__file__)
|
||||||
glade_file = base + os.sep + "soundex.glade"
|
glade_file = base + os.sep + "soundex.glade"
|
||||||
|
|
||||||
topDialog = GladeXML(glade_file,"soundEx")
|
self.glade = GladeXML(glade_file,"soundEx")
|
||||||
topDialog.signal_autoconnect({
|
self.glade.signal_autoconnect({
|
||||||
"destroy_passed_object" : utils.destroy_passed_object,
|
"destroy_passed_object" : utils.destroy_passed_object,
|
||||||
"on_apply_clicked" : on_apply_clicked
|
"on_combo_insert_text" : utils.combo_insert_text,
|
||||||
|
"on_apply_clicked" : self.on_apply_clicked,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
self.value = self.glade.get_widget("value")
|
||||||
|
self.name = self.glade.get_widget("name")
|
||||||
names = []
|
names = []
|
||||||
for person in database.getPersonMap().values():
|
for person in self.db.getPersonMap().values():
|
||||||
lastname = person.getPrimaryName().getSurname()
|
lastname = person.getPrimaryName().getSurname()
|
||||||
if lastname not in names:
|
if lastname not in names:
|
||||||
names.append(lastname)
|
names.append(lastname)
|
||||||
|
|
||||||
names.sort()
|
names.sort()
|
||||||
topDialog.get_widget("nameList").set_popdown_strings(names)
|
self.glade.get_widget("nameList").set_popdown_strings(names)
|
||||||
topDialog.get_widget("name").set_text("")
|
|
||||||
topDialog.get_widget("soundEx").show()
|
if active_person:
|
||||||
|
n = active_person.getPrimaryName().getSurname()
|
||||||
|
self.name.set_text(n)
|
||||||
|
self.value.set_text(soundex.soundex(n))
|
||||||
|
else:
|
||||||
|
self.name.set_text("")
|
||||||
|
|
||||||
|
self.glade.get_widget("soundEx").show()
|
||||||
|
|
||||||
|
def on_apply_clicked(self,obj):
|
||||||
|
|
||||||
|
text = obj.get_text()
|
||||||
|
value = self.value.set_text(soundex.soundex(text))
|
||||||
|
|
||||||
|
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
|
Loading…
Reference in New Issue
Block a user