2006-04-27 Don Allingham <don@gramps-project.org>

* src/GrampsDb/_GrampsDbBase.py: fix custom event storing
	* src/GrampsDb/_GrampsBSDDB.py: fix custom event storing
	* src/Editors/_EditEventRef.py: fix custom event storing
	* src/Editors/_EditEvent.py: fix custom event storing
	* src/GrampsWidgets.py: fix custom data types
	* src/AutoComp.py: fix custom data types
	


svn: r6480
This commit is contained in:
Don Allingham 2006-04-28 03:32:04 +00:00
parent b0d282b75a
commit 9d695790d0
7 changed files with 20 additions and 11 deletions

View File

@ -1,3 +1,11 @@
2006-04-27 Don Allingham <don@gramps-project.org>
* src/GrampsDb/_GrampsDbBase.py: fix custom event storing
* src/GrampsDb/_GrampsBSDDB.py: fix custom event storing
* src/Editors/_EditEventRef.py: fix custom event storing
* src/Editors/_EditEvent.py: fix custom event storing
* src/GrampsWidgets.py: fix custom data types
* src/AutoComp.py: fix custom data types
2006-04-27 Brian Matherly <brian@gramps-project.org>
* src/docgen/OpenSpreadSheet.py: fix manifest so files open in calc

View File

@ -174,8 +174,13 @@ class StandardCustomSelector:
index = index + 1
if self.additional:
for (value,data) in self.additional:
self.store.append(row=[value,data])
for event_type in self.additional:
if type(event_type) == str:
self.store.append(row=[self.custom_key, event_type])
elif type(event_type) == str:
self.store.append(row=[event_type[0], event_type[1]])
else:
self.store.append(row=[int(event_type), str(event_type[1])])
if key == self.active_key:
self.active_index = index
index = index + 1

View File

@ -101,6 +101,10 @@ class EditEvent(EditPrimary):
ok.set_sensitive(not self.db.readonly)
ok.connect('clicked',self.save)
def get_custom_events(self):
return self.dbstate.db.get_person_event_type_list() + \
self.dbstate.db.get_family_event_types()
def _setup_fields(self):
self.place_field = PlaceEntry(
self.top.get_widget("eventPlace"),

View File

@ -84,8 +84,7 @@ class EditEventRef(EditReference):
self.add_event = self.db.add_person_event
def get_custom_events(self):
return [ (RelLib.EventType.CUSTOM,val) \
for val in self.dbstate.db.get_person_event_types()]
return self.db.get_person_event_type_list()
def _connect_signals(self):
self.define_ok_button(self.top.get_widget('ok'),self.ok_clicked)

View File

@ -938,11 +938,6 @@ class GrampsBSDDB(GrampsDbBase):
vals.sort()
return [item[1] for item in vals]
def get_person_event_type_list(self):
vals = [ unicode(val) for val in set(self.eventnames.keys()) ]
vals.sort(locale.strcoll)
return vals
def get_repository_type_list(self):
vals = list(set(self.repository_types.keys()))
vals.sort(locale.strcoll)

View File

@ -465,7 +465,6 @@ class GrampsDbBase(GrampsDBCallback):
Commits the specified Event to the database, storing the changes
as part of the transaction.
"""
self._commit_base(event, self.event_map, EVENT_KEY,
transaction.event_update, transaction.event_add,
transaction, change_time)

View File

@ -389,7 +389,6 @@ class MonitoredDataType:
def on_change(self, obj):
value = self.fix_value(self.sel.get_values())
self.set_val(value)
print value, self.get_val()
class MonitoredMenu: