2006-04-19 Alex Roitman <shura@gramps-project.org>
* src/Utils.py: Remove obsolete code. * src/DisplayTabs.py (EventRefModel.column_role): Adapt to new types. * src/PeopleModel.py: Adapt to new types. * src/plugins/TestcaseGenerator.py: Adapt to new types. * src/RelLib/Makefile.am: Ship new files. * src/RelLib/_EventRef.py: Adapt to new types. * src/RelLib/_PrimaryObject.py: Adapt to new types. * src/RelLib/_EventRoleType.py: Add new module. * src/RelLib/_RepoRef.py: Adapt to new types. * src/RelLib/_MarkerType.py: Add new module. * src/RelLib/_Family.py: Adapt to new types. * src/RelLib/_Person.py: Adapt to new types. * src/RelLib/_SourceMediaType.py: Add new module. * src/RelLib/__init__.py: Expose new modules. * src/Editors/_EditPerson.py: Use new type. * src/GrampsDb/_GrampsBSDDB.py (gramps_upgrade_9): Adapt to new types. * src/GrampsDb/_ConstXML.py: Comment out obsolete code. * src/GrampsDb/_ReadXML.py: Adapt to new types. * src/GrampsDb/_GrampsDbBase.py (commit_person): Properly use marker. * src/GrampsDb/_ReadGedcom.py: Adapt to new types. * src/DataViews/_FamilyView.py (write_relationship): Use new type. * src/DataViews/_PedigreeView.py (format_relation): Use new type. svn: r6372
This commit is contained in:
@ -472,10 +472,7 @@ class PeopleModel(gtk.GenericTreeModel):
|
||||
def column_marker_text(self, data, node):
|
||||
try:
|
||||
if data[_MARKER_COL]:
|
||||
if data[_MARKER_COL][0] == PrimaryObject.MARKER_CUSTOM:
|
||||
return data[_MARKER_COL][1]
|
||||
elif data[_MARKER_COL][0] in Utils.marker_types.keys():
|
||||
return Utils.marker_types[data[_MARKER_COL][0]]
|
||||
return str(data[_MARKER_COL])
|
||||
except IndexError:
|
||||
return ""
|
||||
return ""
|
||||
@ -483,11 +480,11 @@ class PeopleModel(gtk.GenericTreeModel):
|
||||
def column_marker_color(self, data, node):
|
||||
try:
|
||||
if data[_MARKER_COL]:
|
||||
if data[_MARKER_COL][0] == PrimaryObject.MARKER_COMPLETE:
|
||||
if int(data[_MARKER_COL]) == MarkerType.COMPLETE:
|
||||
return u"#46a046" # green
|
||||
if data[_MARKER_COL][0] == PrimaryObject.MARKER_TODO:
|
||||
if int(data[_MARKER_COL]) == MarkerType.TODO:
|
||||
return u"#df421e" # red
|
||||
if data[_MARKER_COL][0] == PrimaryObject.MARKER_CUSTOM:
|
||||
if int(data[_MARKER_COL]) == MarkerType.CUSTOM:
|
||||
return u"#eed680" # blue
|
||||
except IndexError:
|
||||
pass
|
||||
|
Reference in New Issue
Block a user