2006-08-25 Alex Roitman <shura@gramps-project.org>

* src/plugins/ChangeTypes.py: Clean up type name conversions; work
	over all the events, regardless of who references them.
	* src/RelLib/_GrampsType.py (get_standard_names, get_standard_xml): 
	Add methods to obtain standard type lists.



svn: r7264
This commit is contained in:
Alex Roitman
2006-08-25 19:12:41 +00:00
parent 87bda8431d
commit 9081b54202
3 changed files with 40 additions and 19 deletions

View File

@@ -103,6 +103,20 @@ class GrampsType:
def get_map(self):
return self._I2SMAP
def get_standard_names(self):
"""
Return the list of localized names for all standard types.
"""
return [s for (i,s) in self._I2SMAP.items()
if (i != self._CUSTOM) and s.strip()]
def get_standard_xml(self):
"""
Return the list of XML (english) names for all standard types.
"""
return [s for (i,s) in self._I2EMAP.items()
if (i != self._CUSTOM) and s.strip()]
def is_custom(self):
return self.val == self._CUSTOM