* src/gramps.glade: add privacy fields and fix add/edit/remove
buttons * src/Sources.py: add support for privacy flags * src/Witness.py: add support for privacy flags * src/RelLib.py: add support for privacy flags svn: r3758
This commit is contained in:
parent
2f2d616780
commit
60a27e0c63
@ -1,3 +1,10 @@
|
|||||||
|
2004-11-27 Don Allingham <dallingham@users.sourceforge.net>
|
||||||
|
* src/gramps.glade: add privacy fields and fix add/edit/remove
|
||||||
|
buttons
|
||||||
|
* src/Sources.py: add support for privacy flags
|
||||||
|
* src/Witness.py: add support for privacy flags
|
||||||
|
* src/RelLib.py: add support for privacy flags
|
||||||
|
|
||||||
2004-11-26 Don Allingham <dallingham@users.sourceforge.net>
|
2004-11-26 Don Allingham <dallingham@users.sourceforge.net>
|
||||||
* src/DisplayModels.py: fix Source column display
|
* src/DisplayModels.py: fix Source column display
|
||||||
* src/GrampsDbBase.py: change default display columns
|
* src/GrampsDbBase.py: change default display columns
|
||||||
|
@ -201,7 +201,7 @@ class DataObj(SourceNote):
|
|||||||
if source:
|
if source:
|
||||||
self.private = source.private
|
self.private = source.private
|
||||||
else:
|
else:
|
||||||
self.private = 0
|
self.private = False
|
||||||
|
|
||||||
def set_privacy(self,val):
|
def set_privacy(self,val):
|
||||||
"""Sets or clears the privacy flag of the data"""
|
"""Sets or clears the privacy flag of the data"""
|
||||||
@ -2115,6 +2115,15 @@ class Witness:
|
|||||||
self.set_type(type)
|
self.set_type(type)
|
||||||
self.set_value(val)
|
self.set_value(val)
|
||||||
self.set_comment(comment)
|
self.set_comment(comment)
|
||||||
|
self.private = False
|
||||||
|
|
||||||
|
def set_privacy(self,val):
|
||||||
|
"""Sets or clears the privacy flag of the data"""
|
||||||
|
self.private = val
|
||||||
|
|
||||||
|
def get_privacy(self):
|
||||||
|
"""Returns the privacy level of the data"""
|
||||||
|
return self.private
|
||||||
|
|
||||||
def set_type(self,type):
|
def set_type(self,type):
|
||||||
self.type = type
|
self.type = type
|
||||||
@ -2147,6 +2156,7 @@ class SourceRef:
|
|||||||
self.date = Date.Date(source.date)
|
self.date = Date.Date(source.date)
|
||||||
self.comments = Note(source.comments.get())
|
self.comments = Note(source.comments.get())
|
||||||
self.text = source.text
|
self.text = source.text
|
||||||
|
self.private = source.private
|
||||||
else:
|
else:
|
||||||
self.confidence = CONF_NORMAL
|
self.confidence = CONF_NORMAL
|
||||||
self.ref = None
|
self.ref = None
|
||||||
@ -2154,6 +2164,15 @@ class SourceRef:
|
|||||||
self.date = Date.Date()
|
self.date = Date.Date()
|
||||||
self.comments = Note()
|
self.comments = Note()
|
||||||
self.text = ""
|
self.text = ""
|
||||||
|
self.private = False
|
||||||
|
|
||||||
|
def set_privacy(self,val):
|
||||||
|
"""Sets or clears the privacy flag of the data"""
|
||||||
|
self.private = val
|
||||||
|
|
||||||
|
def get_privacy(self):
|
||||||
|
"""Returns the privacy level of the data"""
|
||||||
|
return self.private
|
||||||
|
|
||||||
def set_confidence_level(self,val):
|
def set_confidence_level(self,val):
|
||||||
"""Sets the confidence level"""
|
"""Sets the confidence level"""
|
||||||
|
@ -332,6 +332,7 @@ class SourceEditor:
|
|||||||
self.title_menu = self.get_widget("source_title")
|
self.title_menu = self.get_widget("source_title")
|
||||||
self.title_menu.set_data("o",self)
|
self.title_menu.set_data("o",self)
|
||||||
self.conf_menu = self.get_widget("conf")
|
self.conf_menu = self.get_widget("conf")
|
||||||
|
self.private = self.get_widget("priv")
|
||||||
self.ok = self.get_widget("ok")
|
self.ok = self.get_widget("ok")
|
||||||
Utils.build_confidence_menu(self.conf_menu)
|
Utils.build_confidence_menu(self.conf_menu)
|
||||||
self.conf_menu.set_history(srcref.get_confidence_level())
|
self.conf_menu.set_history(srcref.get_confidence_level())
|
||||||
@ -351,6 +352,7 @@ class SourceEditor:
|
|||||||
self.active_source = self.db.get_source_from_handle(self.source_ref.get_base_handle())
|
self.active_source = self.db.get_source_from_handle(self.source_ref.get_base_handle())
|
||||||
self.date_obj = self.source_ref.get_date()
|
self.date_obj = self.source_ref.get_date()
|
||||||
self.date_entry_field.set_text(self.dd.display(self.date_obj))
|
self.date_entry_field.set_text(self.dd.display(self.date_obj))
|
||||||
|
self.private.set_active(self.source_ref.get_privacy())
|
||||||
else:
|
else:
|
||||||
self.date_obj = Date.Date()
|
self.date_obj = Date.Date()
|
||||||
self.active_source = None
|
self.active_source = None
|
||||||
@ -495,6 +497,7 @@ class SourceEditor:
|
|||||||
self.source_ref.set_text(text)
|
self.source_ref.set_text(text)
|
||||||
self.source_ref.set_comments(comments)
|
self.source_ref.set_comments(comments)
|
||||||
self.source_ref.set_confidence_level(conf)
|
self.source_ref.set_confidence_level(conf)
|
||||||
|
self.source_ref.set_privacy(self.private.get_active())
|
||||||
|
|
||||||
if self.update:
|
if self.update:
|
||||||
self.update(self.parent,self.source_ref)
|
self.update(self.parent,self.source_ref)
|
||||||
@ -518,5 +521,6 @@ class SourceEditor:
|
|||||||
|
|
||||||
def add_src_clicked(self,obj):
|
def add_src_clicked(self,obj):
|
||||||
import EditSource
|
import EditSource
|
||||||
EditSource.EditSource(RelLib.Source(),self.db, self,self.sourceDisplay, self.update_display)
|
EditSource.EditSource(RelLib.Source(),self.db, self,
|
||||||
|
self.sourceDisplay, self.update_display)
|
||||||
|
|
||||||
|
@ -141,6 +141,7 @@ class WitnessEditor:
|
|||||||
|
|
||||||
self.window = self.show_witness.get_widget('witness_edit')
|
self.window = self.show_witness.get_widget('witness_edit')
|
||||||
self.name = self.show_witness.get_widget("name")
|
self.name = self.show_witness.get_widget("name")
|
||||||
|
self.private = self.show_witness.get_widget("priv")
|
||||||
self.select = self.show_witness.get_widget("select")
|
self.select = self.show_witness.get_widget("select")
|
||||||
self.select.connect('clicked',self.choose)
|
self.select.connect('clicked',self.choose)
|
||||||
self.ok = self.show_witness.get_widget("ok")
|
self.ok = self.show_witness.get_widget("ok")
|
||||||
@ -157,6 +158,7 @@ class WitnessEditor:
|
|||||||
self.name.set_text(self.ref.get_value())
|
self.name.set_text(self.ref.get_value())
|
||||||
self.in_db.set_active(0)
|
self.in_db.set_active(0)
|
||||||
self.comment.get_buffer().set_text(self.ref.get_comment())
|
self.comment.get_buffer().set_text(self.ref.get_comment())
|
||||||
|
self.private.set_active(self.ref.get_privacy())
|
||||||
|
|
||||||
self.on_toggled(None)
|
self.on_toggled(None)
|
||||||
Utils.set_titles(self.show_witness.get_widget('witness_edit'),
|
Utils.set_titles(self.show_witness.get_widget('witness_edit'),
|
||||||
@ -241,6 +243,8 @@ class WitnessEditor:
|
|||||||
|
|
||||||
c = self.comment.get_buffer()
|
c = self.comment.get_buffer()
|
||||||
self.ref.set_comment(unicode(c.get_text(c.get_start_iter(),c.get_end_iter(),gtk.FALSE)))
|
self.ref.set_comment(unicode(c.get_text(c.get_start_iter(),c.get_end_iter(),gtk.FALSE)))
|
||||||
|
self.ref.set_privacy(self.private.get_active())
|
||||||
|
|
||||||
if self.update:
|
if self.update:
|
||||||
self.update()
|
self.update()
|
||||||
self.close(obj)
|
self.close(obj)
|
||||||
|
1100
src/gramps.glade
1100
src/gramps.glade
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user