* src/RelLib/_BaseObject.py (PrivacyBase): Remove class, as it
already has its own module. svn: r6519
This commit is contained in:
parent
8c1919104c
commit
98cc3dcffb
@ -1,4 +1,6 @@
|
|||||||
2006-05-02 Alex Roitman <shura@gramps-project.org>
|
2006-05-02 Alex Roitman <shura@gramps-project.org>
|
||||||
|
* src/RelLib/_BaseObject.py (PrivacyBase): Remove class, as it
|
||||||
|
already has its own module.
|
||||||
* src/AutoComp.py (StandardCustomSelector.fill): Adapt to new types.
|
* src/AutoComp.py (StandardCustomSelector.fill): Adapt to new types.
|
||||||
* src/GrampsDb/_GrampsBSDDB.py (gramps_upgrade_9): Add broken
|
* src/GrampsDb/_GrampsBSDDB.py (gramps_upgrade_9): Add broken
|
||||||
witness note.
|
witness note.
|
||||||
|
@ -167,41 +167,3 @@ class BaseObject:
|
|||||||
ret += obj.get_referenced_handles_recursively()
|
ret += obj.get_referenced_handles_recursively()
|
||||||
|
|
||||||
return ret
|
return ret
|
||||||
|
|
||||||
class PrivacyBase:
|
|
||||||
"""
|
|
||||||
Base class for privacy-aware objects.
|
|
||||||
"""
|
|
||||||
|
|
||||||
def __init__(self,source=None):
|
|
||||||
"""
|
|
||||||
Initialize a PrivacyBase. If the source is not None, then object
|
|
||||||
is initialized from values of the source object.
|
|
||||||
|
|
||||||
@param source: Object used to initialize the new object
|
|
||||||
@type source: PrivacyBase
|
|
||||||
"""
|
|
||||||
|
|
||||||
if source:
|
|
||||||
self.private = source.private
|
|
||||||
else:
|
|
||||||
self.private = False
|
|
||||||
|
|
||||||
def set_privacy(self,val):
|
|
||||||
"""
|
|
||||||
Sets or clears the privacy flag of the data
|
|
||||||
|
|
||||||
@param val: value to assign to the privacy flag. True indicates that the
|
|
||||||
record is private, False indicates that it is public.
|
|
||||||
@type val: bool
|
|
||||||
"""
|
|
||||||
self.private = val
|
|
||||||
|
|
||||||
def get_privacy(self):
|
|
||||||
"""
|
|
||||||
Returns the privacy level of the data.
|
|
||||||
|
|
||||||
@returns: True indicates that the record is private
|
|
||||||
@rtype: bool
|
|
||||||
"""
|
|
||||||
return self.private
|
|
||||||
|
Loading…
Reference in New Issue
Block a user