Remove redundant ignore list from attribute types
This commit is contained in:
parent
c3eab4e6e3
commit
76d8c70b91
@ -32,6 +32,10 @@ from .grampstype import GrampsType
|
||||
from ..const import GRAMPS_LOCALE as glocale
|
||||
_ = glocale.translation.gettext
|
||||
|
||||
# _T_ is a gramps-defined keyword -- see po/update_po.py and po/genpot.sh
|
||||
def _T_(value): # enable deferred translations (see Python docs 22.1.3.4)
|
||||
return value
|
||||
|
||||
class AttributeType(GrampsType):
|
||||
|
||||
UNKNOWN = -1
|
||||
@ -54,10 +58,6 @@ class AttributeType(GrampsType):
|
||||
_CUSTOM = CUSTOM
|
||||
_DEFAULT = ID
|
||||
|
||||
# _T_ is a gramps-defined keyword -- see po/update_po.py and po/genpot.sh
|
||||
def _T_(value): # enable deferred translations (see Python docs 22.1.3.4)
|
||||
return value
|
||||
|
||||
_BASEMAP = [ # allow deferred translation of attribute UI strings
|
||||
(UNKNOWN, _T_("Unknown"), "Unknown"),
|
||||
(CUSTOM, _T_("Custom"), "Custom"),
|
||||
@ -82,22 +82,6 @@ class AttributeType(GrampsType):
|
||||
def __init__(self, value=None):
|
||||
GrampsType.__init__(self, value)
|
||||
|
||||
def get_ignore_list(self, exception=None):
|
||||
"""
|
||||
Return a list of the types to ignore and not include in default lists.
|
||||
|
||||
Exception is a sublist of types that may not be ignored
|
||||
|
||||
:param exception: list of integer values corresponding with types that
|
||||
have to be excluded from the ignore list
|
||||
:type exception: list
|
||||
:returns: list of integers corresponding with the types to ignore when
|
||||
showing a list of different types
|
||||
:rtype: list
|
||||
|
||||
"""
|
||||
return []
|
||||
|
||||
def type2base(self):
|
||||
"""
|
||||
Return the untranslated string suitable for UI (once translated).
|
||||
|
@ -46,19 +46,3 @@ class SrcAttributeType(GrampsType):
|
||||
|
||||
def __init__(self, value=None):
|
||||
GrampsType.__init__(self, value)
|
||||
|
||||
def get_ignore_list(self, exception=None):
|
||||
"""
|
||||
Return a list of the types to ignore and not include in default lists.
|
||||
|
||||
Exception is a sublist of types that may not be ignored
|
||||
|
||||
:param exception: list of integer values corresponding with types that
|
||||
have to be excluded from the ignore list
|
||||
:type exception: list
|
||||
:returns: list of integers corresponding with the types to ignore when
|
||||
showing a list of different types
|
||||
:rtype: list
|
||||
|
||||
"""
|
||||
return []
|
||||
|
@ -117,7 +117,6 @@ class EditAttributeRoot(EditSecondary):
|
||||
self.obj.get_type,
|
||||
self.db.readonly,
|
||||
custom_values=self.alist,
|
||||
ignore_values=self.obj.get_type().get_ignore_list()
|
||||
)
|
||||
|
||||
def _create_tabbed_pages(self):
|
||||
|
Loading…
Reference in New Issue
Block a user