* src/gramps_main.py: pass list of filtered people to find dialog
* src/Find.py: pass list of filtered people to find dialog * src/po/hu.po: set character set to ISO-8859-2, fix typo * src/po/hu.po: Hungarian translation svn: r2149
This commit is contained in:
parent
54b2e25b42
commit
dda531f896
10
src/Find.py
10
src/Find.py
@ -55,7 +55,7 @@ from gettext import gettext as _
|
||||
class FindBase:
|
||||
"""Opens find person dialog for gramps"""
|
||||
|
||||
def __init__(self,task,name,db):
|
||||
def __init__(self,task,name,db,valid_map=None):
|
||||
"""Opens a dialog box instance that allows users to
|
||||
search for a person.
|
||||
task - function to call to change the active person"""
|
||||
@ -79,6 +79,7 @@ class FindBase:
|
||||
self.list = None
|
||||
self.index = 0
|
||||
self.visible = 1
|
||||
self.valid = valid_map
|
||||
|
||||
def get_value(self,id):
|
||||
return id
|
||||
@ -96,6 +97,9 @@ class FindBase:
|
||||
if id == None:
|
||||
func()
|
||||
continue
|
||||
if self.valid and not self.valid.has_key(id):
|
||||
func()
|
||||
continue
|
||||
if string.find(name.upper(),text) >= 0:
|
||||
self.back_button.set_sensitive(0)
|
||||
self.forward_button.set_sensitive(0)
|
||||
@ -144,13 +148,13 @@ class FindBase:
|
||||
class FindPerson(FindBase):
|
||||
"""Opens a Find Person dialog for GRAMPS"""
|
||||
|
||||
def __init__(self,task,db):
|
||||
def __init__(self,task,db,valid_map):
|
||||
"""Opens a dialog box instance that allows users to
|
||||
search for a person.
|
||||
|
||||
task - function to call to change the active person"""
|
||||
|
||||
FindBase.__init__(self,task,_("Find Person"),db)
|
||||
FindBase.__init__(self,task,_("Find Person"),db,valid_map)
|
||||
self.list = db.personTable.values()
|
||||
self.list.sort()
|
||||
|
||||
|
@ -692,7 +692,7 @@ class Gramps:
|
||||
if self.find_person:
|
||||
self.find_person.show()
|
||||
else:
|
||||
self.find_person = Find.FindPerson(self.find_goto_person,self.db)
|
||||
self.find_person = Find.FindPerson(self.find_goto_person,self.db,self.id2col)
|
||||
|
||||
def on_findname_activate(self,obj):
|
||||
"""Display the find box"""
|
||||
@ -1658,7 +1658,10 @@ class Gramps:
|
||||
if not self.model_used.has_key(model) or self.model_used[model] == 0 or not iter:
|
||||
self.model_used[model] = 1
|
||||
self.apply_filter(model)
|
||||
try:
|
||||
(model,iter) = self.id2col[id]
|
||||
except:
|
||||
return
|
||||
|
||||
model.selection.unselect_all()
|
||||
model.selection.select_iter(iter);
|
||||
|
8416
src/po/hu.po
Normal file
8416
src/po/hu.po
Normal file
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user