diff --git a/gramps2/ChangeLog b/gramps2/ChangeLog index 22a0245d1..08172cbe8 100644 --- a/gramps2/ChangeLog +++ b/gramps2/ChangeLog @@ -1,6 +1,9 @@ 2006-03-30 Don Allingham * src/Mime/_GnomeMime.py: filter out bad KDE mime type commands * src/Utils.py: clean up launch routine + * src/Editors/_EditPerson.py: setup autocomp list + * src/GrampsWidgets.py: enable autocompletion on MonitoredEntry if + a list is provided 2006-03-29 Brian Matherly * src/Sort.py: remove use of deprecated functions diff --git a/gramps2/src/Editors/_EditPerson.py b/gramps2/src/Editors/_EditPerson.py index 87a857fae..e434ff15b 100644 --- a/gramps2/src/Editors/_EditPerson.py +++ b/gramps2/src/Editors/_EditPerson.py @@ -54,6 +54,7 @@ import NameDisplay import DisplayState import GrampsDisplay import GrampsWidgets +import AutoComp from _EditPrimary import EditPrimary from DisplayTabs import * @@ -189,7 +190,8 @@ class EditPerson(EditPrimary): self.top.get_widget("surname"), self.pname.set_surname, self.pname.get_surname, - self.db.readonly) + self.db.readonly, + autolist=self.db.get_surname_list()) self.gid = GrampsWidgets.MonitoredEntry( self.top.get_widget("gid"), diff --git a/gramps2/src/GrampsWidgets.py b/gramps2/src/GrampsWidgets.py index f2d476bac..b5dc22059 100644 --- a/gramps2/src/GrampsWidgets.py +++ b/gramps2/src/GrampsWidgets.py @@ -258,7 +258,8 @@ class MonitoredCheckbox: class MonitoredEntry: - def __init__(self,obj,set_val,get_val,read_only=False, changed=None): + def __init__(self,obj,set_val,get_val,read_only=False, + autolist=None, changed=None): self.obj = obj self.set_val = set_val self.get_val = get_val @@ -269,6 +270,9 @@ class MonitoredEntry: self.obj.connect('changed', self._on_change) self.obj.set_editable(not read_only) + if autolist: + AutoComp.fill_entry(obj,autolist) + def connect(self,signal,callback): self.obj.connect(signal,callback)