* src/DataViews/_PersonView.py (column_names): Remove cause of death.
* src/DisplayModels/_PeopleModel.py (__init__): Update the order of marker and tooltip columns; (column_cause_of_death): remove method; (COLUMN_DEFS): Remove 'cause of death' column. * src/GrampsDb/_GrampsBSDDB.py (gramps_upgrade_10): Reset event and person view columns to the default. * src/GrampsDb/_GrampsDbBase.py (get_event_column_order): Remove cause column from the default list. (get_person_column_order): Remove cause of death column. svn: r7224
This commit is contained in:
parent
74ec4d41f5
commit
b64e1f0eb2
11
ChangeLog
11
ChangeLog
@ -1,4 +1,15 @@
|
||||
2006-08-20 Alex Roitman <shura@gramps-project.org>
|
||||
* src/DataViews/_PersonView.py (column_names): Remove cause of death.
|
||||
* src/DisplayModels/_PeopleModel.py (__init__): Update the order
|
||||
of marker and tooltip columns;
|
||||
(column_cause_of_death): remove method;
|
||||
(COLUMN_DEFS): Remove 'cause of death' column.
|
||||
* src/GrampsDb/_GrampsBSDDB.py (gramps_upgrade_10): Reset event
|
||||
and person view columns to the default.
|
||||
* src/GrampsDb/_GrampsDbBase.py (get_event_column_order): Remove
|
||||
cause column from the default list.
|
||||
(get_person_column_order): Remove cause of death column.
|
||||
|
||||
* src/GrampsDb/_ReadGedcom.py (GedcomParser.__init__): Use config
|
||||
setting to determine whether to set default source.
|
||||
* src/Config/_GrampsConfigKeys.py: Regenerate file.
|
||||
|
@ -74,7 +74,6 @@ column_names = [
|
||||
_('Death Place'),
|
||||
_('Spouse'),
|
||||
_('Last Change'),
|
||||
_('Cause of Death'),
|
||||
]
|
||||
|
||||
|
||||
|
@ -150,8 +150,8 @@ class PeopleModel(gtk.GenericTreeModel):
|
||||
self.custom_color = Config.get(Config.CUSTOM_MARKER_COLOR)
|
||||
|
||||
self.sortnames = {}
|
||||
self.marker_color_column = 11
|
||||
self.tooltip_column = 12
|
||||
self.marker_color_column = 10
|
||||
self.tooltip_column = 11
|
||||
self.prev_handle = None
|
||||
self.prev_data = None
|
||||
self.temp_top_path2iter = []
|
||||
@ -479,19 +479,6 @@ class PeopleModel(gtk.GenericTreeModel):
|
||||
|
||||
return u""
|
||||
|
||||
def column_cause_of_death(self, data, node):
|
||||
index = data[PeopleModel._DEATH_COL]
|
||||
if index != -1:
|
||||
try:
|
||||
local = data[PeopleModel._EVENT_COL][index]
|
||||
dr = EventRef()
|
||||
dr.unserialize(local)
|
||||
return self.db.get_event_from_handle(dr.ref).get_cause()
|
||||
except:
|
||||
return u''
|
||||
else:
|
||||
return u""
|
||||
|
||||
def column_birth_place(self, data, node):
|
||||
index = data[PeopleModel._BIRTH_COL]
|
||||
if index != -1:
|
||||
@ -611,7 +598,6 @@ class PeopleModel(gtk.GenericTreeModel):
|
||||
(column_death_place, None, str),
|
||||
(column_spouse, None, str),
|
||||
(column_change, None, str),
|
||||
(column_cause_of_death, None, str),
|
||||
(column_marker_text, None, str),
|
||||
(column_marker_color, None, str),
|
||||
# the order of the above columns must match PeopleView.column_names
|
||||
|
@ -1878,6 +1878,24 @@ class GrampsBSDDB(GrampsDbBase,UpdateCallback):
|
||||
def gramps_upgrade_10(self):
|
||||
print "Upgrading to DB version 10 -- this may take a while"
|
||||
|
||||
# Remove event column metadata, since columns have changed.
|
||||
# This will reset all columns to defaults in event view
|
||||
for name in (PERSON_COL_KEY,EVENT_COL_KEY):
|
||||
try:
|
||||
if self.UseTXN:
|
||||
# Start transaction if needed
|
||||
the_txn = self.env.txn_begin()
|
||||
else:
|
||||
the_txn = None
|
||||
self.metadata.delete(name,txn=the_txn)
|
||||
if self.UseTXN:
|
||||
the_txn.commit()
|
||||
else:
|
||||
self.metadata.sync()
|
||||
except KeyError:
|
||||
if self.UseTXN:
|
||||
the_txn.abort()
|
||||
|
||||
# Create one secondary index for reference_map
|
||||
# because every commit will require this to exist
|
||||
table_flags = self.open_flags()
|
||||
|
@ -1925,7 +1925,7 @@ class GrampsDbBase(GrampsDBCallback):
|
||||
"""
|
||||
default = [(1, 1, 100), (1, 2, 100), (1, 3, 150), (0, 4, 150),
|
||||
(1, 5, 150), (0, 6, 150), (0, 7, 100), (0, 8, 100),
|
||||
(0, 9, 100)]
|
||||
]
|
||||
return self._get_column_order(PERSON_COL_KEY, default)
|
||||
|
||||
def _get_columns(self, key, default):
|
||||
@ -1993,7 +1993,7 @@ class GrampsDbBase(GrampsDBCallback):
|
||||
database's metadata.
|
||||
"""
|
||||
default = [(1, 0, 200), (1, 1, 75), (1, 2, 100), (1, 3, 150),
|
||||
(1, 4, 200), (1, 5, 100), (0, 6, 100)]
|
||||
(1, 4, 200), (0, 5, 100)]
|
||||
return self._get_columns(EVENT_COL_KEY, default)
|
||||
|
||||
def get_repository_column_order(self):
|
||||
|
Loading…
Reference in New Issue
Block a user