2007-05-07 Benny Malengier <bm@cage.ugent.be>

* src/Editors/_EditPlace.py:
	* src/Editors/_EditAddress.py:
	* src/Editors/_EditLdsOrd.py:
	* src/Editors/_EditSourceRef.py:
	* src/Editors/_EditSource.py:
	* src/Editors/_EditRepoRef.py:
	* src/Editors/_EditAttribute.py:
	* src/Editors/_EditPersonRef.py:
	* src/Editors/_EditNote.py:
	* src/Editors/_EditPerson.py:
	* src/Editors/_EditMediaRef.py:
	* src/Editors/_EditEventRef.py:
	* src/Editors/_EditMedia.py:
	* src/Editors/_EditRepository.py:
	* src/Editors/_EditName.py:
	* src/Editors/_EditChildRef.py:
	* src/Editors/_EditFamily.py:
	* src/Editors/_EditEvent.py:
	* src/RelLib/_NoteType.py:
	* src/DisplayTabs/_NoteTab.py:
	* src/GrampsWidgets.py:
	* TODO:
	Implement using a specific notetype instead of General for notes created as part of a
        primary or secondary object. Add list of types to ignore for inclusion in MonitoredDataType in a general manner.
        List remaining issues in TODO for multiple notes.



svn: r8441
This commit is contained in:
Benny Malengier
2007-05-07 20:41:16 +00:00
parent aafae7e1cd
commit 0182f42307
23 changed files with 233 additions and 37 deletions

View File

@@ -71,9 +71,11 @@ class NoteTab(EmbeddedList):
(_('Preview'), 1, 200),
]
def __init__(self, dbstate, uistate, track, data, callertitle=None):
def __init__(self, dbstate, uistate, track, data, callertitle=None,
notetype=None):
self.data = data
self.callertitle = callertitle
self.notetype = notetype
EmbeddedList.__init__(self, dbstate, uistate, track,
_("Notes"), NoteModel, move=True)
@@ -103,9 +105,11 @@ class NoteTab(EmbeddedList):
def add_button_clicked(self, obj):
note = RelLib.Note()
if self.notetype :
note.set_type(self.notetype)
try:
EditNote(self.dbstate, self.uistate, [], note, self.add_callback,
self.callertitle)
self.callertitle, extratype = [self.notetype])
except Errors.WindowActiveError:
pass
@@ -120,7 +124,8 @@ class NoteTab(EmbeddedList):
note = self.dbstate.db.get_note_from_handle(handle)
try:
EditNote(self.dbstate, self.uistate, [], note,
self.edit_callback, self.callertitle )
self.edit_callback, self.callertitle,
extratype = [self.notetype] )
except Errors.WindowActiveError:
pass