2007-04-30 Benny Malengier <bm@cage.ugent.be>
* src/Editors/_EditPlace.py: * src/Editors/_EditSource.py: * src/Editors/_EditNote.py: * src/Editors/_EditPerson.py: * src/Editors/_EditRepository.py: * src/Editors/_EditFamily.py: * src/DisplayTabs/_NoteTab.py: Add meaningfull title to the note dialog instead of only the note number, when called from place, source, person, family or repo svn: r8432
This commit is contained in:
@@ -71,8 +71,9 @@ class NoteTab(EmbeddedList):
|
||||
(_('Preview'), 1, 200),
|
||||
]
|
||||
|
||||
def __init__(self, dbstate, uistate, track, data):
|
||||
def __init__(self, dbstate, uistate, track, data, callertitle=None):
|
||||
self.data = data
|
||||
self.callertitle = callertitle
|
||||
EmbeddedList.__init__(self, dbstate, uistate, track,
|
||||
_("Notes"), NoteModel, move=True)
|
||||
|
||||
@@ -103,7 +104,8 @@ class NoteTab(EmbeddedList):
|
||||
def add_button_clicked(self, obj):
|
||||
note = RelLib.Note()
|
||||
try:
|
||||
EditNote(self.dbstate, self.uistate, [], note, self.add_callback)
|
||||
EditNote(self.dbstate, self.uistate, [], note, self.add_callback,
|
||||
self.callertitle)
|
||||
except Errors.WindowActiveError:
|
||||
pass
|
||||
|
||||
@@ -118,7 +120,7 @@ class NoteTab(EmbeddedList):
|
||||
note = self.dbstate.db.get_note_from_handle(handle)
|
||||
try:
|
||||
EditNote(self.dbstate, self.uistate, [], note,
|
||||
self.edit_callback)
|
||||
self.edit_callback, self.callertitle )
|
||||
except Errors.WindowActiveError:
|
||||
pass
|
||||
|
||||
|
||||
Reference in New Issue
Block a user