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:
@@ -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
|
||||
|
||||
|
Reference in New Issue
Block a user